Skip to content

CBRL — Samples

These are the samples for the CBRL — Requirements Language guide. See also Short info and the tutorial.

Use the requirement statement: A confirmed reservation must not cause confirmed seats to exceed a flight’s capacity.

  1. Link the obligation to the seat-allocation domain concept and the Traveler reservation story.
  2. Add a case with capacity 2, confirmed seats 1, requested seats 1. Expect confirmation.
  3. Add a case with the same initial state and requested seats 2. Expect refusal and an unchanged confirmed-seat count.
  4. Review what the traveler sees on refusal and record that as an explicit acceptance criterion.

The pair tests the intended boundary. Running it against a real implementation is a further step; parsing the requirement checks its representation.

For a concrete model file, download the travel-booking checkpoint and follow the travel-booking tutorial. The checkpoint is cumulative and may contain earlier model stages.

These four exercises are lesson briefs. Their dedicated CtxBazaar recipes and browser launch actions are planned; see Learning with models for available downloads and the meaning of each result.

Exercise Try this Expected observation
Capacity obligation Specify that confirmed bookings never exceed a flight’s available seats. The requirement names a subject, a condition and an observable outcome.
Two boundary cases Add examples for the last available seat and for an already full flight. The allowed and rejected cases differ by one relevant input.
Trace to intent Link the capacity requirement to its Booking aggregate and reservation story. A reviewer can follow the obligation back to both domain and user intent.
Replace a vague promise Rewrite “confirmation is quick” with an explicit timing boundary and fixture workload. A reviewer can state what would falsify the promise; runtime proof still needs a measuring runner.
Artifact Description
Gherkin scenarios Acceptance criteria converted to .feature files
Unit tests Test cases converted to runnable test functions
Aspect-specific tests Additional tests for each tagged aspect
Traceability matrix Bidirectional mapping between requirements, aggregates, and stories