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...

scenario with svg v2

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.

You may also want to read

new-thinking

The Samurai vs the Spice Grinder Mindset

In the October issue of Tea-time with Testers, Test Lead Sunjeet Khokar talks about the path and pressures that led...

More

new-thinking

As testing evolves, you need to evolve too

Like most testers, I didn’t dream of being a tester when I was growing up – I fell into it.

More

new-thinking

Making innovation central to the new normal

With Innovation sounding like a great idea, we’d all support it within our organisations. Staff want to know they’re supported...

More