Resource
Requirement evidence example
Follow one synthetic requirement from its wording through code, tests and documentation to see what counts as evidence that it is met.
On this page
Evidence of completion
A requirement counts as met only when it is linked by evidence to the code, a passing test and the documentation. Follow one credit limit requirement through each link, then apply the same test to your own backlog. The company, requirement and code are synthetic.
1. The requirement
FR-012. Credit limit check. When a sales order would take a customer over their credit limit, the order is held for approval by the credit controller.
Acceptance criteria:
- An order within the limit is released automatically.
- An order that exceeds the limit is held, with the reason recorded.
- Only the credit controller can release a held order.
2. The code
The change is one rule added to the order approval step, and the requirement is named in its commit message: “Hold orders that would exceed the customer’s credit limit (FR-012).”
if (customer.balance + order.total > customer.creditLimit) {
order.hold("Exceeds credit limit", "CREDIT_CONTROLLER");
}
3. The tests
Each test is named against its requirement, so the link from requirement to test is recorded in the test itself.
| Test | Requirement | Checks | Result |
|---|---|---|---|
| TC-SALES-041 | FR-012 | An order within the limit is released | Passed |
| TC-SALES-042 | FR-012 | An order over the limit is held with its reason | Passed |
| TC-SALES-043 | FR-012 | A user without the credit controller role cannot release it | Passed |
4. The documentation
FR-012 is named in the user guide’s section on order approval, along with what a held order means for the sales team.
5. The status
| Requirement | Code | Tests | Documentation | Status |
|---|---|---|---|---|
| FR-012 | FR-012 named in commit | FR-012 named in three passing tests | FR-012 named in user guide | Complete |
| FR-013 | FR-013 named in commit | No test for FR-013 | Not written | Unevidenced |
FR-013 is the other case. Its code exists but is proved by no test, so it stays unevidenced however confident its author is, and the work moves to the next stage only when FR-013 is named by a passing test.