Skip to content

Commit

Permalink
Update TESTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
countable authored Jan 9, 2024
1 parent 5200106 commit bbc9156
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions developers/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ To establish how and why we do testing at Countable.
Currently covers basic testing principles and bug reporting procedures.

## Testing Principles

The goals are to write as few tests as possible for maximum coverage of real world usage (not code coverage).

- When you add a new API or page, write a test in the same commit right away. Or even consider TDD.
- We want our tests to run fast so we are encouraged to run them often.
- Write tests to increase confidence that our customers' experience will be good.
- To exercise important flows like signing up, purchasing, core product experience.
- Prefer e2e tests, the highest possible level, over unit tests (most of the time).
- Aim to have full coverage of all API endpoints and pages with e2e tests, which are quick to write and are closest to real customer behaviour.
- Tie test cases to unchanging real world business logic and inputs, not implementation. This prevents their need to be rewritten during refactors.
- Keep your test scenarios and code as similar as possible to real usage. Your tests should run the backend server, load actual client pages (like selenium would), and flip a switch to trigger test mode in your front end template.

Expand Down

0 comments on commit bbc9156

Please sign in to comment.