scholarly journals Diversifying Focused Testing for Unit Testing

2021 ◽  
Vol 30 (4) ◽  
pp. 1-24
Author(s):  
Héctor D. Menéndez ◽  
Gunel Jahangirova ◽  
Federica Sarro ◽  
Paolo Tonella ◽  
David Clark

Software changes constantly, because developers add new features or modifications. This directly affects the effectiveness of the test suite associated with that software, especially when these new modifications are in a specific area that no test case covers. This article tackles the problem of generating a high-quality test suite to cover repeatedly a given point in a program, with the ultimate goal of exposing faults possibly affecting the given program point. Both search-based software testing and constraint solving offer ready, but low-quality, solutions to this: Ideally, a maximally diverse covering test set is required, whereas search and constraint solving tend to generate test sets with biased distributions. Our approach, Diversified Focused Testing (DFT), uses a search strategy inspired by GödelTest. We artificially inject parameters into the code branching conditions and use a bi-objective search algorithm to find diverse inputs by perturbing the injected parameters, while keeping the path conditions still satisfiable. Our results demonstrate that our technique, DFT, is able to cover a desired point in the code at least 90% of the time. Moreover, adding diversity improves the bug detection and the mutation killing abilities of the test suites. We show that DFT achieves better results than focused testing, symbolic execution, and random testing by achieving from 3% to 70% improvement in mutation score and up to 100% improvement in fault detection across 105 software subjects.

2012 ◽  
Vol 2012 ◽  
pp. 1-18 ◽  
Author(s):  
Birgit Hofer ◽  
Franz Wotawa

Although slices provide a good basis for analyzing programs during debugging, they lack in their capabilities providing precise information regarding the most likely root causes of faults. Hence, a lot of work is left to the programmer during fault localization. In this paper, we present an approach that combines an advanced dynamic slicing method with constraint solving in order to reduce the number of delivered fault candidates. The approach is called Constraints Based Slicing (CONBAS). The idea behind CONBAS is to convert an execution trace of a failing test case into its constraint representation and to check if it is possible to find values for all variables in the execution trace so that there is no contradiction with the test case. For doing so, we make use of the correctness and incorrectness assumptions behind a diagnosis, the given failing test case. Beside the theoretical foundations and the algorithm, we present empirical results and discuss future research. The obtained empirical results indicate an improvement of about 28% for the single fault and 50% for the double-fault case compared to dynamic slicing approaches.


2018 ◽  
Vol 7 (2.6) ◽  
pp. 275
Author(s):  
Bidush Kumar Sahoo ◽  
Mitrabinda Ray

Concurrent programs have specific features such as italic communication, synchronization and nondeterministic behavior that make the testing activity complex. The objective is to find various types of concurrent defects. In this paper, we have used a model checking tool called Symbolic Path Finder (SPF) which is the upgradation of Java Path Finder (JPF) for concurrent testing. SPF is used for generating the test cases to check concurrent defects such as deadlock, race condition etc. SPF generates symbolic execution tree of the given code which is used as an input for test case generation. The execution is done for finding the test cases in concurrent program where number of threads is operating together with the concurrent defects. The test cases show the type of concurrent defects in the respective line number of the source code.  


Author(s):  
Bharti Suri ◽  
Isha Mangal ◽  
Varun Srivastava

Regression testing is a maintenance activity that is performed to ensure the validity of modified software. The activity takes a lot of time to run the entire test suite and is very expensive. Thus it becomes a necessity to choose the minimum set of test cases with the ability to cover all the faults in minimum time. The paper presents a new test case reduction hybrid technique based on Genetic algorithms(GA) and bee colony optimization (BCO) .GA is an evolutionary algorithms (EA), which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover. BCO is a swarm intelligence algorithm. The proposed approach adopts the behavior of bees to solve the given problem. It proves to be optimistic approach which provides optimum results in minimum time.


Author(s):  
Satoshi Fujimoto ◽  
Hideharu Kojima ◽  
Tatsuhiro Tsuchiya

Pair-wise testing is a widely used strategy of software testing. It requires testing every pair of parameter values at least once. This paper focuses weighting of parameter values for this testing strategy. Weighting is an added feature which allows the tester to prioritize different parameter values by specifying their desired frequency of occurrence in a test suite. This feature is desirable as it allows the tester to have more control over the resulting test suite. However, there has been not much research on weighting: to our knowledge, all existing weighting methods treat weights as a second class requirement and cannot generate a test suite that sufficiently respects the given weights. Aiming to overcome this problem, this paper proposes a weighting method which can be used in combination of any one-test-at-a-time greedy test case generation algorithm. By comparing the parameter value distribution in the current test suite and the ideal one specified by the given weights, the method generates each test case so that the resulting test suite can reflect the weights as accurately as possible. The usefulness of the method is demonstrated through empirical results.


Author(s):  
James C. Austrow

A mathematical description for an optimum balance weight search algorithm for single plane multipoint balance is presented. The algorithm uses influence coefficients, either measured or known beforehand, and measured complex vibration data to determine an optimum balance correction weight. The solution minimizes the maximum residual vibration. The algorithm allows user defined balance weights to be analyzed and evaluated. A test case is presented showing actual results and comparison with a least square solution algorithm. An efficient multiplane influence coefficient calculation scheme is also presented.


2019 ◽  
Vol 8 (2S11) ◽  
pp. 2953-2964

Software testing consumes the major portion of the total efforts required for software development. This activity is very time consuming and labor intensive. It is very hard to do testing in optimal manner. In this paper a new approach is proposed, which uses the nature inspired stochastic algorithm called Cuckoo Search Algorithm (CSA) for the automatic generation of test data for data flow testing. This approach considers all def-use as test adequacy criteria. For assistance to CSA in the state space a new fitness function is also proposed by using the concept of dominator tree and branch distance in a CFG. To validate the proposed approach experiments are carried out on 10 benchmarked programs and findings are contrasted with earlier work done in this domain. Further in order to prove that proposed approach performs better than the above mentioned approaches a statistical difference test (T-test) is also performed.


2021 ◽  
Vol 28 (2) ◽  
pp. 101-109

Software testing is an important stage in the software development process, which is the key to ensure software quality and improve software reliability. Software fault localization is the most important part of software testing. In this paper, the fault localization problem is modeled as a combinatorial optimization problem, using the function call path as a starting point. A heuristic search algorithm based on hybrid genetic simulated annealing algorithm is used to locate software defects. Experimental results show that the fault localization method, which combines genetic algorithm, simulated annealing algorithm and function correlation analysis method, has a good effect on single fault localization and multi-fault localization. It greatly reduces the requirement of test case coverage and the burden of the testers, and improves the effect of fault localization.


Sign in / Sign up

Export Citation Format

Share Document