Certification: AI-driven Test Automation
Certification: AI-driven Test Automation
SMS and Phone Calls
SMS
You can send messages thanks to Twilio integration. There is a section in the application configuration under Integrations for setting Twilio parameters; it is required for sending messages.
You can add custom steps like:
sms "+15344297154" with body "this is content" and validate it was sent
Or
send sms to "+15344297154" with content "this is content"
send message to "+15344297154" with text "this is content" and check it was delivered
send message from "+15551234567" to "+15344297154" with text "this is content" and check it was failed message from "+15551234567" to "+15344297154" with body "this is content" and check it was not delivered
Number from which to send a message is optional and may need to be allocated prior to using.
You can also check SMS messages and validate and store their contents:
check that sms from "+12345678901" to "+12345678902" contains "Code" and matches regex "Code\:\d\d\d\d" and save it as "sms"
You can then additionally apply
extract value
command to get just the code: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"
Number from, number to, and body can be taken from stored values or parameterized strings. Additionally, message body may be a multiline string:
send sms from stored value "allocatedNumber" to stored value "answerPhoneNumber" with content from string with parameters starting from next line and ending with <END>
${answerCode} b
<END>
Phone Calls
testRigor supports making calls through Twilio. There is a section in the application configuration under Integrations for setting Twilio parameters; it is required for making calls.
After the integration is setup, you can add custom steps like:
call "+15344297154" and validate it was picked up
make call to "+15344297154" and check it was answered
call to +15344297154
OTP / 2-factor authentication
testRigor supports second factor authentication, below are a couple of examples:
Testing a 2FA authentication with a text message (you need to utilize an integration with Twilio for that):
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!"
Testing a 2FA authentication via an email:
check that email to saved value "newEmail" was received
grab value by template "######" and save it as "OTP"
switch to tab "1"
enter stored value "OTP" into "code"
Google Authenticator support for Gmail 2FA
Through Gmail 2FA support, testRigor users can use 2FA authentication within test cases. Refer to this article on how to configure the Gmail account and the test suite in testRigor application.