What we think about testing
What we consider important
- Tests are first class citizens
- Tests should be runnable locally (shift left)
- Testing frequently must not slow you down (treat as production code)
- Testing should feel like a help
- Tests lead to maintainable code
Treat tests as production code
You want the tests to have the same quality as the production code.
This means that you should give the same attention to the tests as you do for the production code.
This also means that you should refactor the tests when you refactor the production code.
Shift-left on testing
How do we achieve this?
Vast majority of the tests are runnable locally. We place high emphasis on testing the behaviour of the components in isolation.
Integration tests between components and cloud services are in part done via mocking and in part in the cloud.
Tests should feel like a help
One benefit from doing above is that we can have fast development—test cycles due to most of the tests being runnable locally.
By having this "test button" to press, it feels safer to experiment with the code.
No particular focus on code coverage
We strive to test what is important with regard to the software architecture and the behavioural requirements.