Generate dynamic data for every test run
Create reliable tests with dynamic inputs
Imagine the common scenario of testing new user registrations by signing up with a unique user in every iteration. Without the ability to generate a fresh user for each test run, the test is prone to failure. Leveraging functions or BrowserStack AI, you can easily generate a unique email for each test run.
You can generate test data in Low Code Automation in two ways:
Generate test data using AI
In Low Code Automation, you can use AI to quickly generate test data by providing a prompt. For example, you can generate passwords, credit card numbers, and other data with custom requirements. The AI will then create the data for you automatically.
In the test step, you can click the Generate with BrowserStack AI button under Element details to generate the necessary data.
For detailed instructions on generating test data using AI, visit the Generate test data using AI page.
Generate test data using Functions
Use Functions to create dynamic test data.
Types of dynamic data that can be generated
With functions, one can generate various kinds of data which caters to most of the use cases today.
- Alphabet: Generate random string of alphabets with preferred length
- Number: Generate random numbers with preferred length. For example, generate a ten-digit random number to input in the mobile number field.
- Email: Generate random email address with the domain specified. Useful when testing new user workflows
- Password: Generate random password based on the character length specified
How to import a function?
- Navigate to the input step where you want to generate dynamic data to be used
- Click the step name or the > icon to open the step configuration details
- Click the + and select Add a function.
- Select the appropriate option from the list to generate dynamic data. In the below example, Email to generate random email with example.com domain
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!