Font Size: a A A

The Generation Of Regression Test Data Based On MC/DC Criterion By Using Genetic Algorithms

Posted on:2017-06-11Degree:MasterType:Thesis
Country:ChinaCandidate:Y HanFull Text:PDF
GTID:2348330491958249Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In nuclear power software testing, mainly including static unit tests, dynamic unit tests, functional testing, integration testing of four parts, for each test we have to do at least three times of regression testing to ensure the correctness of the changed code and avoid the modified code to have an adverse effect on other modules of the program under test, and each regression testing,we will divide the pre-existing test cases into two parts,they are effective use cases and the current round of invalid cases, in order to satisfied the test coverage criteria,we must be to supplement some test cases.In the whole process of testing,for unit testing,because we have to analyze the code and it's complexity is higher, and artificially generated test case is easy to appear errors and the unit testing takes a relatively long time, accounted for 1/3 of the test work and even more so,so, unit regression test case automatic generation become the research content of this paper. The genetic algorithm can maximize uses the existing test cases, and can improve the efficiency of test data generation. So this paper proposes use the genetic algorithm to generate unit regression test data.Also, at present, in order to ensure the quality of unclear design software,we mainly adopt the basic path testing combined with logic cover testing methods to do the unit testing.logic coverage mainly includes the statement coverage, branch coverage, condition coverage, modified condition / decision coverage(MC/DC), which strict is more and more strong, and compared with the other logic coverage criteria, MC/DC standard find software defects ability is stronger, and the number of test case only grows linearly, so this paper choices based on MC / DC standard generate the regression test case. In view of the above situation, this paper from the correct regression testing point of view of, is to filter out the premise of effective use cases.For the above, this article, from the regression testing, On the premise of select the effective use cases,in order to add other cases to satify the MC/DC criterion,propose a improved technology of regression test case generation based on MC/DC criterion, it mainly to study two aspects:1) Determine the target condition combinations.It is using data flow analysis technology detect whether the target decesion statement's MC/DC can reach 100%. Firstly, analyzing all possible condition combinations according to the logical structure of decision statement, secondly, basing the records which are covered conditions combinations get the conditions combinations which is not covered,again, based on data flow analysis method and MC/DC criterion analyze whether the decision of the MC / DC up to 100%, finally,through the MC / DC criterion and original set of cases covered path determine the target condition combinations.2) Regression testing data generated by genetic algorithm. First, design the fitness function which fit for this artical,and secondly, determine the target condition combinations, once again, design the objective function and filtered advantage of the initial population,again, for a decesion,determine the genetic component. Finally, using the fitness function improves the probability to get the optimal solution.This article uses the benchmark test function is sumday,from two aspects of the code coverage and practicability compare the MC/DC criterion and the basic path coverage, through theoretical analysis and experimental verification, this method can more quickly and accurately generate regression test data, and can improve the coverage of testing data in the code.
Keywords/Search Tags:regression testing, modified condition/decision coverage, genetic algorithm, fitness function, data flow analysis techniques
PDF Full Text Request
Related items