Visual Specification By Example

New Thinking 3 November 2014 Nigel Charman

The discussion of examples reveals misunderstandings and uncertainty early in the process, leading to a higher quality solution with fewer defects and a significant reduction in rework costs. Automating the examples can help development teams automatically check when the examples are implemented, and be used for checking of regressions.

In some cases, visualisations provide a powerful way to concisely discuss examples. A picture really can be worth a thousand words.

However, the current tools for documentation and automation of examples rely on text format or tables to describe the examples. If visualisations are the best way to discuss the examples, why not carry those through the documentation and automation?

Discussing the examples

A great way to discuss the specific examples of desired behaviour is to collaborate around a whiteboard.

Often, teams converge on visual structures to describe their examples, especially when describing complex business rules. Here’s a team describing a Theoretical Standards Grading System...

This proof of concept was developed using SVG diagrams with the Concordion tool.

We’re keen to see this concept developed further and extended to other tools.

Key takeaways

While the Given-When-Then (Gherkin) format helps us consider the context, action and outcome of scenarios, it easily becomes bloated and difficult to read.

In some cases, visualisations reduce our cognitive load, increasing our capacity for understanding and proving the old adage “a picture is worth a thousand words”.

Don’t be frightened to use alternative techniques to explore and document your scenarios.

When automating, explore the boundaries of your tool and then break them!

To find out more about Specification by Example, see our other thoughts and resources, or better still, request details of our training course and mentored learning.