- Test Data Types
Raw
Parameter
Runtime
Random
Data Generator
Phone Number
Mail Box
Environment
Concat Test Data
Create Test Data Profile
Update Test Data Profile
Updating Value in TDP
Import TDP
Bulk Deletion of a Test Data Profile
Create Test Data [Environment]- data generators
Default Test Data Generators
Address Function Type
ChangeDataType Function Type
Company Function Type
DateFunctions Function Type
DomainFunctions Function Type
EmailFunctions Function Type
File Function Type
Friends Function Type
IdNumber Function Type
Internet Function Type
MailboxAliasFunctions Function Type
MailboxFunctions Function Type
Name Function Type
NameFunctions Function Type
Number Function Type
NumberFunctions Function Type
Phone Number Function Type
PhoneNumberFunctions Function Type
Random String Function Type
RandomText Function Type
StringFunctions Function Type
TestDataFromProfile Function Type
Phone Number Type Test Data
The phone number data type is used to automate two-factor authentication (2FA) and mobile number-based login. Testsigma provides you with a valid mobile phone number on request, with which you can create test cases that require a valid phone number.
Prerequisites
Before you begin, ensure that you have referred to:
- You can enable Phone Number for your account by contacting support@testsigma.com or using the instant chat option.
- You can now access the Phone Numbers outside of test executions. This allows you to retrieve messages, OTPs, and authentication codes when you enable the toggle.
- For test executions, the toggle does not affect the execution. The test will continue to run regardless of whether the toggle is enabled or not.
Use Case
Let’s add 2FA for a test case which includes 2 steps:
- First we enter the phone number to which the OTP will be sent.
- Fetch the OTP from the SMS received on the phone number.
Using Phone Number Type Test Data
- Navigate to your test case, add a test step with the NLP ‘Enter test data in the element field’.

- Hover over the test data and select % Phone Number from the drop down. An overlay showing the list of available phone numbers (allocated to your account) would open up.

- Select one of the numbers from the list. This is the number where the OTP SMS will be sent.
We will use the test data generators available in Testsigma to fetch the OTP from the phone number provided in the previous step.
- Add a test step with the NLP ‘Enter test data in the element field’.
- Hover over the test data and select ! Data Generator from the drop down. An overlay showing the list of available data generators would open up.

- Select the PhoneNumberFunctions in *Function Type dropdown menu, enter the details, and click on Save.

We have successfully created a test case for 2FA authentication.
Set Up and Use Message Forwarding
Providing phone numbers for OTP and login purposes is restricted in certain countries. In this case, you can use Testsigma SMS forwarder app that sends SMS messages to a designated mailbox, and you retrieve the OTPs from the mailbox. This section discusses how to set up the Testsigma SMS forwarder app and perform OTP verifications using this app.
Prerequisites
- You should have Testsigma SMS Forwarder application.
Install the App & Setup the Account
- Install the app on a device.
- Click on the icon in the top-left corner to access settings.
- Sign in to the app.
- If you're using Google accounts, select the Gmail API.
Filter Set-up
- Tap on Filters and click the plus icon.
- On the Set up recipients screen, click the plus icon.
- On Add overlay, tap on Enter Phone Number.
- Enter the phone number to which you want to forward messages.
Alternatively, you can enter the automation email ID to forward messages to an email address.
- Swipe left to access the Forwarding conditions screen. Here, set the forwarding rule. You can specify rules for messages from a specific number or messages containing specific text.
- Swipe left to access Change the content screen. Here, you can add the phone number of the initial sender of the message and specific words of your choice.
- Swipe left to access the More Settings screen. Here, you can change the filter name and enable options for notifications and results.
- On completing all the steps, click Save.
Here's a GIF demonstrating how to install, add phone numbers, and set up filters for message forwarding.

Use Case for Message Forwarding
- Navigate to the URL
- Click on Login or Sign Up
- Enter phone number in the phone number input field
- Wait for 30 Seconds
- Use Data Generator to Fetch OTP
- Submit OTP
Here's a quick GIF demonstrating how to create test case after setting up sms forwarder app.
