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 Chaos Mode Update

TL:DR Level up your testing by introducing some chaos to your test data. FakerMaker is an incredible factory builder used to generate test data. When introduced to a test-pack (alongside Faker), it elevates tests by introducing dynamic test data to ensure we’re not constantly testing with the same old boring static data. FakerMaker.factory :some_fancy_object, naming: :json do some_required_attribute { Faker::Lorem.sentence } some_optional_attribute_1 { Faker::Lorem.word } some_optional_attribute_2 { Faker::Lorem.word } some_optional_attribute_3 { Faker::Lorem....

June 16, 2023 · 4 min · 672 words · Alexander O'Mahoney

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