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

Why we wrote Herodotus

We’ve written Herodotus1 as a lightweight logger to solve some very specific problems we had in our tests, but we don’t think they are unique to us so we’re going to share with you what we have done and why. Logging to the standard output and the main problem we faced The problem we are trying to solve is one of readability. All good logs are human readable, as when something has gone wrong to the point of a human needing to look in the logs and piece together what has happened we don’t want to make that more difficult than is needed....

May 17, 2023 · 11 min · 2156 words · George Bell

Testing Standard-Out in Ruby

Testing what a Ruby process writes to STDOUT. Ruby’s relationship with STDOUT Ruby has two built-in values that represent the system’s standard output stream: The constant STDOUT The global variable $stdout The Ruby documentation, describes STDOUT as the standard output, and $stdout and the current standard output. If you want to change the stream that this Ruby process sends its output to, you can change the value of $stdout Hello StringIO Given an RSpec test pack, I should be able to use an output matcher, but I couldn’t get this to reliably work across tests for my system....

May 15, 2023 · 1 min · 142 words · Nigel Brookes-Thomas

Improving our dead-letter queues

Introduction Dead letter queues (DLQ) are often used to catch items that have not been successfully processed or delivered when using queue 1 based integration patterns. Typically engineering teams will want to be alerted quickly to the presence of items on a dead letter queue so they can do something about it e.g. redrive messages back to a source queue, inspect the messages for further understanding of an issue etc....

March 10, 2023 · 10 min · 2084 words · Tom Collins

Working with JSON Schema

Over the last few years we’ve invested in tooling and processes that make heavy use of JSON Schema. What is JSON Schema? JSON Schema is a standard vocabulary that allows developers to describe data formats. At the DVLA we use these definitions in various ways e.g. to generate human friendly documentation, to generate code based on the models, to describe parts of our API interfaces and to validate data objects....

October 25, 2022 · 4 min · 758 words · Tom Collins