How to do SMS, 2FA, and phone call testing using testRigor?
Nowadays, there are many scenarios where we test SMS and phone calls, especially when you are developing an app. You may have to validate the signup by sending an SMS or trying out a phone call validation.
So let’s see how we can make phone calls or send SMS with testRigor. Let’s get started.
Step 1: Log in to your testRigor app with your credentials.
Step 2: Set up the test suite for the website testing by providing the information below:
- Test Suite Name: Provide a relevant and self-explanatory name.
- Type of testing: Select from the following options: Desktop Web Testing, Mobile Web Testing, Native, and Hybrid Mobile, based on your test requirements.
- URL to run test on: Provide the application URL you want to test.
- Testing credentials for your web/mobile app to test functionality which requires user to login: You can provide the app’s user login credentials here and need not write them separately in the test steps then. The login functionality will be taken care of automatically using the keyword login. However, this is an optional field and can be skipped if not relevant.
- OS and Browser: Choose the OS Browser combination on which you want to run the test cases.
- Number of test cases to generate using AI: You can simplify your test creation further by opting to generate test cases based on the App Description text. This feature works on generative AI.
Step 3: testRigor uses Twilio to make phone calls and send and receive SMS. So, you need to configure the integration with Twilio. So make sure you have created a Twilio account and have Account Sid, Auth token, and service sid with you. Once you filled in the details provided in ‘Step 2’, click Advanced Settings.
Step 4: Click the Integrations dropdown, select Twilio, and add the details mentioned. To add these details, you should set up an account with Twilio. Once you complete the account setup with Twilio, you can add the following information by visiting the Twilio console page.
- Account Sid
- Auth Token
- Phone Number
- Service Sid
Step 5: Once you add the details, click on Create Test Suite.
On the next screen, you can let AI generate the test case based on your provided app description while creating the Test Suite. However, for now, select do not generate any test, since we will write the test steps ourselves.
Step 4: To create a new custom test case, click Add Custom Test Case.
Step 5: Provide the test case Description and add the test steps.
Test Cases: Phone call Validations
call "+15344297154" and validate it was picked up
make call to "+15344297154" and check it was answered
call to +15344297154
call "+15344297154" and check it was completed
call "+15344297154" from "+15551234567" and verify it is ringing
check that phone call from "+15344297154" is ringing
check that phone call from "+15344297154" was answered
call from stored value "allocatedNumber" to stored value "answerPhoneNumber"
Test Cases: Validation of SMS messages (Phone Text)
With Twilio integration, we can send messages. Since we have already configured the Twilio integration, we can directly use it.
send sms to "+15344297154" with content "this is the content"
sms "+15344297154" with body "this is the content" and validate it was sent
send message to "+15344297154" with text "this is the content" and check it was delivered
send message from "+15551234567" to "+15344297154" with text "this is the content" and check it was failed
send message from "+15551234567" to "+15344297154" with text "this is the content" and check it was not delivered
check that sms from "+15551234567" to "+15344297154" contains "Code" and matches regex "Code\:\d\d\d\d" and save it as "sms"
check that sms to "+12345678902" matches regex "Code\:\d\d\d\d" and save it as "sms" extract value by regex "(?<=Code\:)[0-9]{4}" from "sms" and save it as "confirmationCode"
check that sms from “+15551234567" to “+15344297154" contains “Code" and matches regex “Code\:\d\d\d\d" and save it as “sms"
Test case 9: You can request a temporary phone number from Twilio. The below custom step will request a new phone number (Twilio charges will apply) and save it in a variable “newNumber”, which you can use to check for incoming calls or messages.
allocate a temporary number and save it as "newNumber"
SMS validation for 2FA
click "Sign in" enter "jacob" into "Username" enter "jacobs-secure-password" into "Password" click "Verify me" check that sms to "+12345678902" is delivered and matches regex "Code\:\d\d\d\d" and save it as "sms" extract value by regex "(?<=Code\:)[0-9]{4}" from "sms" and save it as "confirmationCode" enter saved value "confirmationCode" into "code" click "Continue to Login" check that page contains text "Welcome, Jacob!"
testRigor’s Capabilities
Apart from the simplistic test case design and execution, there are some advanced features that help you test your application using simple English commands.
- Reusable Rules (Subroutines): You can easily create functions for the test steps that you use repeatedly. You can use the Reusable Rules to create such functions and call them in test cases by simply writing their names. See the example of Reusable Rules.
- Global Variables and Data Sets: You can import data from external files or create your own global variables and data sets in testRigor to use them in data-driven testing.
- 2FA, QR Code, and Captcha Resolution: testRigor easily manages the 2FA, QR Code, and Captcha resolution through its simple English commands.
- Email, Phone Call, and SMS Testing: Use simple English commands to test the email, phone calls, and SMS. These commands are helpful for validating 2FA scenarios, with OTPs and authentication codes being sent to email, phone calls, or via phone text.
- File Upload/ Download Testing: Execute the test steps involving file download or file upload without the requirement of any third-party software. You can also validate the contents of the files using testRigor’s simple English commands.
- Database Testing: Execute database queries and validate the results fetched.
testRigor enables you to test web, mobile (hybrid, native), API, and desktop apps with minimum effort and maintenance.
Additional Resources
- Access testRigor documentation to learn about more valuable capabilities
- Top testRigor’s features
- How to perform end-to-end testing using testRigor
- How to do API testing using testRigor
- How to do file testing using testRigor
- How to do email testing using testRigor
Achieve More Than 90% Test Automation | |
Step by Step Walkthroughs and Help | |
14 Day Free Trial, Cancel Anytime |