Optimizing a Regression Test Suite

Regression testing is a vital testing procedure that seeks to unearth software errors, if any, by selective retesting a software system. Regression strives to proliferate the assurance that developers have addressed the key issue and that no additional errors were introduced in the process of fixing other problems. The rider here is the re-execution of test cases developed for previous versions.
In software development, a Regression test suite, or validation suite, is a collection of test cases that are intended to be used while performing selective yet assorted retesting of a software program. A test suite often contains detailed instructions or purpose for each bucket of test cases and information on the system configuration to be used during regression testing.
The regression test suite is essentially a set of test cases that provide a baseline measure of expected or important functionality, and to verify previously fixed bugs do not reoccur.
The epicentre lies in selecting the appropriate minimum suite of tests needed to adequately cover the affected change. In such a scenario the test suite often reflects a conglomeration of difficult tests which has the potential of failing a program if penetrable. Thus the importance of a test suite cannot be downplayed in lending an insightful direction to Regression Testing.
Re-running all existing test cases that do not exercise changed or change-impacted parts of the program is often costly and sometimes even infeasible due to time and resource constraints. The stakes are high to ensure a shorter overall test cycle and stabilize cost parameter.Thus arises the need to optimize the regression suite to maximize coverage and minimize redundancy with minimum simulation time and resources.
Let’s dwell on the need to have an optimized regression suite.
An effective suite of well-designed regression test cases that will not only help provide a baseline assessment of the current version, but a significant portion of the test suite will/should be reused during maintenance or sustained engineering of that product for upwards of 10 years, and some subset of those tests in that suite will also be reused on the next release or version of the product.There are additional benefits to well-designed regression test cases (or any test case for that matter) in that it preserves knowledge for posterity.
Such a regression suite will enable design and verification engineers to rapidly re-verify the design changes and quickly respond to new function requirements and/or what-if analysis.
The aforesaid model was designed on sapping too much of resources and time which had heavy impact on costs making the whole approach impracticable. So we require a strategized and layered approach to the process of regression in the form of a suite and optimization through innovative ideas can lead us through the maze.
One of the pioneering methods for test case suite optimization is aptly called Regression Test Selection (RTS). A striking precondition that surfaces here is that the cost of selecting a part of test suite is less than the cost of running the tests that RTS allows us to omit.RTS divides the existing test suite into (1) Reusable test cases; (2) Retestable test cases; (3) Obsolete test cases. In addition to this classification RTS may create new test cases that test the program for areas which are not covered by the existing test cases.
There is a strong stand for Test Case Prioritization in which test cases to be executed are reordered for affectedly maximizing a score function.The proposed framework is built around predicting the probability that each test case finds faults in the regression testing phase, and optimizing the test suites accordingly.It is a case of acute redundancy that confronts a tester while performing regression testing making the whole suite stale.
In such a scenario there is less likelihood of detecting bugs reusing the same set of test cases.
When redundant test cases or tests that don’t provide great value to the overall testing effort are slovenly added to the regression test suite to simply increase code coverage or to artificially inflate the number of tests for ‘feel-good’ perception generally only results in an overloaded test suite that rapidly grows out of control and becomes a management nightmare.
To alleviate such problems, a new regression suite practice, using random test generators to create regression suites on-the-fly, is becoming more common. In this practice, instead of maintaining tests, we generate test suites on-the-fly by choosing several specifications and generating a number of tests from each specification.Another optimization technique is the Hybrid Approach of both Regression Test Selection and Test Case Prioritization
The brief discourse on Regression testing is incomplete without the token of ROI(Return on Investment). ROI is a financial tool that assists management in evaluating how well it can cover its risks. Return on investment (ROI) as a measurement in a business model has become an important means of evaluating whether a project should be undertaken.
An optimized Regression suite bails the project out of the web of looming impracticality to active pursuance with a growing ROI. It lays to rest impending doubts in the mind of management when it comes to negotiating potential risks involved in the project. These risks may be subtle and inconspicuous but elementary in running a successful show. A healthy ROI is the end product out backed by a confident management with elimination of risks. A well tuned and effective optimized regression suite is paramount since regression is often carried out in a time crunched mode. The nagging question then is that am I getting a valid return on the investment made. Finally an automated Regression suite of test cases gives a visual benefit in an immediate spurt in ROI.
Here we cannot ignore the roles of Software Tester and Developer in optimizing a Regression suite. They are the bedrock for any evaluation of the integrity of a system.
            – A Software Test Engineer has a major role to play in formulating a regression test suite in optimal pursuits. His/her hands are well versed with precise comprehension of the bugs inflicting the system that have been fixed and possible changes introduced because of the fixes. S/he has a sense of where an augmented system might break and how the elements coalesce enforcing major functionalities. An input from their end is vital when targeting optimizing the regression suite.
- We can group bug fixes into homogenous partitions which address similar regression areas modelling an overlap. This will enable performing multiple regressions with a single test case execution.
- The developer’s role cannot be undone when it comes to optimizing regression suite. There has to be a direct liaison between the testers and the developers. S/he knows the ‘how’, ’what’ and ‘when’ of fixing bugs in an application and can play a major role in finalizing a penetrating regression suite with optimal overtones. They have a fair idea of where bugs might have inflicted the system and so can ascertain missed test cases and prejudge redundant test cases to trigger the expanse of test coverage. They can act as a guide to the testers since they have a firsthand knowledge of the bugs and thus maximize optimization of the regression test suite.
In the final analysis the optimal test regression suite should encompass tests with the following features:-
     – Test cases designed to verify critical functional attributes and capabilities of the software program
     – Test cases designed to validate baseline functionality/behaviour specified in project requirements or user acceptance criteria.
     - Test cases designed to verify functional anomalies that are found and fixed during the software development lifecycle.
     – Test cases designed to evaluate collateral or dependent areas associated with a code fix.
     – In order to gain the full benefit of an effective regression test suite automate as many regression test cases as is reasonably possible.
SocialTwist Tell-a-Friend
This entry was posted in Business. Bookmark the permalink.

3 Responses to Optimizing a Regression Test Suite

  1. Dwarika says:

    This is the best article on Regression testing. In this article we are not only finding the definition as per the requirement or baseline but we are getting inculcating in optimizing the regression suit along with regression process. Inclusion of ROI here in Regression as a segregated part seems so interesting and worthy.
    Worth reading this post on regression.

  2. Rajini Padmanaban, Director of Engagement, Global Testing Services says:

    Thanks Dwarika!

  3. The post is written in very a good manner and it entails many useful information for me.I am happy to find your distinguished way of writing the post.Now you make it easy for me to understand and implement the concept.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Captcha Captcha Reload

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Life @ QA InfoTech

Follow us on

Categories

Archives

Service Offerings :