EN
Menu
Framework reference

Run Spec-Based Testing

Cycle 2 regression testing against a human-approved specification baseline, with independent verification and Product Engineer review.

Purpose

Spec-Based Testing is additional automated regression testing at Stage 5 of Cycle 2 against previously human-approved functionality. It supplements unit, integration, functional, and end-to-end tests, lint/static analysis, and human UAT.

Regression testing requires a human-approved baseline. Cycle 1 UAT establishes the first approved product baseline. A specification generated from the same unapproved implementation cannot independently prove business correctness. An implementation agent may document an error and a verifier may confirm that same error. Initial functional acceptance requires human validation; current specifications must not silently overwrite approved expectations.

Responsible participants: Independent verification agent/context, coordinated by the Product Engineer. Inputs: Relevant approved specification baseline, requested-change/current specifications as separate context, authorized application/test access, representative data, and known constraints. Execution requires human authorization. Outputs: Baseline-to-check mapping, observed outcomes, reproducible failures, blockers/ambiguities, and follow-up dispositions.

Cycle 2 regression workflow: approved specifications guide the verification agent; the Product Engineer reviews results and directs corrections, and regression checks repeat as needed before UAT.

Test intent against the real product

Use the approved specification baseline to exercise real workflows, scenarios, and use cases with tools such as Playwright. The implementation agent continuously maintains the current specification, but that current description does not replace the approved regression baseline. Explicit manually authored scripts are not necessarily required. The Product Engineer reviews results and directs corrections; repeat checks after corrective changes. New behavior needs human validation and approval before its relevant specification becomes part of the baseline.

Procedure

1. Establish an independent context. Start with the human-approved specification baseline, separate from the implementation agent's current-specification updates. Confirm scope, legitimate access, and human authorization for test execution.

2. Identify approved behavior at risk. Read the relevant baseline and shared behavior. Use requested changes/current specifications as distinct context for potential impacts. Report ambiguity instead of inventing requirements or treating new functionality as already accepted.

3. Derive regression checks. Cover representative normal, negative, boundary, permission, and state-transition scenarios for previously approved functionality. Trace expected outcomes to approved requirements. Other tests and human review evaluate new behavior; they remain necessary.

4. Exercise the application. Use an authorized environment to operate workflows or interfaces, for example with Playwright. Explicit manually authored scripts are not required. Record unexercisable checks as blocked, never passed; static inspection alone is not behavioral verification.

5. Record evidence. Distinguish Pass, Fail, Blocked, and Needs clarification. Record expected and observed behavior, reproduction information, and permitted evidence. Keep fictional sample results distinct from actual execution evidence.

6. Review with the Product Engineer. Investigate failures, blockers, and unclear requirements. Direct coding agents to correct defects; resolve consequential intent changes with stakeholders. Maintain current specifications without silently rewriting the approved baseline to make failures disappear.

7. Correct and repeat. Repeat affected regression checks after corrections. Return to Architecture Review where corrective changes require it, preserving proportionate review and human-controlled execution.

8. Prepare for UAT and baseline approval. Provide the evidence and unresolved limitations for Cycle 2 Stage 6 UAT. Architecture Review normally occurred at Stage 4. Stakeholders validate requested changes; only after appropriate human approval may the relevant specification changes enter the approved baseline.

Example result record

Specification checkExpected behaviorObserved resultStatusNext action
SPEC-001 / AC-01A request cannot be submitted with missing required fieldsSubmission was prevented and the missing category indicatedPassNone
SPEC-001 / AC-03Only authorized reviewers may decide assigned requestsUnauthorized decision attempt was rejectedPassNone
SPEC-001 / AC-05Rejection requires a reasonRequest entered Rejected with an empty reasonFailCorrect behavior and retest
SPEC-001 / AC-07Requester cannot see another requester's private detailsRepresentative test identities were unavailableBlockedArrange approved test capability

These outcomes illustrate Cycle 2 regression checks against previously human-approved functionality. They are fictional, not evidence from an actual application run.

Completion criteria

Previously approved behavior has documented dispositions; failures, ambiguities, and blockers have explicit handling and relevant retesting. The Product Engineer has reviewed the results for UAT. New/changed behavior has not been silently promoted into the approved baseline; appropriate human validation and approval control that update. Do not overstate coverage or acceptance.

Common problems to avoid

Asking the implementation agent to certify its own output without an independent source of intent; accepting a generated list of tests that were never run; silently treating blocked checks as passes; editing specifications to match accidental behavior; and presenting test success as a replacement for UAT or specialist risk assurance.