US 11,755,463 B2
Method to generate test suite for source-code
David Mentre, Rennes (FR); Denis Cousineau, Rennes (FR); and Eric Lavillonniere, Rennes (FR)
Assigned to MITSUBISHI ELECTRIC CORPORATION, Tokyo (JP)
Appl. No. 16/970,671
Filed by MITSUBISHI ELECTRIC CORPORATION, Tokyo (JP)
PCT Filed Mar. 7, 2019, PCT No. PCT/JP2019/010432
§ 371(c)(1), (2) Date Aug. 18, 2020,
PCT Pub. No. WO2019/188313, PCT Pub. Date Oct. 3, 2019.
Claims priority of application No. 18305333 (EP), filed on Mar. 26, 2018.
Prior Publication US 2020/0379888 A1, Dec. 3, 2020
Int. Cl. G06F 11/36 (2006.01); G06F 17/11 (2006.01)
CPC G06F 11/3684 (2013.01) [G06F 11/3676 (2013.01); G06F 17/11 (2013.01)] 9 Claims
OG exemplary drawing
 
1. A method to generate a test suite for a source-code, test cases being stored on a memory accessible to a computer, the method being implemented by said computer, said method comprising:
a) implementing a structural analysis of said source-code to obtain a completed source-code including:
parsing the source-code,
adding annotations defining test objectives into the source-code, and
generating stubs corresponding to the source-code;
b) implementing at least one semantic analysis algorithm on said completed source-code including categorizing the test objectives into the following categories:
i) a first set test objectives that are satisfied by using as inputs test cases including test parameters stored on the memory;
ii) a second set of test objectives that are impossible to satisfy with any test case; and
iii) a third set test objectives that are, at least temporarily, unsatisfied;
c) feeding a first list of a set of test cases with test cases that satisfy the test objectives of the category i;
d) feeding a second list of test objectives with test objectives that are impossible to satisfy and pertaining to the category ii,
e) implementing at least one mathematical optimization algorithm, on a basis of a presence of the set of test objectives in the category iii, on parts of said completed source-code corresponding to the test objectives of the category iii including:
identifying test cases that satisfy at least a part of said test objectives in the category iii,
feeding said first list of the set of test cases with test cases that satisfy said test objectives in the category iii; and
f) providing the test suite, the test suite comprising said first list obtained in the step c and completed in the step e and said second list obtained in the step d, wherein
each of the first, second and third sets of test objectives in the categories i, ii and iii comprises at least one of the test objectives.