ShtukbaseStandard
package page→ /quality/tests.md

pages/quality/tests.md

71 lines, 3.7 KB. As a page.

  1. ---
  2. type: Collection
  3. title: "Quality tests"
  4. icon: "🧪"
  5. 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."
  6. itemType: QualityTest
  7. items: {mode: path, path: /quality/tests, recursive: false}
  8. writeTo: /quality/tests
  9. properties:
  10. code: {kind: text, label: "Code", pinned: true, required: true}
  11. status: {kind: phase, contour: /quality/contours/tests, label: "State", required: true}
  12. level:
  13. kind: select
  14. label: "Level"
  15. options:
  16. - {name: "1", label: "1 - model stub", color: gray}
  17. - {name: "2", label: "2 - real model", color: blue}
  18. - {name: "3", label: "3 - console and procedures", color: purple}
  19. - {name: "4", label: "4 - the window through the user's eyes", color: green}
  20. how:
  21. kind: select
  22. label: "How it runs"
  23. options:
  24. - {name: auto, label: "Automated test", color: green}
  25. - {name: browser, label: "Browser agent", color: blue}
  26. - {name: manual, label: "By hand", color: orange}
  27. test: {kind: text, label: "Where the test is (path::name)"}
  28. testState:
  29. kind: select
  30. label: "Why there is no test path"
  31. options:
  32. - {name: unmerged, label: "Written, not in main yet", color: blue}
  33. - {name: manual, label: "Manual check", color: orange}
  34. - {name: missing, label: "There is no test yet", color: red}
  35. risks: {kind: relation, collection: /quality/risks, multiple: true, label: "Catches risks"}
  36. indicators: {kind: relation, collection: /quality/indicators, multiple: true, label: "Measures indicators"}
  37. requirements: {kind: relation, collection: /product/requirements, multiple: true, label: "Proves requirements"}
  38. scenarios: {kind: relation, collection: /product/scenarios, multiple: true, label: "Proves scenarios"}
  39. threshold: {kind: text, label: "Threshold"}
  40. thresholdSource:
  41. kind: select
  42. label: "Where the threshold comes from"
  43. options:
  44. - {name: contract, label: "Contract and customer documents", color: green}
  45. - {name: ours, label: "Set by us", color: orange}
  46. owner: {kind: relation, collection: /business/people, label: "Responsible"}
  47. views:
  48. - id: tests--table
  49. name: All tests
  50. layout: table
  51. fields: {}
  52. sorting:
  53. - {propertyId: code, direction: ascending}
  54. properties:
  55. - {name: code, visible: true}
  56. - {name: title, visible: true, width: 420}
  57. - {name: status, visible: true}
  58. - {name: level, visible: true}
  59. - {name: how, visible: true}
  60. - {name: risks, visible: true}
  61. ---
  62. 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.
  63. **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.
  64. **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.
  65. **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.
  66. 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).