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

TiL: Take full-length screenshots using DevTools

TL:DR Capture full-length webpage screenshots using built in Developer Tools. Sometimes when developing a webpage you may need to send screenshots back and forth between members of your squad or business. When doing this it is important that you capture the full webpage in order to really display what you’re working on. Which is why introducing simple devtools may be of use. In order to do this you will need to firstly open your browser of choice and navigate to the page you would like to capture....

July 12, 2023 · 5 min · 903 words · Iestyn Green

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

Efficient Cucumber Step Regex Matching

TL:DR Avoid using Cucumber Expression if possible. Using the conventional regular expression Cucumber is key to more flexible, reusable and customisable test code. When writing cucumber step definitions, developers and testers often face difficulties capturing parameters in test steps while ensuring that the steps flow smoothly in natural English sentences. Without a good knowledge of general regex, step definitions can appear clunky, even when using Cucumber Expressions to capture step definitions parameters....

June 7, 2023 · 7 min · 1380 words · Choon Meng Yap

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