TestQuality Blog

Strategy for Test Automation – User Guidelines

Getting Started
Companies are increasingly implementing Test Automation to address problems and shorten product time to market. However, in order for test automation efforts to be effective and have a good return on investment due to implementing testing, the team should collaborate to develop a Test Automation Strategy.

There are important advantages of implementing Automation Testing for an effetive product release. A solid test automation strategy identifies tools, frameworks and ways of creating and keeping reusable automated scripts. It is most successful when your whole team understands it, as they are the people who will apply it. Automation testing may give important investment returns such as reduced market time and faster tests, but it takes a lot of time and work and without first developing a test automation plan you don't want to immerse yourself in building automated scripts.

Your testing strategy has to outline how you perform automation, who will write it, when will you execute it and which environments will you utilize. It outlines completely what your test automation initiative is about, why, when, how and where. Let us lay out what your test automation plan.

1. Identify your goal: Your Why

The first thing you should establish is why you develop your test automation approach. Why would you like automated testing? What is the goal of developing automatic programs that you test? You may have a number of goals in mind, for example marketing your product more quickly. These may be accomplished through test automation.

Other test automation objectives could be:

  1. Automated testing for features built in the same sprint.
  2. Manual testing reduction. If many regression tests take longer to perform, automated testing reduces the time it takes to do the regression test.
  3. Enhance software test coverage. This may be done by automating many distinct scenarios and by using a data driven approach, it can be done easier and quicker.
  4. Transition from waterfall to agile and continuous testing in the delivery of software.

These are some of your objectives for test automation along with many more reasons, that will assist you in your goal to determine the tools, methods, team members and technology you will utilize. This objective will drive everything else in your test automation approach.

2. Define the test team members: Your Who

The script for test automation does not write itself. You'll need a team to write, run, check for errors, update, produce reports, keep records, perform regression tests, etc. All these are highly essential elements and a focused team is needed to achieve this. Without a correct mix of manual and automated testers to balance what is automated and what is still to be tested in every sprint, your team will be overloaded and unable to achieve the goal you have set for test automation.
Other considerations about who's going to be on your team:

  1. Is training required for your team members and on what should they be trained? If you plan to move manual testers to automatic testers, they need to know the programming language, locator strategy, coding best practice such as page object patterns and atomic testing, along with the specific tools and frameworks that you choose to use for the test automation.
  2. Do you have employees or do you need to employ the appropriate people? Begin to think about the job description. The qualifications, information, technology and procedures you need to know.
  3. Test automation support. Are you going to build particular test automation tickets? Will the successive sprints contain them? Are you supported by a Project Manager? Is the test automation effort supported by the company as a whole such that it will not be difficult to set up environments and create apps for test automation?

The right group of individuals with the required expertise and skills will enrich the chosen test automation strategy.

3. Decide what to Automate: Your What

Deciding what to automate helps you to focus on the important areas that will provide the highest return of investment. Getting right inside without a strategy plan on what you will automate and how much time and other resources you will need within the test automation pyramid, might end up in wasted efforts. Think about the objective when deciding what to automate and make sure you connect what you automate with the goal. For example, if your aim was to automate more regression tests, then the regression suite/features that currently exist in the production will be given priority for automation tests.
Look at these new features and try to figure out which features can be automated if you want to automate new features in the sprint. I usually have a useful technique about what you might need to automate. This is the overview of the high level:

  1. Decide the test automation level at which your tests will be performed. The automated tests may be deployed on three key levels: Unit tests, Service/API layer tests, and user interface testing; before you start you should analyze the advantages and disadvantages of creating tests at each of those levels.
  2. Make smoke testing automated.
  3. Create automated tests, such regression tests or tests that are always performed at the start of each workflow.
  4. Complete test automation.
  5. Automate multi-configuration testing.
  6. Automate your testing. These automated test cases need to be reusable, maintainable, simple, easy to comprehend and prioritized to guarantee that the test automation effort is created and maintained smoothly.

4. Consider how you will be running your tests: Your How

The following thing you should consider is how your automated testing will be conducted. To suit your project demands you need to identify particular instruments and frameworks. Consider the following when determining which tools to use:

  1. The test automation level which you are going to do: When you automate the API versus the database, browser or automated testing for visual regression, several tools and technology are required for each.
  2. The test automation language that will be utilized: Tools like the Selenium web driver, for example, Java, Python, JavaScript, C# etc, may be used in numerous other languages. By using The TestQuality Command Line Interface you may upload your automated test results from Selenium to TestQuality.com Automated test results must be output in JUnit XML format, which most test automation tools will provide.  Selenium Webdriver uses Appium to automate browsers and to automate mobile systems. Other language tools like WebdriverIO and Cypress are available for Javascript automation in addition to the Selenium webdriver. However, there are alternative language tools if you're creating an API or Database testing. For API automation in Java, RestAssured may be utilized and for JavaScript, Supertest can be used.
  3. Testing scenarios: Take single situations or edge cases to be automated. If you need cross-browser testing, solutions like Saucelabs or Browserstack may be considered.
  4. Test automation objective: You need to start thinking of continuous integration solutions, such as Jenkins, GitLab, GitHub Actions, or some other CI tool, if you want continuous integration as your objective. Think about ways to initiate automated testing (manually on your computer or via the continuous integration system).
  5. Tool cost: As always, there are paid tools and open source platforms. You have to consider the cost and the assistance you receive for the tools you require based on the budget you have.  Create a table with all the automatic features, and all the necessary tools, to evaluate and pick the correct tools and frameworks and compare which one works best for you. I would also advise that you provide a Proof of Concept(POC) with the Top 2 tools to guarantee that those who use it can generate both basic, edge case testing automation and get the tools updated.

This part will probably take the most time and study and you must take the time to analyze each tool and the requirement for the test automation project carefully.

Where and When to use your Test Plan

The last thing you have to consider is where and when to use an effective test automation plan. Therefore, I highly propose you to perform your automated tests in a dedicated test environment. This allows you to modify the data to achieve different situations that can then be verified. You must contemplate on the task that this specific setting involves and establish a plan to accomplish it.

I advise you undertake production tests, too. These tests should be identified or labeled correctly, though. You want to mark your tests, so that you can manage these specific tests.

Have a plan of execution for testing. Answer the following questions and plan:
• Do you need to install particular test data, connect databases or use API?
• Is it necessary to obfuscate this data?
• How are your automated testing to be set up and configured?
• Do you perform these tests on the cloud or locally?
• Do you have a system of continuous integration?
• Is there a particular trigger to execute for automated tests when you wish to run the tests?
• How are you going to save code in a repository?
• What is the process of merging of code with the repository?
• How are going to report the automatic test runs?

Make sure all these elements are taken into consideration so that you have a strong test automation approach.

Take into account that your team should comprehend the entire test strategy.

I propose you begin drawing out the plan by using a mind map.

Keep in mind that automated testing should be maintainable and will be time consuming. Make sure you give your people involved enough time to prioritize automated areas, develop scripts, execute and review them, report, manage the project, and have sufficient information to perform all of those tasks. Therefore give the appropriate training and assistance if your staff requires training.