An effective test automation strategy is a key to delivering releases into Production quickly AND safely. Without it, you risk deploying buggy code.
Martin Fowler from Thoughtworks offers a useful model – the Testing Pyramid – based on the original concept from Mike Cohn on how to think about best practice for test automation. The key message of the Testing Pyramid is that you need to move the majority of the testing closer to the developer and the source code e.g. 100% code coverage with automated unit testing. The tighter the feedback loop between developer and test results, the faster the code can be fixed (this is often called the “inner loop” as it’s “inside” the core code development process).
As the code flows into the CI/CD pipeline (the “outer loop” we have automated component, integration and API level testing designed to ensure that the new code doesn’t break existing code, and meets the acceptance criteria. Finally we move to automated GUI testing that’s focused on ensuring the customer experience is high quality, and we end (at the top of the pyramid) with manual session based testing (exploratory) testing. This is using humans for what humans are good at – finding new and novel ways to break things.
The inverted pyramid AKA the “ice cream cone” – has the focus of the testing at the later GUI stages (which tend to be “brittle” i.e. easily broken by minor UI changes and hence requiring constant maintenance. The inverted pyramid makes the feedback cycle between developer and test results slow – by the time the developer gets feedback they have probably moved on to working on another piece of work, and hence fixing bugs becomes an interrupt to their flow of work – or worse, fixing the bug gets assigned to a different team or developer entirely. This means that the original developer never gets any feedback on their work, and hence has no opportunity to learn from their mistakes (and hence ensuring they keep on making them…)
Steve Thair, co-founder and chief product officer of DevOpsGroup, discusses the role automation will play in the business world over the next few years.
Can Cloud and DevOps adoption accelerate growth?
In this live webinar a DevOpsGroup panel discuss; The five essential characteristics of cloud computing that make you 23 times more likely to be an ‘elite’ performer