DevOps and Test AutomationSince a key aspect of DevOps is to ensure thatdeployments are made continuously, aswell as effectively, the need to for having tests in place is pretty obvious – untested andfaulty code has the potential to mitigate the benefits of DevOps.Manual testing uses up resources, which can be seen as a waste by developers,especially when they have other important projects to work on. This is exactly whyautomating tests is important.Some of the biggest plusses of using automated tests include:Less Time Spent Worrying About Time-Consuming IssuesWhen things such as misconfigurations are automatically being searched for, the time ofdevelopers and sysadmins can be spent on other things. If the automated tests alsooffer quick fixes for these incorrect configs, they lead to even more efficient use of timefor devs and ops.
If only manual tests are used, the potential is there for IT workers to be lax aboutchecking everything, as they know how long it will take to do so.Quickly Verifying that Changes Will Run ProperlyBeing able to automatically test that changes work properly before they’re introducedgives developers more confidence once it’s time to deploy, and it gives sysadmins morepeace of mind that there’s a lower probability that they’ll find something seriously wrongwith a deployment. Manually testing as a developer programs is a huge hassle thatheavily increases the time it takes for delivery.Cuts CostsAgain, this is related to the time saved. Time saved from needing to fix issues that couldbe easily found through automated testing is time spent doing something beneficial tothe company. This article has a nice case study demonstrating some of the savingpotential that automated testing can create.Reduces Human ErrorLike the cliché, “we’re all human”. Even the best programmers and sysadmins will messup (obviously, some more than others). This isn’t to say that creating automated testingis guaranteed to be 100% accurate, but if done well, they can be pretty close to it.Potential Drawbacks?The main complaints against automated testing seem to stem from a perceived lack ofnecessity for automation and from the fact that time/resources must be taken to set upautomation in the first place.“Automation for the sake of automation” is something I’ve heard a lot. This is to say thatjust because something can be automated, doesn’t mean it needs to be automated (in away, like the notion “if it aint broke, don’t fix it!” – counter argument: KnightCapital). Maybe a company doesn’t really need to deploy often enough to have a trueneed to automatically test everything. However, if a company is employing DevOps, it
stands to reason that they plan to deploy enough that the long-term benefits ofautomated testing outweigh the short-term costs.Short-term vs long-term cost is also the rationale as to why it can be wise to take thetime to set up automation now to save time in the future. By investing a bit of time andeffort now, an IT department can avoid spending a lot more time and effort fixing thingsin the future.