A complete loop for defining, generating, running and gating tests: - qa/: scenario-card template + examples (API/UI/binding), the Claude generation prompt, and a QA runbook tying it together - e2e/CLAUDE.md: conventions that keep AI-generated tests consistent - run-tests.ps1: one runner for every layer (backend/api/web/ui/binding), logs per run under .testlogs/, JUnit output, evidence report, and a re-seed guard against stale demo data - .githooks/ + scripts/install-hooks.ps1: pre-commit secret scan and pre-push unit tests (shift-left before CI) - evidence report now captures each API call's request, payload and response (Authorization redacted); JUnit reporter added for CI - scripts/db.mjs: db:check freshness guard Azure DevOps pipeline deferred; the runner already emits JUnit + the evidence report for any CI to publish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
782 B
YAML
29 lines
782 B
YAML
id: BOOK-012
|
|
title: The last seat cannot be oversold to two agents at once
|
|
layer: binding
|
|
area: Booking and cancelling
|
|
risk: high
|
|
owner: qa
|
|
|
|
preconditions:
|
|
- signed in as agent@skyline.test / skyline
|
|
- a flight with exactly 1 seat remaining
|
|
|
|
steps:
|
|
given: a flight showing "1 left"
|
|
when: two bookings for that flight are confirmed at the same moment
|
|
then: one succeeds (201 with a PNR), the other is refused (409), and seats reach 0
|
|
|
|
evidence:
|
|
- the POST /api/bookings request and response for BOTH attempts
|
|
- the seat count before and after (recorded data)
|
|
- screenshot of the 409 "just sold" message on the losing attempt
|
|
|
|
data:
|
|
route: JFK -> LHR
|
|
passengers: 1
|
|
|
|
must_not:
|
|
- the flight must never show negative seats
|
|
- both bookings must never both succeed
|