TiL: Generating numerous FakerMaker objects in one call

Trying to generate numerous, realistic-looking objects for automation testing can be difficult. Using FakerMaker to do just that is preferable; using factories with Faker to dynamically create the test data you need in whatever format you need, is far better than using fixtures. But what if you needed more than one object of the particular factory that you have created? Creating a factory We can use Faker and FakerMaker to create an individual factory for an API request body like this:...

August 22, 2023 · 2 min · 309 words · Tomos Griffiths

FakerMaker Initialisation

In the world of automation testing, generating realistic-looking test data is a preferred approach to using static fixtures. FakerMaker is a Ruby gem that allows you to do just that; using factories to create the test data you need. It can be used with Faker to dynamically generate test data. Initialisation We can use Faker and FakerMaker to create a factory for an API request body like this: require 'faker' require 'faker_maker' FakerMaker....

May 17, 2023 · 2 min · 333 words · Mark Isaac