Manual testing is most often done end-to-end. Tests are performed through the user interface. When testing gets automated, this is where most organisations start. They start with automating the way they do things now. The new way is faster, but it isn’t fast enough. And not robust enough.
It is unnecessarily complicated to understand why an end-to-end test fails. There are usually many different possibilities when something doesn’t work.
The number of possible paths through a reasonably large application will very quickly make it impossible to cover them all. Combinatorics is your enemy.
The solution is to minimise the tests that pass through many layers in your application. Minimising doesn’t mean removing the end-to-end tests. They are still needed. But much fewer are needed than most organisations seem to think.
I will show you why the testing pyramid needs to be very wide. You will understand why this is an absolute necessity if all possible paths through the application should be tested.In other words, let me show you why your tests must be very shallow.
Thomas Sundberg is an independent consultant and contractor based in Stockholm, Sweden.
He has been working as a developer for more than 25 years. Thomas has a masters degree in computer science from the Royal Institute of Technology, KTH, in Stockholm. It is one of the leading technical universities in Sweden and he has also taught programming there.
Thomas has developed an obsession for technical excellence that translates to software craftsmanship, clean code, test automation and continuous deployment. The definition of done according to Thomas is working software, in production.
He runs a blog (www.thinkcode.se/blog) where he writes about programming, software craftsmanship, tdd, bdd and whatever problem he wants to share a solution for.