Knowledge Domain Database - Testing & QA
How does the domain work before writing a line of code? Choose a document from the left tree: each page explains part of the model.
Business Rules - Testing & QA
This document lists the fundamental business rules of the Testing & QA domain, identified with a unique BR-NNN code. Each rule is technology-independent and describes an invariant constraint on the software quality verification process.
---
BR-001 - Every TestCase has a verifiable oracle
Code: BR-001
Name: A TestCase defines an unambiguous expected outcome
Description: Every test case has an explicit test oracle (the expected outcome) and assertions that verify it, typically in Arrange-Act-Assert structure. A test without meaningful assertions or without an expected outcome verifies nothing.
Motivation: Ensure a test fails when behaviour is wrong and passes when it is correct.
Priority: HIGH
Actors: QA Engineer, Test Automation Engineer
Traceability: glossary "Test Oracle", "Assertion", "Arrange-Act-Assert (AAA)"; BC-01.
---
BR-002 - The suite respects the test pyramid
Code: BR-002
Name: The test distribution follows the pyramid (many unit, few E2E)
Description: A TestSuite favours a wide base of fast unit tests, an intermediate level of integration tests and a small tip of end-to-end tests. Inverting the pyramid (many slow E2E) is an anti-pattern to avoid.
Motivation: Maximise feedback speed and reliability while minimising fragile tests.
Priority: HIGH
Actors: QA Engineer, Test Automation Engineer
Traceability: glossary "Test Pyramid", "Unit Test", "End-to-End Test (E2E)".
---
BR-003 - Flaky tests are fixed or isolated
Code: BR-003
Name: A Flaky Test does not stay in the gate suite
Description: A test that passes and fails non-deterministically erodes trust in the suite. It must be fixed (removing the source of non-determinism) or temporarily isolated and tracked, never silently ignored.
Motivation: Preserve trust in results and the gate's ability to block real regressions.
Priority: HIGH
Actors: Test Automation Engineer, QA Engineer
Violation: a suite with non-isolated flakies is not reliable as a release gate.
Traceability: glossary "Flaky Test"; events/domain-events.md event RegressionDetected.
---
BR-004 - Every defect is recorded as a traceable BugReport
Code: BR-004
Name: A detected Defect (Bug) generates a reproducible BugReport
Description: Every defect is recorded with reproduction steps, expected and observed behaviour, severity and environment. A non-reproducible bug is triaged to obtain information, not silently closed.
Motivation: Make every defect manageable, prioritisable and verifiable at closure.
Priority: HIGH
Actors: QA Engineer, Developer
Traceability: glossary "Defect (Bug)"; state-machines/bug-report-lifecycle.md; BR-007.
---
BR-005 - Modified code is covered by a regression test
Code: BR-005
Name: A fix includes a regression test that captures the defect
Description: When a BugReport is resolved, a RegressionTest that fails before the fix and passes after is added to the suite. This prevents the same defect from returning.
Motivation: Prevent the regression of already-fixed defects.
Priority: HIGH
Actors: Developer, Test Automation Engineer
Traceability: glossary "Regression Test"; state-machines/bug-report-lifecycle.md verified state; BR-004.
---
BR-006 - Coverage is meaningful, not just numeric
Code: BR-006
Name: The CoverageReport measures tested behaviour, not just executed lines
Description: Coverage is a tool, not a goal: a threshold acts as a guardrail but high coverage with weak assertions does not protect. Edge cases, equivalence partitions and negative scenarios are prioritised.
Motivation: Avoid the false security of high but empty coverage.
Priority: MEDIUM
Actors: QA Engineer, Developer
Traceability: glossary "Code Coverage", "Boundary Value Analysis", "Equivalence Partitioning", "Negative Test".
---
BR-007 - A release passes only with a green quality gate
Code: BR-007
Name: A release requires a green TestSuite and no open blocking bugs
Description: The ReleaseGate is passed only when the suite is green, coverage respects the threshold and no blocking-severity BugReport are open. A failed gate blocks the release.
Motivation: Ensure only verified software reaches production.
Priority: HIGH
Actors: Release Manager, QA Engineer
Violation: release blocked until the gate is green.
Traceability: glossary "Smoke Test", "Quality Assurance (QA)"; events/domain-events.md event ReleaseGatePassed.
---
BR-008 - Tests are independent and repeatable
Code: BR-008
Name: Every TestCase is isolated and does not depend on execution order
Description: Tests do not share mutable state nor depend on the outcome of other tests. Each sets up (Fixture) and cleans up its own context, so it can run in isolation and in parallel with a deterministic outcome.
Motivation: Guarantee repeatable, parallelisable results, prevent flakiness from coupling.
Priority: HIGH
Actors: Test Automation Engineer, QA Engineer
Traceability: glossary "Fixture", "Test Fixture", "System Under Test (SUT)"; BR-003.