When Should You Automate Your Testing?

[article]
Summary:

Although it sounds counterintuitive, manual testing still plays a large role in automation. In truth, manual testing will never go away. While automation is all the rage, there are instances when manual testing is preferable over automation. Knowing when to employ one tactic over the other can be helpful in reaching your goals.

Modern software development requires delivering a finished product more quickly and efficiently than ever before. The cloud and DevOps enable greater collaboration, but they also accelerate the application delivery process, often straining existing testing resources and processes. We're shifting from big, infrequent releases to a fast-paced rolling schedule of iterative change. There's a growing realization that the whole team is responsible for getting the product into the hands of consumers and meeting their expectations.

Automation can dramatically speed the time to market and help to keep your manual testing team motivated—as long as you get the right focus and balance.

When and What Should You Automate?

Traditionally, automation was an afterthought. It may have been implemented to help manage regression testing, usually once the product's features were locked down and stabilized. But nowadays automation occurs earlier and earlier in the lifecycle. It makes sense to bake automation into the development from the beginning, starting with continuous integration of code checked in by developers.

Automation can shift some of the burden of repetitive testing, freeing testers to engage in exploratory testing and leveraging their skills. We can also build automated tests into the release pipeline, increasing efficiency and creating a safety check before new features roll into the live product.

Automated testing used to be focused on the user interface, but we can dig much deeper than this.

The current tools at our disposal can be used to automate testing of web services, APIs, and the data tier. We can create test suites that query the database, mine information out, and use it. We can even work on self-healing scripts capable of determining when data is no longer valid and causes a failure.

We should be asking how to leverage the functional workflows we've automated through the different tiers of the application, then looking at how we take that and expanding into load and performance testing.

The testing for the entire functional context of an app can be automated, but there's always a calculation to be done as you measure resources against returns.

How Do You Focus?

Your automation suite is not set in stone. To get real value from it, you need to assess the best areas to focus on carefully, and you need to reassess those automated tests on a regular basis to ensure they are still offering business value.

It makes sense to focus on automating the testing of the core functionality and high-traffic areas. That way you can be certain your business-critical features are working. It gives you a baseline to work from. When there are a lot of new features rolling in, you have to mix the automated testing with manual testing to ensure you're catching everything.

If you're working on continuous integration, it makes sense to automate tests for any critical areas so they can be validated and baselined as soon as they build and deploy. This will save downtime for your team and boost productivity.

As the project progresses, make sure to check that you are still focusing automation on the critical areas. Obsolete tests should be cut. For maximum efficiency and best use of your resources, always keep the spotlight on the core functionality. Effective automation will handle the mundane side of testing, giving you confidence that your product delivers the functions it needs to. This also frees up your testers to think creatively and uncover issues that automation will never find.

Pitfalls to Watch Out For

Don't think about automation as regression support, and don't fall into the trap of thinking it can replace manual testing.

The best way to implement automated testing is to make it part of your planning process from the outset. Identify the business objectives that will deliver on expectations for a minimum working product and consider automating from there. That way you can ensure your baseline set of criteria is always met.

You should also be wary of committing to long-term licensing deals for automation tools, particularly when working on mobile platforms. This area is still in its infancy, so more intuitive and creative tools are emerging all the time. Leverage the open source community and avoid getting locked in.

Used correctly, automated testing can provide a real boost to your efficiency, allowing everyone to focus on improving the product and delivering an impressive return on your investment.

Faster delivery processes such as those provided by DevOps require that you streamline your processes and deployment automation. Rapid and reliable release management will thrill your customers, adding value and providing a competitive advantage. Automating your testing is a must-have if you are going to successfully deploy your applications using DevOps.

About the author

CMCrossroads is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.