From bbc9156be0007a684ae589096061514973bcb7bc Mon Sep 17 00:00:00 2001 From: Clark Van Oyen Date: Mon, 8 Jan 2024 23:59:06 -0800 Subject: [PATCH] Update TESTING.md --- developers/TESTING.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/developers/TESTING.md b/developers/TESTING.md index 5b7a56ea7c..7744409e40 100644 --- a/developers/TESTING.md +++ b/developers/TESTING.md @@ -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.