Testing - Pt 5 - Running Tests

Be "realistic":

  1. Prefer running tests on a representative set-up using real code rather than using fakes.
  2. Try and run your tests out of container, so the software is run in as close to production set-up as possible.
  3. 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:

  1. Tests written by one person can easily be accessed by another, i.e. version controlled.
  2. No tedious, error prone work getting tests into version control, single button commit.
  3. Can they run on computers other than your dev machine?
  4. If it's not automated, it's not repeatable.

Integrate with the build system:

  1. 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.
  2. 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