liveBook · Manning

Specification layer

As explained in BDD in Action, Second Edition

A specification layer is the architectural layer of a test automation system that expresses important workflows, business rules, and usage examples in stakeholder-readable form.

The specification layer is the top layer of a test automation system. It captures stakeholder-important workflows, business rules, and usage examples in language that stakeholders can understand and read comfortably. section 14.2.1 section 14.4

The layer establishes the boundary between shared business understanding and lower-level automation implementation:

  • It acts as the interface between the automation system and the people accepting the functionality of the system under test. section 14.2.1
  • It expresses business context, rules, workflows, scenarios, actors, and their goals. section 15.0
  • The domain layer models the activities needed to complete its workflows, while the integration layer translates those activities into low-level interactions. section 14.4
  • Cucumber can add business context and support specifications in languages such as French, Spanish, or German; Mocha, Jasmine, and Playwright can also implement the layer. section 14.2.1

Using Journey Mapping

A journey map builds a mental model of system workflows, connects them with external actors and goals, and identifies candidate workflows for automated testing and prioritization. section 14.4

Figure 14.15 Layers of a typical test automation system based on Serenity/JS, with their contents

Use the layered architecture figure to see the specification layer positioned above the domain and integration layers. section 14.2.1

How BDD in Action, Second Edition covers it

How deep it goes
Explains the layer’s responsibility and boundaries, but defers detailed activity modeling and low-level technology interactions to lower layers.
Examples
Uses journey maps, workflows, business rules, usage examples, scenarios, actors, and goals as specification artifacts.
What it assumes
Assumes awareness of stakeholders and system workflows while introducing the layered separation between specifications, domain activities, and integrations.
What you can do after
Build it from scratch by organizing stakeholder-readable specifications above domain activities and technology-specific integrations.
How it connects
Connects layered architecture with Journey Mapping, the domain layer, the integration layer, Cucumber, and the Screenplay Pattern.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of BDD in Action, Second Edition. The section links point to the parts of the book it draws on.