Skip to main content

GOV 05 TESTING

This page embeds the canonical rule text and adds commentary after each section to explain why the section exists.

Governance: Testing

Commentary: Ensures implementation is validated by evidence, not assumptions.

Core Testing Principle

Tests are proof of claims, not ceremony.

Each important claim should map to verifiable evidence.

Commentary: Ensures implementation is validated by evidence, not assumptions.

Test Design Standards

  • prefer behavior-focused tests over implementation-detail tests
  • include success and failure paths
  • include edge cases for high-risk logic
  • keep tests deterministic and repeatable

Commentary: Ensures implementation is validated by evidence, not assumptions.

Testing Layers (use what fits scope)

  • Unit: isolated logic correctness
  • Integration: component boundaries and contracts
  • End-to-end: user-critical workflows
  • Regression: prevent behavior drift

Not every change needs every layer, but critical paths must be covered.

Commentary: Ensures implementation is validated by evidence, not assumptions.

Test-to-Intent Traceability

For governed delivery, link tests back to:

  • OpenSpec requirement IDs,
  • acceptance criteria,
  • or explicit behavior statements.

OpenSpec-first rule:

  • if required behavior is not represented in OpenSpec, add/update requirement IDs before marking coverage complete.

Commentary: Ensures implementation is validated by evidence, not assumptions.

Execution Expectations

  • run targeted tests during iteration
  • run appropriate regression checks before completion
  • capture failing output when blocked
  • avoid marking complete without evidence

Commentary: Captures a specific delivery control so contributors and agents apply this rule consistently.

Test Quality Anti-Patterns

  • flaky tests accepted as "good enough"
  • broad snapshot assertions without intent
  • coverage metrics used without behavioral relevance
  • tests that pass but do not prove the requirement

Commentary: Ensures implementation is validated by evidence, not assumptions.