A Five Point Plan to Start Test Automation
Discover a comprehensive five point plan to kickstart automation testing in your software development process and enhance the overall quality of your apps.
Join the DZone community and get the full member experience.
Join For FreeTest automation has become a mandatory requirement in the fast-paced software industry. It helps with quickly testing the functionality, stability, performance, as well as security of the applications. In addition, continuous testing using test automation allows us to deliver good quality applications to the end users.
Though many companies these days start writing the automation tests in parallel with development, there are companies who still lag in the test automation department due to lack of personnel, tools, techniques and skills. These companies rely on manual exploratory testing to check for the functional validations and perform regression testing.
Performing regression testing manually has multiple side effects such as:
- Tedious and boring repeated tasks
- Time consuming
- Increase in time to market
- Human prone errors
- Less confidence on the builds
All of these side effects might lead to error-prone builds that are sent to end customers, thus affecting the product quality and indirectly hitting the business.
The solution for overcoming these side effects is to automate the tests, so the testing team can gain an upper hand on the other features of the application.
The QA team can also focus on other activities like performing usability, UI/UX, performance, and security testing to enhance the overall quality of the product. They can also focus on the lesser tested areas of the application to uncover more issues and fix them before the product is released to the customers.
Five Point Plan to Start Test Automation
The following five point plan will help the test team to easily implement test automation for the software development:
- Create a test automation plan
- Check the stability of the application for test automation
- Check for critical test scenarios that could be a good fit for automation
- Prioritize the tests as per the critical test journeys of the product
- Work step-by-step to add the test scenarios to the test automation suite
Create a Test Automation Plan
The first point is to create an automation plan which will help the team understand the following:
- How an application platform can be automated for web, mobile, or APIs
- The test objective : functional, visual, performance, security, etc
- Features to be automated
- Scope of the test automation
- Timeframe to complete the test automation
- Tools/frameworks to be used
- Entry and exit criteria
- Who all will be participating in the test automation
- Test environment and test data
- Test cases including expected and actual output with test steps
The plan should provide a brief overview about the test automation. It will also help the test team to track the progress and check for the deviations, if any. It is recommended to get it reviewed and approved by the team leads, product owners.
Check the Stability of the Application for Test Automation
Before jumping into and starting the test automation, it is better to check the stability of the application by performing a manual round of exploratory testing.
This will provide us confidence and ensure that the application does not crash mid way through and hence the automated tests as designed and executed will provide us with the desired results.
If this check is not performed, then there are chances that the automation tester might be lost mid way as he won’t be able to determine that the flakiness in the test results is due to an application issue or an automation test scripts error.
Find Out the Critical Test Scenarios
The test automation should begin with the critical scenarios being automated first. As these scenarios are used by the end users frequently in day-to-day business, it would be best to prioritize them.
The Business Analysts and the Product Owners as well as the experienced QAs in the team are the best people who can be contacted to find out the critical test scenarios. These scenarios should be updated in an excel sheet or a document for future reference.
It is recommended to go for the end-to-end automated tests as these tests check for the integrity as well as the functionality of the application as an end user would use it.
Automating critical scenarios would also relieve the manual test teams and save their time they spent while performing regression tests on these scenarios. It would benefit the whole team as all the critical scenarios when automated could be tested in quick time giving more confidence on the builds.
Prioritize Test Journeys
After getting the list of all the critical test scenarios, it is necessary to get it prioritized. This prioritization of the test scenarios can be discussed with Business Analysts, Product Owners, and Customer Success team members.
The scenarios that are most frequently used such as registration, login, payments, etc., should be taken care of first. Next, the scenarios with the least criticality should be taken up and automated.
It should also be noted that the test data plays an important role in the automation tests, so do not hesitate to ask for the test data at the time of prioritization, as it will save time and let you automate the scenarios in a quick time.
Addition of Tests to the Automation Test Suite
This is the final point in the five point action plan where we need to delve in and start writing the test scripts for the prioritized test scenarios as per the plan.
It should be noted that the emphasis should be on checking for the correct assertions in the tests. Each test should have an assertion statement that checks the difference between actual and expected output.
While writing the test automation scripts, make sure to use the best practices for coding considering the code maintenance, readability, and code reusability.
Page object model can be used for writing the automation test scripts as it offers great flexibility. It enables us to separate the page objects from the actions and thus helps in code reusability, maintenance, and readability.
Similarly, efforts should be made to consider the parallel execution of the tests as well. Parallel execution of the tests allows running the tests speedily and provides fast feedback on the regression cycles.
Thinking about parallel execution in the early stage would help in designing the test framework and save our time that would later be required for refactoring the code.
Test Automation Next Steps
The test automation work does not get completed here as there are further steps that need to be followed.
Code Review
After writing the test automation scripts, it is a recommended approach to get the code peer reviewed. Code reviews benefits in multiple ways:
- Finds the flaws in the code and fixes them
- Ensures best practices are followed and implemented
- Checks that the required scenarios are accurately covered
- Checks that the assertions are properly implemented
- Enhances the knowledge of the test automation engineer
- Checks for consistent design and implementation
- Promotes team Collaboration
A code review should be done positively, considering the code and checking the best practices. The code should be kept in mind during the review and not the coder. Likewise, the test automation engineer should take the comments positively and implement them or provide necessary justification for the review comments.
All in all, code reviews will help in boosting the code quality.
Integrating With CI/CD Pipelines
The next step after writing automation test scripts is completed is to integrate it with the continuous integration and continuous development (CI/CD) pipelines.
I would recommend using the test pyramid for implementing the CI/CD pipelines as it provides an efficient way of using the automated tests at the lower level. The regression cycles can be run on the CI/CD pipelines itself in the dev environment before the build is pushed to further environments such as QA, Staging, UAT, etc.
For running the tests in the pipelines, cloud platform grids like LambdaTest, PCloudy, Perfecto, SauceLabs, etc., could prove beneficial. These platforms provide on demand infrastructure for testing like real mobile devices, multiple platforms like Windows, MacOS, etc., with a wide variety of browsers readily available.
As these platforms support cross browser and cross platform testing, executing all the tests in parallel is an easy task allowing to save time on test execution.
By using the services of these platforms, we don’t have to worry about the installation and set up of multiple devices, browsers, and platforms for testing as the cloud platforms provide all these services for a nominal price.
Addition of More Test Scenarios
After all the test scenarios that have been discussed in the automation plan are covered, a meeting should be set up with all the stakeholders including the Business Analysts, Product Owners, developers, and QA leads to further discuss the plan for additional scenarios that are part of the latest feature releases.
The addition of more test scenarios would give leverage to cover more test cases in the automation, allowing for more of an upper hand to the test team. This would increase the overall product quality and build a robust product.
Maintenance of Test Scripts
Allocation of time should also be devised for the maintenance of the test scripts. The changes to the product are carried out frequently due to ever increasing customer demands which would make the test scripts redundant.
Hence, it should be noted that maintenance of the test scripts should also be a part of the test automation plan and wherever required, appropriate time and resources should be allocated for making the redundant test scripts working once again.
Summary
In my experience, it takes a lot of effort to start test automation and sometimes due to improper planning and less experience, it does not happen as expected. This five point plan can help you to efficiently organize the test automation and allow for the full testing of the application.
It would give much needed upper hand to the QA team and allow them to focus on uncovered areas of the application. This would boost the product quality and allow the team to deliver a robust product to the end users.
Published at DZone with permission of Faisal Khatri. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments