lundi 11 novembre 2019

How to test outgoing sms functionality from an app in dev and staging environment

I am creating a web app that takes in user mobile and sends OTP and other transactional SMS to users. I have bought a plan with an SMS provider and by hitting their API I am able to send SMS. While doing development I am faced with a challenge of how to test the SMS that is being sent to the end-user.

If I take an example of OTP, anyone who has to test a secure feature has to enter OTP to proceed. For dev and staging environment I have blocked the outgoing SMS and I store every detail of the SMS in our database. Anyone testing it relies on me to provide OTP from the database. Same goes for other SMS where we want to check different aspects of SMS like, is it going in a single message, if it's splitting then whether the information is conveyed properly, are the characters correctly displayed etc.

I am also skeptical of using production API on dev and staging as
1. It can lead to accidents where a test message is sent to real-world user
2. It will difficult to segregate tests and actual SMS for billing and efficiency purposes.

I will be really thankful if anyone can provide me a solution where an SMS can be sent to limited number of people and not use the production API.

Aucun commentaire:

Enregistrer un commentaire