Spec:

Summary

This suite uses Selenium and Mocha, in JavaScript, to test on . It automates manual test cases from that cover .

Scope

This spec covers <tests/.../file.test.js> only: the scenarios it runs, the selectors and data it uses, and the criteria for it to pass.

Out of scope: <what is deliberately not tested here, and where it is tested instead, for example at the API layer, or manually>.

Principles and rules

  • <tests/.../file.test.js> is the implementation. This file is the specification. They must agree exactly. If they ever disagree, that is a defect in one of them: fix it before doing anything else.
  • Every test makes real assertions, and each has been seen to fail when the behaviour is wrong.
  • Only synthetic test data is used. Any NHS numbers are from the 999 test range.
  • <Any other rule specific to this suite, for example "runs against the test environment only, never production".>

Detail

    • Given
    • When
    • Then
    • Selectors: <selector>
    • Data: <data>
    • Assert:
    • Manual test case:
    • Hazards and safety controls: <hazard log ids, or "none">
    • ...

Acceptance criteria

  • All tests above pass against .
  • The suite runs in CI on every pull request.
  • <Any timing or reliability criteria, for example "passes 50 times in a row with --repeat-each=50".>
  • <Known issues that make it fail for reasons unrelated to the code, with dates.>

Sources

  • <Requirements, user stories, or interface specifications used>

View this document on GitHub practice-repo/spec/index.md