package page→ /quality/tests.md
pages/quality/tests.md
71 lines, 3.7 KB. As a page.
- ---
- type: Collection
- title: "Quality tests"
- icon: "🧪"
- description: "Tests that hold quality: which risk they catch, which indicator they measure, at which level they run, where the test code lives and what the threshold is."
- itemType: QualityTest
- items: {mode: path, path: /quality/tests, recursive: false}
- writeTo: /quality/tests
- properties:
- code: {kind: text, label: "Code", pinned: true, required: true}
- status: {kind: phase, contour: /quality/contours/tests, label: "State", required: true}
- level:
- kind: select
- label: "Level"
- options:
- - {name: "1", label: "1 - model stub", color: gray}
- - {name: "2", label: "2 - real model", color: blue}
- - {name: "3", label: "3 - console and procedures", color: purple}
- - {name: "4", label: "4 - the window through the user's eyes", color: green}
- how:
- kind: select
- label: "How it runs"
- options:
- - {name: auto, label: "Automated test", color: green}
- - {name: browser, label: "Browser agent", color: blue}
- - {name: manual, label: "By hand", color: orange}
- test: {kind: text, label: "Where the test is (path::name)"}
- testState:
- kind: select
- label: "Why there is no test path"
- options:
- - {name: unmerged, label: "Written, not in main yet", color: blue}
- - {name: manual, label: "Manual check", color: orange}
- - {name: missing, label: "There is no test yet", color: red}
- risks: {kind: relation, collection: /quality/risks, multiple: true, label: "Catches risks"}
- indicators: {kind: relation, collection: /quality/indicators, multiple: true, label: "Measures indicators"}
- requirements: {kind: relation, collection: /product/requirements, multiple: true, label: "Proves requirements"}
- scenarios: {kind: relation, collection: /product/scenarios, multiple: true, label: "Proves scenarios"}
- threshold: {kind: text, label: "Threshold"}
- thresholdSource:
- kind: select
- label: "Where the threshold comes from"
- options:
- - {name: contract, label: "Contract and customer documents", color: green}
- - {name: ours, label: "Set by us", color: orange}
- owner: {kind: relation, collection: /business/people, label: "Responsible"}
- views:
- - id: tests--table
- name: All tests
- layout: table
- fields: {}
- sorting:
- - {propertyId: code, direction: ascending}
- properties:
- - {name: code, visible: true}
- - {name: title, visible: true, width: 420}
- - {name: status, visible: true}
- - {name: level, visible: true}
- - {name: how, visible: true}
- - {name: risks, visible: true}
- ---
- A quality test is a check that holds the quality of a product: it catches a [risk](/quality/risks.md), measures an [indicator](/quality/indicators.md) or proves a requirement. One record is one test. The test code itself lives in the product's repository; here is why it exists, at which level it runs and where to find it.
- **How to add one.** The file name is `t-<what it checks>.md`, the code is `QT-<number>`. Write at once which risk or indicator the test holds, its level and how it runs. Example: "The agent does not send an email without a human's confirmation", level 2, automated test, catches the risk of publishing outward.
- **Where the test is.** `test` is the path to the file and the name of the test: `tests/acceptance/leads/kp.test.ts::email waits for confirmation`. If there is no path, `testState` says why: the test is not yet in `main`, the check is manual, or there is no test yet.
- **Threshold.** If the test compares a number, the threshold is written in `threshold`, and `thresholdSource` says where it comes from: from the contract or set by us.
- How we test: [How to test](/quality/how-to-test.md). How to read coverage: [Coverage](/quality/coverage.md). States are in the [tests contour](/quality/contours/tests.md).