Today, software testing is an integral part of the development process. To reduce the time spent on testing, many companies opt for test automation. However, automation capabilities move beyond speed increase and include test coverage enhancement and overall QA costs optimization in the long run.
Assume, You’ve just started a brand new role at a company and the very first task you’ve got in front of you, is to implement test automation.
Now, this company has never done any kind of test automation and right now is relying on a hodgepodge of methods to test and measure quality.
Where do you start and how do you begin such a momentous task? I’m glad you asked.
We’re going to be talking about the general, fundamental concepts surrounding test automation – not specific tools or frameworks you need to use because those will vary based on what your organizations unique needs.
Analyzing applications to determine which can be automated
If your organization is working on 3 applications, it is not necessary that each should be automated. We have to see the various factors while selecting any application to automate.
The application which should be automated must have these factors:
- The application should not be in the early stages of its development. (The application should have all or some modules which are stable and tested by manual testers)
- The UI of the application must be stable. (The UI must not change frequently)
- The manual test cases of this application should be in written form.
- Basic application flow should have been already tested and working
The main goal of automation is to make sure that if the application is bug-free in one build, it should remain bug-free in the next build. The manual tester should not waste their time in finding regression issues, these issues should be identified in automation.
Educate on myths & misconceptions
Educating management, and other groups, about these particular myths and misconceptions surrounding test automation, gives you a shot at success. It provides the understanding and opens lines of communication that will benefit you and your work.
The myths & misconceptions include things such as:
- You can automate 100% of your tests.
- Automation allows Management to reduce test staff.
- One tool is all you need.
- Automation will speed up the testing process.
- Anyone (untrained/unskilled) can do automation.
- Open-source tools are “free.”
- “Codeless” and “Scriptless” tools can do all the work.
- Automation can be created quickly.
- Only hire a Software Design/Development Engineer in Test (SDET).
- Automation provides an immediate return on investment (ROI).
Determine the scope
Any process starts with the definition. Therefore, before implementing test automation, you should determine the automation scope. When starting tests development, a QA engineer should first define the order according to the tests’ priority rate.
Prepare to automate
Having quite profound experience in test automation, I can say the following: automated tests should cover the most stable part of the functionality and the one that is tested for about 3-4 times per week.
As a rule, smoke tests (or other regression tests) are chosen for that very purpose.
Select tools for automation
As soon as the scope is defined, a QA engineer should select test automation tools. The tested interfaces define the package of applied tools. Different types of interfaces presuppose different tools’ range.
There is no any one-size-fits-all solution. The choice of a test automation tool will depend on the technology the software is built on. For example, QTP does not support Informatica. That means the tool cannot be used for the software. We prefer the most reliable and proven solutions: Selenium WebDriver, Coded UI, Ranorex, TestStack.White, Appium, Xamarin, and many more.
Having decided upon the tools, testers get to framework implementation.
Training the Team
After tool selection and resource hiring, the next step is logically the training of the resources. If manual testers are converted into automation engineers, they have to be trained on automation terminologies and concepts. If automation architect is hired from outside, he must get knowledge about the product to test, the manual testing process and what management is expecting.
Give resources some time to try different things until they finally come up with a winning automation strategy. Train them on the tools which organization is already using bug tracking software and requirements management software.
Good training and strong communication between manual testers, developers and automation team is really necessary.
Develop the framework
The framework is the basis for further automated tests’ development. It provides an opportunity to optimize test development efforts by re-using the code. You can utilize any of the ready-to-use frameworks presented on the market, like the Robot framework for Selenium.
The usefulness of frameworks is hard to underestimate. Thanks to frameworks, it’s possible to maintain consistency of testing and improve re-usability. You can also count on minimizing code usage and improving the structure of tests, which is a perfect scenario for long-term projects.
Configure the environment
All the tests run in the environment, which is to be well-configured. Upon this step, you should create and support the environment to successfully run automated tests and store the results.
Test automation will require test data, which means you are to prepare the set of files and test accounts beforehand. Otherwise, you tackle risks that may damage the process and provide you with irrelevant test results.
Developing an Execution Plan
The execution plan includes selecting which environments the scripts will be executed. The environment includes OS, Browser and different hardware configurations.
For example, if the test case demands that it should check the website in 3 browsers, namely, Chrome, Firefox and IE, then the automation team will write the script in such a manner that it will be able to execute in each browser.
Start to automate
Eventually, when all the preliminary preparations are done, testers can get down to automated test development. A regular process of providing new automated tests includes the following points:
- Selection of the manual test case according to the stated priorities
- Code writing for the automated test
- Adding the automated test to the debug test execution
- Adding the automated test to the test execution for newly created builds.
When the framework is designed, the execution plan is known and resources are trained on the new tool, now it’s the right time to start writing scripts.
Scripts should be written in an organized manner with proper naming convention. The source code should be maintained in a source control to avoid code loss. Version control and history should be maintained. Test automation is just like software development. All best programming practices should be taken care while writing the scripts.
The reporting feature is usually provided by the tool. But we can create custom reporting mechanisms like auto-emailing the results to management.
We can create reports at the end of each execution in the form of charts and tables if management needs it. The management should always be informed about the test case coverage, that means which manual test cases are covered in automation and which of them are remaining.
Maintenance of Scripts
If best programming practices are followed and framework is good, then maintenance will not be a problem.
Maintenance usually occurs when there is a change request an application. The scripts should immediately be updated to cope with that change to ensure flawless execution.
When the tests are launched, they should be monitored. You cannot let them go along without tracking the process. While monitoring the automated test, remember to take into consideration the following aspects:
- Automated test coverage, cost per test
- Useful vs. irrelevant results after test execution
- Cost per test
- The scope of support in comparison with the number of executed tests
- Economic effect (ROI, return on investment).
Tracking the process, keep in mind, that test automation is much more than computers launching test programs. It is also delivering information about quality.
Ultimately, mastering automation can significantly increase your business value. Automation includes many factors that need to be understood and addressed before the start of the process. Follow the main points to avoid the risks and get your benefits.
The Final Word:
Following the steps discussed above will help you in successfully implementing automation testing seamlessly in your organization. Once the process is in place, you need to follow the best practices. Whenever there is a change/update in the application, the scripts should be checked and updated as required. Have you tried introducing automation to your testing process? Share your experience in the comments below.