Awesome Reviewers

Verification · Testing

Unit and integration tests

Example-based tests that run the code and assert on behaviour, from single functions up to services with real dependencies.

Sub-techniques

  • Unit tests V1019.001

    Fast, isolated tests per function or class.

  • Integration tests with real services V1019.002

    Run against real databases and queues in containers instead of mocks.

  • Regression test per bug V1019.003

    Every fixed bug gets a test that failed before the fix.

  • Coverage gate V1019.004

    Fail when coverage of changed lines drops below a threshold.

How to build it

  1. Write the failing test before the fix for every bug.
  2. Run integration tests against containers, not mocks, for storage and messaging code.
  3. Gate on coverage of changed lines, not overall coverage.

Signals in a repository

  • tests/ or *_test.* files, plus test config in pyproject.toml, jest.config or vitest.config.
  • A CI test job and a coverage upload step.