Generate dynamic data for every test run with functions
Create reliable tests with dynamic inputs
Functions play a crucial role in facilitating tests with diverse inputs for each run. 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 enables you to easily generate a unique email for each test run.
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 eg:- Generate 10 digit random number to input in mobile number field
- Email - Generates 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 on the step name or the “>” icon to open the step configuration details
- Click on “+” and select “Add a function”
- Select 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!