mabl now supports Faker.js v10 for generating random test data, including support in API tests!
Supported versions
mabl supports Faker.js v6 and v10. Intermediary versions (v7, v8, v9) are not supported.
Faker upgrade
Faker v10 introduces reorganized modules with updated naming. For example, fake.name.firstName becomes fake.person.firstName, and fake.address.city becomes fake.location.city. You also get access to new data modules.
| New module | Example |
|---|---|
| Airline | {{fake.airline.flightNumber}} |
| Books | {{fake.book.publisher}} |
| Food | {{fake.food.ingredient}} |
See the Faker.js v10 documentation for the full list of available modules.
Faker expressions in API tests
Previously, if you wanted to generate random test data in a mabl API test, you had to use Postman dynamic variables. With this update, you can also use the {{fake.type.substype}} syntax to generate realistic data directly in API test request bodies, headers, and parameters.
Learn more
To learn more about supported data categories, check out the official Faker.js v10 documentation.
To learn more about how to use Faker values in your mabl tests, check out the articles on valid expressions and API test variables.