Skip to main content
No Result Found

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.

Generate test data using AI

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.

  1. Alphabet: Generate random string of alphabets with preferred length
  2. Number: Generate random numbers with preferred length. For example, generate a ten-digit random number to input in the mobile number field.
  3. Email: Generate random email address with the domain specified. Useful when testing new user workflows
  4. Password: Generate random password based on the character length specified

How to import a function?

  1. Navigate to the input step where you want to generate dynamic data to be used
  2. Click the step name or the > icon to open the step configuration details
  3. Click the + and select Add a function. Add a function to the test
  4. Select the appropriate option from the list to generate dynamic data. In the below example, Email to generate random email with example.com domain Select and create a function

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

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle