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.factory :example_request, naming: :json do name { Faker::Name.name } building_number { Faker::Address.building_number } street_name { Faker::Address.street_name } city { Faker::Address.city } country { Faker::Address.country } end Which can be called to create a request body like this: ...