Use Faker Data in Generate Scenario
The AI Test Engineer uses faker.js to generate fake test values for your scenarios. To use Faker data, replace your example parameter values with {{api.method}}
from faker.js, omitting the faker
prefix.
For example:
{{person.firstName()}}
- Generates a random first name.{{person.lastName('male')}}
- Generates a random last name for a male.{{location.zipCode()}}
- Generates a random zip code.{{internet.userName()}}
- Generates a random username.{{internet.email()}}
- Generates a random email address.{{phone.number()}}
- Generates a random phone number.{{company.name()}}
- Generates a random company name.{{date.past()}}
- Generates a random date in the past.{{commerce.price()}}
- Generates a random price value.{{finance.accountNumber()}}
- Generates a random bank account number.
Next, use AI Generate Scenario to generate test automation code for the updated scenario. You can skip this step if you have already generated the code using AI Generate Scenario or Recorder.
During test runs, the test data will automatically vary based on the Faker API methods used, enabling dynamic and varied test execution.