Abstract:Condition/decision coverage(C/DC) is a frequently used coverage criteria for safety-critical software testing.It requires every decision and condition in the program have taken all possible outcomes(true or false).Existing approaches of automatic test generation for C/DC criteria are defective.For example, symbolic execution based approaches are limited by the constraint solver, which is difficult in processing non-linear constraints;hill climbing often sticks at local optima, which limits yielding of high-coverage cases;and simulated annealing and genetic algorithm need complicated configuration, which make the results unstable.In this paper, a novel test generation approach that is guided by linear fitting is proposed.The basis of the approach is to sample every decision and condition of numerical values with program instrumentation.The relationship of inputs and samples is then build with linear fitting functions.By searching the target inputs on the gradually refined functions, test case is generated with high coverage.Experiments on 25 real programs in open source projects show that the proposed approach is more effective and efficient than the genetic algorithm of test generation.