
Specification by example
by Gojko Adzic · first published 2011
5mentions
2recommended by
5HN commenters
2018–2025first – last mentioned
40% recommend60% neutral
Why HN recommends it
Practical guide to agile specification using concrete examples to align business, testers and developers. It covers writing testable specs and introducing BDD on teams.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.
I'm rather fond of a book, Specification by Example by Gojko Adzic, that's partially a manifesto for, and partially a guide to, doing this.
on “The Servers Are Burning” ↗Hello HN, I'd like to share an idea and a library that implements it. As a fan of "Specification by Example" (as described in Gojko Adzic's renowned book), I faced numerous challenges trying to introduce these ideas at work or in hobby projects. Surprisingly, the most challenging part was writing specifications…
on “Show HN: Testified Documentation” ↗…but are more for describing active work in short term. BDD is almost a poisoned term at this point because it’s become associated with tooling and opinionated holistic processes. But if you think of Specification by Example as readmes with a Given-When-Then structuring, then you have a strategy (document before writing) combined with a language definition to assure your strategy is executed at the right level of detail.…
on “Readme-Driven Development (2010)” ↗…is extra effort if the Cucumber files themselves aren't used/read elsewhere. -- It'd be simpler to embed "Given/When/Then" statements within test code (like RSpec). I'd emphasise that Gojko Adzic's "Specification By Example" suggests discussing examples before refining to a specification; that may get around the author's complaint that non-table formats don't allow for important cases. That said, "Given/When/Then" is hardly…
on “The Tragedy of Given-When-Then” ↗…substitute for a clear specification, well-chosen examples make specs far easier to grasp. I recommend reading Gojko Adzic’s thoughts on this (https://www.linkedin.com/in/gojko/). He’s the author of Specification by Example. He argues that identifying and refining key examples is a great way to raise the quality of documentation and shared understanding.
on “Examples are the best documentation” ↗