What is Regression Testing?
Regression testing is a type of software testing which is carried out to confirm if the modifications in a software program have broken any existing functionality. Despite its importance, regression testing is costly, specifically for large codebase / test suite, as it consumes enormous amount of compute resources and time. To understand the scale of this problem, according to the statistics published in 2017 by Continuous Integration (CI) and testing group at Google, 150 Million tests are executed per day for 2 Billion Lines of Code (LOC). At this scale, chances of regression errors are increased, demanding implementation of efficient regression testing strategies. Imagine the waste of resources in this unlucky scenario: developer modifies only one line of code, pushes code to Version Control System (VCS), regression testing is triggered lasting around 9 - 10 hours, regression error is found in the last test case execution and the bug report is sent to the developer.
How to Reduce Regression Testing Time?
Researchers across the world have proposed a variety of techniques to reduce the effort involved in regression testing. Provided below are few of the guidelines on reducing the regression testing time:
1. Automate. Manual regression testing is time consuming, costly and in-efficient. Automation of regression testing is a smart choice, which is now very common in industry. However, automation adds additional overhead of keeping the test suite up-to-date with frequent changes in software. There are plenty of tools and testing frameworks for specific domains to manage automated regression testing, few of which are mentioned below:
- JUnit for Java and Android Applications
- Espresso and UI Automator for Automated UI Testing of Android Applications
- Selenium for Web Applications
- Appium
- TestComplete
- Rational Functional Tester
- Katalon Studio
- QTP
2. Implement Continuous Integration. Automated regression testing eases out the effort involved in manual testing, however, it still requires human intervention to initiate the test run. Incorporating automated regression testing as part of CI / CD pipeline provides a lot of benefits, such as scheduling test run as a nightly job. Heart of CI is a server such as Jenkins, Bamboo or Team City and automated testing frameworks (Selenium, Junit) are integrated with the server as a plugin.
- Select Test Cases with Higher Failing History
- Select Test Cases which Test Core Functionality
- Select Test Cases which Test Features Affected by Recent Change
- Select all Integration Tests
- Select all Boundary Value Tests
4. Test Case Prioritization (TCP). Regression Test Selection (RTS) may be inaccurate because it can miss some potential bug triggering test cases. Test Case Prioritization (TCP) employs nearly similar heuristic based techniques to sort all the test cases based on priority. The objective of TCP algorithm is that the test cases with higher failing probability have higher priority and are executed before the other test cases. This can save a lot of time and compute resources by finding bugs early and not minimizing the test suite (as in RTS).
5. Reduce Frequency of Test Execution. In order to save time and compute resources, one simple way is to execute regression tests after some major software change instead of carrying out after every code commit.
6. Run Tests on Device Farms. There can be a substantial reduction in regression test effort if executed on a farm of real devices, typically connected in CI pipeline.
Adopting above-mentioned techniques can substantially reduce the effort involved in regression testing, which is also cost-effective in long term.
Comments
Post a Comment