Over a million developers have joined DZone.

6 Questions to Ask Yourself Before You Decide What Test Cases to Automate

DZone's Guide to

6 Questions to Ask Yourself Before You Decide What Test Cases to Automate

These tips will help you decide which tests to automate to remain efficient, reduce risk, and speed up testing.

· DevOps Zone ·
Free Resource

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day

Even just the idea of test automation is enough to get the attention of most software teams. But while the idea of faster testing may seem like the silver bullet, there's a time and place for automation.

Before you jump in head first, you should evaluate how automation is actually fitting into your organization. By asking these questions, you can get a better idea as to whether automation is the right move, or if you should take another route.

  1. What's the risk involved? If you've performed a risk analysis of your application, you probably have a good idea of which test cases are the most important to check in each code change and which are a lower priority. Consider how human error could affect test data if it's not automated. Think about how different test cases that may critically impact the customer and/or impact internal team downtime if broken. Additionally, you might want to automate high traffic page, features that depend on security, and problematic areas and other functions that rank high on your risk analysis.
  2. How often am I going to run this test again in the future? Running the same test more than once may seem repetitive and tedious, but if you're not actually going to be running it frequently, it might not be worth it to automate. For example, if you know you're going to have to test a feature two or three times but won't be keeping it as a permanent part of the application or won't be testing it after that, you might want to rethink automation. The tests you decide to automate should be a foundation of your regression testing strategy, so if you don't feel like they're a critical part of the application to be checked in every code change, it may be best to keep them separate.
  3. How much time am I willing to invest? When automation requires so much time and maintenance, you have to determine the ROI of your efforts. Some regression tests may seem like they're a candidate for automation but upon closer inspection, might not be worth the energy for the value they're providing. Automation is not a quick, one-and-done solution to your problems. Take a lesson from Elon Musk - you don't want to drop automation into the mix without a second thought. Spend the time making sure your first test is checking all the boxes and meeting requirements. Then determine how often it will need to be updated or reevaluated in order to establish whether or not automation is worth your time investment.
  4. Are there parts of this test case that still need to be explored? You might think that you're ready to automate, but keep in mind that automation comes after a thorough exploratory testing session. Just because you can automate doesn't mean you should, and many tests are better off being performed manually. Are there still instances that could benefit from human observation? While you can't expect to manually cover every part of the application, getting a foundation during exploratory testing is what leads to more successful, stable, and insightful automated tests.
  5. Does automating support the needs of my team? If you're automating a test case, you want to make sure the tests you write are going to actually answer the questions your team is asking. First, take a hint from Bas Dijkstra, and discuss the "why" before firing up a test automation tool. While Selenium is a great tool for automation, understanding the nuances of the many commands and abilities of it can take some getting used to, so if you're not able to write a script that encompasses all of the requirements your team is requesting, another method of testing may be better. If you still feel that you automation is the best process for the job but don't feel confident in your Selenium skills, a tool like Record & Replay may help you achieve your testing goals. There are many choices when it comes to automated testing tools, so you need to make sure the one your organization uses will support the testing you're trying to accomplish.
  6. Why are you automating? Sometimes the most simple questions can give you the most telling answers. If you're automating because you think it's what you should be doing or because your boss is telling you to, you might not be automating your tests for the right reasons. Your objective with test automation should be to provide insight to you your team and give faster feedback. If you have ulterior motives, your efforts won't take you very far.


Even if you could automate every test, you would quickly find it's not helping you or the rest of your team very much. Next time you're deciding on whether or not to automate, ask the right questions first.

This article was first published on the CrossBrowserTesting blog.

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day

devops ,automated testing ,test automation

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}