Technology
— 27th October 2023
Given, When and Then helper classes for testing

Share article
Our recent Medium post introduces a method of organising test code into shared, reusable chunks, enabling complex tests to be expressed in a terse English-like fashion. It demonstrates creating a class for each of the 'Given, When and Then' from the popular Gherkin Syntax. These classes provide a fluent interface to chain test steps together without bringing in additional dependencies and remaining unopinionated about test or assertion frameworks.
Andrew Poole, L5 Senior Software Engineer at ClearBank