Knowledgebase

Writing Tests That Are Worth Running Print

  • devopsinfrastructure, devops, troubleshooting, guide, howto, solution, zillionkinghost, hosting
  • 0

Useful automated checks.

WHAT TO TEST FIRST

The paths that matter most Anything involving money Anything that has broken before Authorisation and access control

WHAT MAKES A TEST VALUABLE

It fails when something is genuinely wrong It passes reliably otherwise It is fast It says clearly what broke

WHAT MAKES A TEST WORTHLESS

It fails intermittently for no reason It tests the framework rather than your code It requires constant maintenance for no benefit

WHAT AN INTERMITTENT TEST COSTS

Trust in the whole suite.

People start ignoring failures.

WHAT TO DO ABOUT ONE

Fix it or remove it. Never leave it.

WHAT MAKES TESTS PAINFUL

Dependence on external services Dependence on timing Shared state between tests

WHAT TO DO ABOUT THOSE

Substitute external services Make each test independent Reset state between tests

WHAT NOT TO CHASE

Complete coverage of everything.

WHAT TO AIM FOR

Confidence to deploy without manual checking.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot