liveBook · Manning

Test specification

As explained in Test Driven: Practical TDD and Acceptance TDD for Java Developers

A view of software tests as executable representations of requirements, such that passing them indicates conformity to the specified requirements.

A test specification treats executable tests derived from requirements as checks that a system conforms to those requirements. Turning requirements into tests can reduce ambiguity and leave developers less room for interpretation. section 1.4.3

Executable tests can offer practical advantages:

  • Automated checks speed up feedback compared with manually run test cases. section 1.4.3
  • They make test execution more reliable and remove one translation step. section 1.4.3

Passing tests would imply conformity only with perfect coverage, which is rare in real projects. Missed tests and skipped checks can let defects through, so tests as specification are useful but not a silver bullet. section 1.4.3

How Test Driven: Practical TDD and Acceptance TDD for Java Developers covers it

How deep it goes
Defines the principle and its coverage caveat, but does not work through a specific test or implementation.
Examples
Uses written requirements and executable checks of system conformity as its illustrative scenario.
What you can do after
Understand how executable tests can represent requirements and how incomplete coverage limits that claim.
How it connects
Connects requirements specifications, executable testing, and test coverage.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Test Driven: Practical TDD and Acceptance TDD for Java Developers. The section links point to the parts of the book it draws on.