Why Test Automation is crucial in DevOps
In my previous blog post, I talked about why manual testing is important and how it does not replace test automation but complements it instead. In this post, I'll talk about the important role test automation plays and why it is essential if your team wants to successfully adopt DevOps.
Over the years, more and more companies are now looking for people who both have a testing mindset and development skills, which has led to roles such as Software Development Engineer in Test (SDET) to be popular. In my opinion, this is highlighted by the fact that DevOps ways of working has now been set as the standard if you want to keep up with your customers demands and deliver new features faster. With DevOps, one of its primary focus is automation which includes automating tests. Therefore, QA professionals are now expected to learn how to code so testing is not left behind or does not block the release timeframe. We are now expected to contribute in improving the build pipelines by adding in automated tests, test reports and monitoring as part of the development workflow in order to catch any unwanted bugs sooner rather than later. On top of that, the amount of testing that needs to be done has increased substantially as companies try to release on a daily (even hourly) basis which is very different compared to the old traditional practice of releasing new changes on a monthly basis.
As we enter a new decade, there is no foreseeable sign of DevOps' popularity slowing down. In fact, it will be the opposite and hence, this is why test automation is crucial if companies want to keep up. From the latest State of DevOps report, it is reported that"delivering software quickly, reliably and safely is at the heart of technology transformation and organizational performance".
So, why is test automation an important piece in DevOps?
Test Automation enables faster feedback loop
Feedback loop allows development teams to know if their work has broken any existing changes or not. The faster the feedback loop, the faster it is for developers to fix any issues that may arise. Without test automation, developers would have to wait for the QA team to complete their manual regression testing which might take hours or even days. Not having automated tests is a deterrent to delivering software changes quickly and reliably.
Test Automation enables Continuous Testing
Continuous Testing is about testing early and frequently so a release candidate is continuously developed, tested and then deployed to production. Test automation is a prerequisite in achieving Continuous Testing since it provides an immediate feedback whether the release candidate is deemed safe to be deployed to production. Once test automation is integrated, it serves as a building block for continuous learning as teams learn more about the different testing tools and how it can help them with their testing needs.
Test Automation enables frequent releases to production
Since Continuous Testing enables you to frequently release new features, having a set of robust automated tests raises your confidence that the release candidate that you will deliver to your end users is of high quality, without the need of manual regression testing. By making the results of your automated tests visible to everyone, Operations team will also have more confidence that the release candidate does not cause unexpected production issues. Big companies such as Amazon has been known to release to production every 1 second!
Test Automation enhances the team's productivity and saves time and effort
Test automation frees up the QA team to focus on other areas where they are needed the most. For example, rather than doing the same manual regression tests every time there is a new change, they can do other things such as doing exploratory testing, accessibility testing, participating in refinement sessions to understand the business requirements clearly or even thinking of other ways on how to improve the quality more. Test automation helps reduce the boring and repetitive tasks that QA teams need to do in every test cycle. Tests that are automated are also much quicker to run as these can be run in parallel which saves time and effort.
Test Automation improves collaboration
Since writing automated tests is basically a coding activity, test automation improves collaboration between a developer and a QA since it opens up questions on what tests should be automated and what tests are needed on what level. With the rise of developer friendly testing tools, developers no longer need to rely on QAs to automate a test. Pair programming between developers and QA allows technical skills to be shared between. Test automation become a shared ownership and not just the QA's responsibility which means that anyone from the team can maintain the automated tests if any of it fails or needs changing, which in turn increases the testing maturity.
Bottom line is that test automation enables Continuous Testing which in turn enables Continuous Delivery. This allows us to deliver small changes to production safely and frequently which is one of the focus of DevOps ways of working. As QA professionals, we need to advocate for test automation and educate the rest of our teams as to why it’s important so we can keep up with delivering a high quality product safely in the shortest amount of time. However, it's also best to say that test automation is not the only ingredient for a successful approach.