- Prefer running tests on a representative set-up using real code rather than using fakes.
- Try and run your tests out of container, so the software is run in as close to production set-up as possible.
- If software runs on specific environment, run the tests there too, i.e. integration tests are preceded by a deployment (and implicit test thereof), this in turn implies that deployment should be a button press.
Make then repeatable:
- Tests written by one person can easily be accessed by another, i.e. version controlled.
- No tedious, error prone work getting tests into version control, single button commit.
- Can they run on computers other than your dev machine?
- If it's not automated, it's not repeatable.
Integrate with the build system:
- You tests should run on your dev machine, and the CI server and in QA, each run will give you more confidence in the finished product.
- They should run in CI, probably headless, alongside concurrent executions of the same tests. Do they use the same hardcoded directories; are they listening on the same ports?
← Back to part 4