Organizations have embraced Agile and DevOps to deliver high-quality software in a faster and more efficient way. Test Automation is considered to be one of the biggest promoters of agility. But several times, the investment in Test Automation might not deliver its value with an ineffective strategy.
In this article, we will discuss devising an intelligent Test Automation strategy that can help us prevent common Test Automation failures.
1. Identify Your Test Automation Goals and Measure Success
Test Automation without a goal is meaningless. The first part of developing a Test Automation strategy is to identify goals that will help measure success.
The following questions will help you identify your Automation goals:
- What problems are you trying to solve by Test Automation?
- How do you get maximum ROI with lesser effort?
- What test cases should you automate?
- How does Automation fit into your existing processes and workflows?
- Does your team have the necessary skills and required tools?
Ensure that your Automation goals are Quantifiable. Create the definition of “success” and define parameters against which you can measure the success of your Test Automation. You can learn more about measuring performance and success by using KPIs for Test Automation here.
2. How to Devise a Test Automation strategy using the Test Automation Pyramid
The Test Automation Pyramid concept by Mike Cohn can help us formulate an effective Test Automation strategy.
At the base of the pyramid are the Unit Tests, which are the least expensive to create and the fastest to execute. The width of each level represents the number of tests to be created in comparison to other levels. Thus, unit tests should represent the majority of our tests.
In the middle are the API tests that are executed against the service layer. At the top of the pyramid are the UI tests, which validate the application as a whole at the presentation layer.
As we move up the pyramid, the cost involved in the creation and maintenance of the tests, the test execution time, test fragility, and test coverage keeps increasing. The Automation Pyramid preaches that you should push tests down to the lowest level possible for a higher return on investment.
The little cloud at the top of the pyramid signifies that, even with solid Automation at all layers; your product requires crafty exploratory testing.
3. Defining your Test Automation Strategy
When choosing test cases to automate. Prioritize the cases that can generate ROI quickly. When you know what you want to automate, find the right time to automate.
|What to Automate?||What NOT to Automate?|
|Automate monotonous tests which involve a lot of repetitive work-like regression tests.||Don’t automate the tests that would require human intelligence and intuition (these are more suitable for exploratory testing).|
|Automate BVT/Smoke tests to ensure that the new code changes have not led to regressions.||Don’t automate the tests that need human intervention. An automated test should execute and assert the results unattended.|
Example – Partial Automation of security check-in pages and needing human assistance in entering the CAPTCHA.
|Automate risky, business-critical use cases.||Don’t automate too early when automating GUI, wait until the designs stabilize.|
|Automate to validate the same feature with a large set of different inputs and data (Data-driven testing).||Don’t automate when you know that frequent changes are expected.|
|Automate to alert respective owners for the fragile services that regularly break.||Don’t automate one-time tasks or edge cases that you will never test again.|
|Automate cross-browser testing (testing on multiple browser versions on different operating systems and devices).||Don’t automate the tests that have unpredictable results.|
|Automate load testing to test the system’s ability to handle the demand by creating virtual users.||Don’t automate User experience (UX).|
|Automate visual regression tests to validate the look and feel of your apps and websites.||Don’t automate for the sake of Automation|
|Important Note: Everything that can be automated and adds value should be automated.||Important Note: Don’t automate when you do not have a measurable return on investment.|
People and Tools
Bringing in the right people for implementation is critical for Test Automation to succeed. All initiatives fail when no one owns Automation. Someone needs to own Automation full-time for every team The Automation lead should either build a dedicated team or groom the existing members with required skills based on the context. The lead should clearly define which team members are responsible for which part of the Automation project. This team should meet regularly to evaluate the goals and performance against their KPIs.
Choosing the right tool is crucial to succeeding in Test Automation.
Factors to be considered when selecting a functional Test Automation tool:
- Does the tool fit into current SDLC processes?
- Does the tool vendor support training and provide reliable support?
- Have you performed a competitive analysis of available tools in the market?
- Which programming languages does it support? Does your team have the required skills?
- Do you have the budget for the tool?
- If using an open-source tool – Does the tool have good community support and well-written documentation?
- Do you foresee the risk of the vendor going out of stock or the tool being acquired or retired?
Keep in mind that tools need to adapt to us, not the other way around. It’s wise to find a toolset that can work with your available skills where the learning curve is minimal. There are plenty of code-less Test Automation tools, like TestArchitect, that have freemium options for teams to get up to speed on automating.
4. Automated Test Lifecycle Methodology (ATLM)
According to Elfriede Dustin “Automated Test Lifecycle Methodology (ATLM) is a structured methodology geared towards ensuring the successful implementation of Test Automation. ATLM will help you to visualize the process of Test Automation.”
- The Decision to Automate Testing: managing expectations and conveying the potential benefits of automated testing to the management.
- Test Tool Acquisition: test tool evaluation and selection process happen in this stage.
- Automated Testing Introduction Process: test goals and strategies are defined and test processes are documented.
- Test Planning, Design, and Development: In this stage, we define roles and responsibilities, schedules, test planning, and design activities, test environment preparation, test risks, and contingencies, etc.
- Execution and Management of Tests: Execute the planned unit, integration, system, and user acceptance testing.
- Test Program Review and Assessment: an ongoing activity, where we collect lessons learned and other metrics and take corrective actions for process improvement.
As you can see, succeeding in Test Automation is lengthy and multifaceted. Defining your goals and adopting the right approach is the first step in ensuring success; after this, Test Automation success is reliant on choosing the right people and tools, as well as following a structured methodology. Sometimes, though, it may be out of your current scope; it is okay to ask for help! Enlisting the help of an expert firm will definitely aid in your Automation effort’s success. For example, LogiGear is a firm that prides itself on 25 years of Silicon Valley Testing Expertise; with our turnkey Automation suite as well as numerous training and consulting offerings, we can give you the skills you need to get Automation right the first time.