Monday, April 14, 2014

Agile in a Flash 22

Acceptance Test Design Principles The Plan
Agile in a Flash by Jeff Langr and Tim Ottinger (card #22)

Well- designed acceptance tests are

> Abstract
> Bona fide
> Cohesive
> Decoupled
> Expressive
> Free of duplication
> Green--

Acceptance tests (ATs) are as enduring and important an artifact as your code. Their proper design will minimize maintenance efforts.
Abstract A test is readable as a document describing system behavior. Amplify your test’s essential elements, and bury its irrelevant details so that nontechnical staff can understand why it should pass.
Bona fide To ensure continual customer trust, a test must always truly exercise the system in an environment as close to production as possible.
Cohesive A test expresses one goal accomplished by interacting with the system. Don’t prematurely optimize by combining multiple cases into one test.
Decoupled Each test stands on its own, not impacted by or dependent upon results of other tests.
Expressive A test is highly readable as documentation, requiring no research or analysis from its readers. Name it according to the goal it achieves.
Free of duplication Duplication increases risk and cost, particularly when changes to frequently copied behavior ripple through dozens or more tests.

Green Once a story is complete, its associated ATs must always pass. A failing production AT should trigger a stop-the-production-line mentality.

No comments:

Post a Comment