Session
A more robust approach to unit testing
The most common approach to unit testing is "one class = one unit": for each class, you write a unit test.
But this approach lacks robustness. It produces brittle tests which need to be rewritten when you refactor. It encourages developers to simply rewrite their code as a test, meaning their tests mirror code bugs. And over-reliance on mocks/fakes significantly limits the breadth of the test.
This talk presents a different approach. By focusing on user interactions, not code units, we can optimise our testing and largely solve these problems.
Through concrete, practical examples we will learn:
- How to write robust tests which don't need rewriting when you refactor
- How to tailor tests to actions users perform, not specific code implementations
- Why fakes are often better than mocks

Tom Colvin
Android GDE, freelancer, co-founder of Apptaura
Basingstoke, United Kingdom
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top