Testing Manifesto

Thoughtful Dane’s manifesto for testing within software development teams.

Mindset

Test is in our hearts and minds:

  • All our test code adds value
  • We hold test code to the same high standard as production code 
  • We test before we commit 
  • We test after we merge to main
  • We document how to test 
  • We follow the same approach for all services 

Tools

We use the right tool for the right job:

  • We implement business logic in the domain model and unit test the domain model
  • We integration tests the API and use mocks/stubs to control dependencies
  • We validate configuration parameters and API requests using validation rules
  • We do load test when needed
  • We use manual tests to test the end-to-end flow
Picture stone from Gotland, Sweden, with a message for the future. Copyright Frederik Jensen, 2023,

Consequences

We do not write tests to reach a high code coverage with our tests. Measuring code coverage can be a great tool to see where adding a test can add value. But we only add the test if it adds value. It is often a good idea to write a test when we have discovered and fixed a bug. But we only add a test to our test suite if it adds value.

We do not test the compiler. If we can express the business logic with code that can be verified by the compiler, we do not create tests.

We do not leave testing to testers. Testing is a natural part of the process of writing code. As is writing documentation. We do it because it adds value. We do it only because it adds value.