Regression Testing Cost Reduction Suite

—The estimated cost of software maintenance exceeds 70 percent of total software costs [1], and large portion of this maintenance expenses is devoted to regression testing. Regression testing is an expensive and frequently executed maintenance activity used to revalidate the modified software. Any reduction in the cost of regression testing would help to reduce the software maintenance cost. Test suites once developed are reused and updated frequently as the software evolves. As a result, some test cases in the test suite may become redundant when the software is modified over time since the requirements covered by them are also covered by other test cases. Due to the resource and time constraints for re-executing large test suites, it is important to develop techniques to minimize available test suites by removing redundant test cases. In general, the test suite minimization problem is NP complete. This paper focuses on proposing an effective approach for reducing the cost of regression testing process. The proposed approach is applied on real-time case study. It was found that the reduction in cost of regression testing for each regression testing cycle is ranging highly improved in the case of programs containing high number of selected statements which in turn maximize the benefits of using it in regression testing of complex software systems. The reduction in the regression test suite size will reduce the effort and time required by the testing teams to execute the regression test suite. Since regression testing is done more frequently in software maintenance phase, the overall software maintenance cost can be reduced considerably by applying the proposed approach. I. INTRODUCTION In regression testing as integration testing proceeds, number of regression tests increases and it is impractical and inefficient to re-execute every test for every program if one change occurs.


INTRODUCTION
In regression testing as integration testing proceeds, number of regression tests increases and it is impractical and inefficient to re-execute every test for every program if one change occurs.
Test suite reduction techniques decrease the cost of software testing by removing the redundant test cases from the test suite while still producing a reduced set of tests that covers the same level of code coverage as the original suite.
Optimizing the cost of the regression testing without compromising the fault exposing capability is always challenging for the testing team.Testing team always face constraints like lack of resources, squeezed testing schedule, changing and ambiguous requirement, which in terms impacts and reduces the effectiveness of regression testing.The Test automation tool will help testing team speed-up the test execution.
Due to the differences in the execution costs between the test cases, the representative set with the smallest number of tests may not be the one with the minimum execution cost.As such, the cost of a test should be a more important consideration for achieving cost-effective testing than the size of the test suite.Thus, it is necessary to consider individual execution costs when choosing the test cases.
The traditional HGS algorithm is one of the most common algorithms aiming to reduce the cost of regression testing.It is proposed by Harrold, Gupta and Soffa to test suite reduction "Selecting a representative set of test cases from a test suite, providing the same coverage as the entire test suite" that has received considerable attention.This algorithm assumes that we could have Ti (for i = 1, 2, 3, .., m) represent the subsets of T, with each subset Ti containing all of the test cases that satisfy the ith test requirement.The HGS algorithm could determine the representative test cases for each subset and include them in the representative set.The HGS algorithm follows the following four steps: The traditional HGS algorithm suffers from some disadvantages since no clear reason is shown for the initial www.ijacsa.thesai.orgchoice of the test cases as starting point.Also, it did not assure the cover all tests with all possible cases of all the selection statements.

II. PROBLEM STATEMENT
Given a set T of test cases {t1, t2, t3, ...., tn}, a set of testing requirements {r1, r2,• • ,rm} that must be covered to provide the desired coverage of the program, and the information about the testing requirements exercised by each test case in T, the test suite minimization problem focus on finding a minimal cardinality subset of T that exercises the same set of requirements as those exercised by the unminimized test suite T.
Most of the existing approaches to reduction aim to decrease the size of the test suite disregarding the time/cost.Yet, the difference in the execution time/cost of the tests is often significant and it may be costly to use a test suite consisting of a few long-running test cases.[2] The reduction in the original test suite could be computed according to the following formula: Where: CR Original regression test suite C min Reduced regression test suite III.ALTERNATIVE APPROACHES Many techniques have been proposed to obtain the nearoptimal solution for the test suite reduction problem.Even though the representative sets produced by these techniques are not guaranteed to be optimal, they can significantly decrease both the size of the test suite and the cost associated with its execution.These approaches could include the usage of Greedy algorithm, selective redundancy approach and irreplaceability algorithm.

A. Greedy Algorithm
The Greedy algorithm is a commonly-used method for finding the near-optimal solution to the test suite reduction problem.This algorithm repeatedly removes the test which covers the most unsatisfied test requirements from the test suite set T to the requirements set until all of the requirements are covered.Many existing test suite reduction methods are based on the concept of the Greedy algorithm.In other words, many algorithms repetitively choose the "best" test case to obtain the near-optimal solution from the locally optimal solutions.[3]

B. Test Suite Reduction with Selective Redundancy
Test suite reduction that attempts to selectively keep redundant tests in the reduced suites.Experiments show that this approach can significantly improve the fault detection effectiveness of reduced suites without severely affecting the extent of test suite size reduction.This assures the achievement of high suite size reduction while simultaneously allowing for low fault detection effectiveness loss.The intuition driving is that when a non-reduced suite contains lots of redundancy with respect to a coverage criterion, it may be helpful to selectively keep some of that redundancy in the reduced test suite so as to retain more fault detection effectiveness in the reduced suite, hopefully without significantly affecting the amount of suite size reduction.[4]

C. Irreplaceability Algorithm
This algorithm is based on the concept of test irreplaceability which creates a reduced test suite with a decreased execution cost.Leveraging widely used benchmark programs, the empirical study shows that, in comparison to existing techniques, the presented algorithm is the most effective at reducing the cost of running a test suite.[5] IV.RELATED WORK Researchers, practitioners and academicians proposed various techniques on test suite reduction, test case prioritization, and regression test selection for improving the cost effectiveness of the regression testing.
Rothermel and Harrold presented a technique for regression test selection.Their algorithms construct control flow graphs for a procedure or program and its modified version and use these graphs to select tests that execute changed code from the original test suite [6].
James A. Jones and Mary Jean Harrold proposed new algorithms for test suite reduction and prioritization [5].Saifur-Rehman Khan, Aamer Nadeem proposed a novel test case reduction technique called Test Filter that uses the statement-coverage criterion for reduction of test cases [8].T. Y. Chen and M. F. Lau presented dividing strategies for the optimization of a test suite [4].M. J. Harrold etal presented a technique to select a representative set of test cases from a test suite that provides the same coverage as the entire test suite [8].This selection is performed by identifying, and then eliminating, the redundant and obsolete test cases in the test suite.This technique is illustrated using data flow testing methodology.
A recent study by Wong, Horgan, London, and Mathur [3], examines the costs and benefits of test suite minimization.Rothermel et al [2] described several techniques for using test execution information to prioritize test cases for regression testing, including: techniques that order test cases based on their total coverage of code components, techniques that order test cases based on their coverage of code components not previously covered, and techniques that order test cases based on their estimated ability to reveal faults in the code components that they cover.Most of the techniques described in the above papers assume that source code of the software is available to the testing engineer at the time of testing.But in most of the organizations the testing is done in black box environment and the source code of the software is not available to the testing engineers.A simple greedy algorithm for the set-cover problem (and therefore for the test suite minimization problem) is described in [4].The work presented in [9] uses a greedy technique for suite reduction in the context of model-based testing.This work showed that while suite sizes could be greatly reduced, the fault detection capability of the reduced suites was adversely affected.This www.ijacsa.thesai.orgsituation increases the degree of complexity of the proposal solutions for the test suite minimization problem.
Existing test suite minimization techniques are defined in terms of test case cover-age as they attempt to minimize the size of a suite while keeping some coverage requirement constant.A related topic is that of test case prioritization.
In contrast to test suite minimization techniques which attempt to remove test cases from the suite, the test case prioritization techniques [8, 10, and 11] only re-order the execution of test cases within a suite with the goal of early detection of faults.In [11], the ATACMIN tool [6] was used to find optimal solutions for minimizations of all test suites examined.This work showed that reducing the size of test suites while keeping all uses coverage constant could result in little to no loss in fault detection effectiveness.In contrast, the empirical study conducted in [12] suggests that reducing test suites can severely compromise the fault detection capabilities of the suites.
A new model for test suite minimization [7] has been developed that explicitly considers two objectives: minimizing a test suite with respect to a particular level of coverage, while simultaneously trying to maximize error detection rates with respect to one particular fault.A limitation of this model is that fault detection information is considered with respect to a single fault (rather than a collection of faults), and therefore there may be a limited confidence that the reduced suite will be useful in detecting a variety of other faults.
From the previous demonstration of the above related work, it could be concluded that suite size and fault detection effectiveness are opposing forces in the sense that more suite size reduction would intuitively imply more fault detection and effectiveness loss, since throwing away more test cases, in effect, throws away more opportunities for detecting faults.Thus, there seems to be an inherent tradeoff involved in test suite reduction: one may choose to sacrifice some suite size reduction in order to increase the chances of retaining more fault detection effectiveness.

V. ENHANCED HGS ALGORITHM (EHGSA)
The research approach target is to get the original regression testing and the reduced regression test suite reduction with selective redundancy by modifying the HGS algorithm.This approach is general and can be applied to any test suite minimization technique.EHGSA finds the minimum regression test with minimum machine time of the test suite covering all possible paths primary variables values of the all selection branch cases (IF) statements of both cases True/False (T/F) of the program tested.
The EHGSA algorithm have several advantages since it take into consideration all the possible braches cases of selection statements included in the program being tested.Also, it computes the real machine time for each branch case and the total time for each test of the test suite.The pseudo code of the EHGSA algorithm is illustrated in Fig. 1.The following figure illustrate the results in a bar chart which clarify that the reduction in cost of regression testing for each regression testing cycle is ranging highly improved in the case of programs containing high number of selected statements Fig. 3. EHGSA Reduction Cost Results www.ijacsa.thesai.orgIX.CONCLUSION Selecting the reduced testing cases, in appropriate accurate approach; needs browsing all the possible paths of cases of the selection statements included in the cod.

Begin
The paper proposed algorithm automatically generates the test suite that cover all possible test primary variables values of all cases true/false for all selection statement of the tested program code.This algorithm computes the machine time of each test case on a dynamic base using the linked list with test node.The EHGSA finds the subset tests covering all possible test paths of all selection statements with minimum machine time which in turn reduced the regression testing cost.

TABLE I .
THE TEST SUITE FILE FOR ALL POSSIBLE PRIMARY VARIABLES VALUES M X N. WHERE: N: NUMBER OF SELECTION STATEMENTS, M