Generate synthetic data
Generate random test data with the built-in faker object for names, emails, numbers, and more.
In Maestro, you can use the built-in DataFaker integration to generate dynamic, randomized data for your test. This is useful for bypassing unique-field constraints (like sign-up forms) and creating realistic testing environments without manual data entry.
The faker object
Maestro provides a global faker object available within the JavaScript engine. This object is a wrapper around the DataFaker library and follows the same usage patterns and providers found in its Java documentation.
DataFaker
For additional information about DataFaker, check its documentation.
Common data providers
The faker object provides access to a wide variety of data types, ranging from standard user information to specialized domains.
Providers available
Check the DataFaker to see all Fake Data Providers.
Basic identity data
Generate standard user information for forms:
First Name:
faker.name().firstName()Full Name:
faker.name().fullName()Credit Card:
faker.finance().creditCard()or via expression:faker.expression('#{finance.creditcard}')
Numbers
Generate random ranges or specific number patterns:
Between Range:
faker.expression("#{number.numberBetween '1' '10'}")Digits:
faker.number().digits(5)
Placeholder
DataFaker also supports "fun" providers for non-critical placeholder text:
Lord of the Rings:
faker.lordOfTheRings().character()orfaker.lordOfTheRings().location()
Usage examples
You can use faker within evalScript to store values in the output object, or directly inside UI commands.
Using expressions allows you to combine multiple faker providers into a single string:
Last updated