Practical Guidelines For Writing Great Tests In Imperative-styled Programming Languages (e.g Go, Python, Rust, JavaScript)
All common issues with tests from flaky tests to brittle and tests can all be traced back to either coupling or dangling side-effects.
There are several types of coupling that can affect tests as follows:
- Temporal coupling (timing cross-dependencies e.g. race conditions)
- Stamp/Common coupling (state share/ownership cross-dependencies e.g. 2 or more test cases sharing the same stub or mock references)