DEV Community

Cover image for How Do You Calculate Your ROI On Test Automation With Selenium?
arnabroychowdhury for LambdaTest

Posted on • Edited on • Originally published at lambdatest.com

How Do You Calculate Your ROI On Test Automation With Selenium?

Cross browser testing has been a type of testing which requires a tremendous amount of effort and time. The process of testing your web-app over different browsers, operating systems, devices, screen resolutions to evaluate the rendering of your web content for a variety of your audience is an activity. Especially, if approached manually. Automated cross browser testing with Selenium can help you save the time of routine test activities, helping you cut short on regression testing. However, people seldom like changes. If manual testing is popular in your organization, the management will obviously raise questions when you ask them to implement test automation.

Test automation although highly beneficial may often prove to be expensive, but is it worth the cost? That is one question which you may find yourself struggling with while convincing the higher management. You will be required to present an effective ROI on test automation with Selenium while developing a web application, highlighting the benefits of automation testing with Selenium for automated cross browser testing of a web application by making it faster with less manual labor.

In this article, we shall discuss different metrics to evaluate ROI on test automation with Selenium, and techniques for calculating ROI covering the basics as well as advanced techniques.

Metrics For Evaluating ROI On Test Automation With Selenium

You as well as your team members can consider certain metrics and measurements which will help you analyze the ROI on test automation with Selenium as you plan to start automation testing from scratch of your web application. These metrics could differ from one organization to another. Why? Well, it is a matter of prioritization, there are different metrics such as the number of defects detected, time gain or test coverage directly influence risk, cost, quality, and delivery schedule of your project. Some organizations may prioritize the number of defects detected, as they may believe, that quantity will lead to quality. Some may do vice-versa, as for them quality means everything. What’s your take? What do you think is more crucial in the debate of quality vs quantity of test cases. Let me know your thoughts in the comment section below.

With that said, identifying key metrics to calculate ROI on test automation with Selenium is critical for you, before you step into the discussion with higher management.

Scope Of Test Automation With Selenium

We know we can’t perform a 100% test automation. Well, how much-automated cross browser testing can your perform is a question that needs a lot of thought process? If you wish to perform automated cross browser testing for your web-app then you would have to think and prioritize which browsers, & OS should you be covering in your test cases? Because you can’t cover every scenario. The total number of possible scenarios could lead to hundreds or even thousands of test cases. If your automation test script is as long as that then it may take you quite a considerable amount of time on a daily basis evaluation of your web application or website.

In short, this is where you need to compare between the total count of automated test cases vs the total count of test cases where you can implement automation.

In case you wish to reduce time on complex test suites then you can also go for parallel testing with Selenium Grid. That way, you can execute multiple test scripts, simultaneously. However, for that as well you may need to think about how many concurrent or parallel sessions would be good enough for your requirements? You can do so by our concurrency calculator.

Improvement in this metric signifies that the teams can find the defect faster and fix them quickly, thus leading to low risk and high ROI on test automation with Selenium.

Note: The Random Color Generator is an online tool that generates a list of random colors or a single random color in different color code formats: HEX, RGB(A), and HSL.

How Much Time Would You Save?

With Agile, there are weekly or biweekly deliverables along with frequent changes in requirements. The importance of regression testing in that scenario, increases. Implementing automated regression test cases will reduce the time required for testing, thereby, gaining more time to invest in development or working on another sprint. Saving time is a priority for almost every organization, especially startups, who need to scale their web-application quickly. Is time one of your concerns for evaluating ROI on test automation?

Bandwidth Of Your Resources

We know that test automation with Selenium will help you to market your web-application quickly. However, no organization would prefer if their employees sit idle for the majority of their time, waiting for their script to complete. Calculating ROI on test automation with Selenium requires a thorough effort analysis of every automation & manual tester you have got on board.

Investment Budget Over Resources & Tools

Test automation sure saves time and effort. However, it involves a tradeoff with pricing. You need to think about how much budget you can comfortably allocate over expenses around tools, every organization, especially startups, who need to scale their web-application quickly. Is time one of your concerns for evaluating ROI on test automation?

Total Defect Count

The total defect count after each regression cycle gets completed gives an indication of the product quality and how much effective automation testing is for the specific project.

Figuring out the True ROI for Automation Testing

Based on the number of regression cycles that need to be executed during the project’s lifetime, the true ROI can shift to a positive zone. ROI is usually calculated by the following formula:
ROI = (Manual Testing cost — Automated testing cost)/Automated testing cost

But the classic method is not valid anymore with agile and DevOps coming in the market. Also, this metric is not realistic since the count of manual tests can never be the same as automated tests. For calculating the true value of ROI of test automation with Selenium automation on the basis of quantity is not an option preferred by many. But it is also not entirely neglected.

Defect Quality

This, in my opinion, is a very important metric for calculating ROI on test automation with Selenium. I believe, that the whole point of test automation with Selenium is to not erase the need for manual testers in the project. The point of automation testing is to reduce the amount of time consumption from a tester’s narrow schedule, so they could come up with more out of the box test cases. Improving the quality of your test case will definitely help you shape your web-application for better.

General Mistakes While Calculating ROI On Test Automation

Although calculating ROI involves basic calculation using some simple formula, mistakes may occur if you miss some important parameters. Let’s discuss some common mistakes which people make while calculating ROI.

You Really Didn’t Ignore Manual Testing Completely…Did You?

Only keeping automated testing efforts as the primary measuring parameter is one of the biggest mistakes. Manual testing will always be important. When it comes to cross browser testing, some scenarios can be automated but there are areas where you would need to interact with your web-app live, by performing manual cross browser testing. Because visual defects are easily detected manually than running an automation script. Facts like whether the website looks good in all browsers or whether a certain navigation menu works properly in a specific browser are always checked manually. If you automate these tests, they will not provide a high ROI on test automation with Selenium. Even if you don’t calculate the manual efforts, you still have to spend time and money on it.

Note: Random Date Generator allows users to randomly select a day, month, and year from any point in time. In addition, users can enter ranges of years they want and pick numbers up to 100.

Always Think About the Bigger Picture

While measuring the ROI on test automation with Selenium, you must consider a longer time period. Inspecting how a certain testing methodology will benefit the organization for a short time is not ideal. You must check how it impacts the organization as well as the team in the long run. Instead of months, calculate how the impact will be over a period of 3 to 5 years. For instance, should you opt for shift-left testing? Shift left testing is a methodology which focuses you to perform testing as soon as possible, right from the requirement gathering phases. The idea behind is to think of bugs and find them as soon as possible because it is believed that a bug found at a later stage of SDLC will be a lot more expensive compared to a bug which is found in the initial stages.

Did You Sync Your Organization’s Capability?

You must sync the capabilities of your organization along with the test automation tool stack. For successfully implementing an automation testing strategy, both product knowledge, as well as knowledge in automation, is required. Your team should have a clear understanding of how to use the planned automation tool as well as how the application works.

Test Maintenance Is An Important Factor To Consider

Maintenance of the test cases is another factor people tend to miss while measuring ROI on test automation with Selenium. When you are using Selenium for automated cross browser testing then after successful implementation of a testing strategy, you will regularly need to update and maintain the test cases. The regression suite and your test cases will start to grow as you add new pages, enhancement or update the features of your web application. Ensuring the usability of those test cases for a longer time period will require regular maintenance.

Missing Out On Proper Documentation

This is a very common mistake, and it is not only from an automation tester perspective but also from a managerial point of view. Documentation should be set as a standard for every organization. When an automation tester writes a test script, they should prepare a document explaining the purpose of that script and the working of it. A common knowledge base should be made available to collect document around every automation script that is active for your organization. This would serve as a foundation for every budding resource who gets on-board with the process. It would also help to eliminate any collateral damage that your web-application may receive by the absence of any senior test automation engineer or if an automation tester went to switch from your company to another. So the next time you calculate your ROI on test automation with Selenium, make sure to keep in mind the effort & bandwidth involved in maintaining one such knowledge base for internal employees.

Action Items For Maximum ROI On Test Automation With Selenium

By far we realize the common mistakes, metrics for calculating ROI on test automation with Selenium. What comes next? The execution part. What is the best way to get the maximum ROI on test automation with Selenium? Well, here are a few noteworthy actionable insights to help you derive the maximum profit from test automation.

Implement Automation For New Test Cases

This is a very important factor to consider, especially if you are switching from manual to automation. Let’s suppose you are introducing Selenium WebDriver for automated cross browser testing in your organization.

  • Calculate the number of test cases which are required to be automated

  • In this step, check which ones should be automated and which ones should remain manual.

  • Don’t convert every test case for automation. There are some things which should only be tested manually.

  • Calculate the hourly cost of the testers who are executing your test cases.

  • If some testers have no experience in automation, calculate the training cost as well.

Prioritize The Process Of Automating New Test Cases

We all know that regression testing is always kept at top priority, especially when it comes to visual regression testing of a web application across different browsers to check its cross browser compatibility.

Regression testing mostly involves repetitive execution of the old test cases to ensure that some newly added functionalities or enhancements have not introduced any new or old defect. Over time, when your web apps grow in architecture as well as functionality, keeping the process of regression testing manual will prove to be costly. Implementing automated visual regression testing makes sense if you want to reduce the cost.

  • While calculating the ROI, assume each new test case will soon become a part of regression testing. Keep them as a part of your regression test strategy.

  • Sort test cases according to complexity and check which can be automated among them.

  • As said before, keep into account the cost of maintaining the old test cases.

Note:- Random GUID Generator: This free online tool allows users to generate GUID or UUID which is an acronym for 'Globally Unique Identifier' (or 'Universally Unique Identifier').

Near About 100% Test Coverage Across Different Test Configurations Of Browsers & OS

The primary goal of automation testing is to improve the quality of your application. While calculating ROI, you should also consider the fact that the mode of viewing a website is increasing daily. There are hundreds of browsers and devices in the market on which people may view your web application and the number is growing regularly. Define a browser compatibility testing matrix.

Best Practices to Increase the Coverage Rate

You can increase the rate of environmental coverage by executing smoke tests, unit tests, regression tests, noting the defect leakage.

Unit tests— Unit tests cover the highest count while running the testing phase of your web application. It always makes sense when you invest in a parallel testing mechanism to save time.

Smoke tests— Running smoke tests in parallel is the best way to cover the test cases while pushing a hotfix into the application. Automated smoke tests are a great way to evaluate your web-application on a daily basis.

Regression Tests— In today’s Agile age, rapid deployment demands more and more regression testing to test version control. Running parallel regression tests ensures that each latest build works perfectly like the previous build, helping you to expand the test coverage in a significantly shorter amount of time.

Keep in mind the Defect leakage— It is the number of bugs that occur during the production cycle because they were not detected during the previous testing phases. These can occur due to less functional testing coverage or a poor testing environment.

Try using the shift left testing approach. This involves testers validating the application before it is developed. Developers are also involved in it by running unit test cases once they finish developing a certain module. The core idea is to start uncovering bugs sooner which will ultimately reduce the cost.

Figure Out The Count Of Reusable & Redundant Test Cases

Duplicate test cases are an important factor that may lead to the growing budget for testing. There is no point in recreating the same test cases which you used earlier for a different module. Reusing test cases leads to improvised testing speed and a faster test cycle.

Calculating this cost involves checking

  • The number of repeated test cases

  • Test cases having duplicate components

  • The time required for detecting and developing all those redundant test cases.

  • Calculate the cost of using a test case management tool

Best Practises to Reduce Redundancy

  • Use a Test case management tool to find out duplicate scripts. You can use those tools to store the tests with custom fields which can be personalized later according to your requirements. Using a test case management tool will help you to search for redundancies quickly.

  • You can also develop modular test scripts which can be reused later. Find out the tests which are executed more often. For example, sign in our sign out functionality. For checking if these 2 works perfectly, you have to test across a number of variations. Create a modular test case which can be used for every login and log out variations.

Execute Hassle-Free Automated Cross Browser Testing With A Selenium Grid On-Cloud

An imperative area for calculating ROI on test automation with Selenium lies around the execution method. Selenium, as we know, is an open-source test automation framework meant for facilitating web-app testing. Now, you can perform automation testing with Selenium either locally on your own or by using one of the cloud-based tools which offer Selenium Grid.

When you are performing automation testing with Selenium through your own infrastructure then you would have to keep in mind the budget when you scale your automation testing suite. How will you introduce new devices? New browser versions? Your existing machine would also need a heavy hardware upgrade for supporting Selenium Grid’s parallel execution. However, if you are performing test automation with Selenium Grid on the cloud then you can scale effortlessly along with your project requirements.

Selenium on its own doesn’t provide a feature for test reporting. You can extract test reports using test automation frameworks based upon the language you use. If you are using cloud-based Selenium Grid of LambdaTest then you can extract these reports through our Open Selenium API.

Another key difference between the two methods lies around parallel testing. With a Selenium Grid defined on your local machine, you will only be able to run your test cases on browsers which are installed in that local machine. However, if you are using a cloud-based Selenium Grid such as LambdaTest then you get to test across 2000+ real browsers & browser versions.

Remember, without properly executed parallel testing, there remains the risk of encountering defects later in the testing cycle. The faster you detect a bug, the less costly it is to fix it.

Advanced ROI Calculation Techniques

Now that we have covered the basics, let’s get to know the advanced techniques used for calculating ROI.

Calculate Efficienct ROI

Since automation test cases can run all day long, ROI calculation is performed in terms of days. On the other hand for manual testing, only the working hours of a tester is counted, which is on an average, 8 hours. The formula, which forms the base of calculating ROI is

a) Automation test script development time = (Hourly automation time per test*Number of automation test cases)/8
b) Automation test script execution time = (Automation test execution time per test*Number of automation test cases*Period of ROI)/18
c) Automation test analysis time = (Test Analysis time*Period of ROI)/8
d) Automation test maintenance time = (Maintenance time*Period of ROI)/8
e) Manual Execution Time = (Manual test execution time*Number of manual test cases*Period of ROI)/8

Note: Period of ROI is the number of weeks for which ROI is to be calculated, Divided by 8 is done wherever manual effort is needed. Divided by 18 is done wherever automation is done.

In Efficiency calculation, the primary focus is on how much effective automation testing is to the organization. The money factor is considered secondary and it is not mandatory to include the tester’s hourly billing rate.

Risk Reduction ROI

This involves independently calculating the benefits of automation. We will again take the example of cross-browser testing using WebDriver to understand how it works. During manual testing, the entire testing team used to spend a lot of time running the same test cases repeatedly across multiple browsers. After the introduction of automation, they have a lot of extra time in hand for performing productive work like designing test cases, analyzing the application, etc. In short, Risk reduction ROI addresses the issues which were not addressed previously.

With the implementation of automation, test coverage increases. Depending entirely on manual testing will lead to unnecessary bugs which may occur after delivery. Thus leading to reduced product quality as well as testing efficiency. This probable loss is considered to be a risk. There is no change in investment cost. Only the monetary loss is calculated which the organization may face without the implementation of automation.

It’s A Wrap!

Thanks for the read, I hope you now have sound knowledge & strategic clarity to help convince your higher management around the ROI on test automation with Selenium. Don’t make the mistake of thinking that ROI is just about comparing the time and money spent while testing a web application manually versus automating the test cases. There are a lot of factors to consider, each coming with their own benefits and pitfalls. Also, ROI cannot be calculated using a single formula. There are multiple mechanisms and what you need to choose depends on your organization’s requirements and the project’s situation. Happy testing! 🙂

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.