Abstract: A method (100) to generate test suite for a source-code (1). The method comprises: a) implementing a structural analysis (101) of said source-code (1) to obtain a completed source-code (1) including: - parsing the source-code, - addition of annotations defining tests objectives, - generation of stubs; b) implementing at least one semantic analysis algorithm including categorizing each set of tests objectives as satisfied, impossible to satisfy or unsatisfied; c) feeding a first list (11) with satisfied test cases; d) feeding a second list (21) with test objectives impossible to satisfy, e) implementing at least one mathematical optimization algorithm (103) on parts corresponding to unsatisfied test objectives; - identifying test cases (113) that satisfy at least a part of said test objectives, - feeding said first list of set of test cases with them, - categorizing said test objectives as satisfied; f) providing a test suite comprising the two lists.
We Claim:
1. Method to generate test suite for a source-code, test cases being preliminary stored on a memory accessible to computer means, the method being implemented by said computer means, said method comprising:
a) implementing a structural analysis of said source-code to obtain a
completed source-code including:
- parsing the source-code,
- addition of annotations defining tests objectives into the source-code,
- generation of stubs corresponding to the source-code;
b) implementing at least one semantic analysis algorithm on said completed
source-code including categorizing each set of tests objectives into a single one
of the following categories:
i/ set of tests objectives that are satisfied by using as inputs test cases including test parameters stored on the memory;
ii/ set of tests objectives that are impossible to satisfy with any test case; iii/ set of tests objectives that are, at least temporarily, unsatisfied;
c) feeding a first list of set of test cases with test cases that satisfy the test objectives of category i/;
d) feeding a second list of test objectives with test objectives that are impossible to satisfy and pertaining to category ii/,
e) if the category iii/ is not empty, implementing at least one mathematical optimization algorithm on parts of said completed source-code corresponding to test objectives of category iii/ including:
- identifying test cases that satisfy at least a part of said test objectives,
- feeding said first list of set of test cases with test cases that satisfy said test objectives,
- categorizing said test objectives in category i/;
f) providing a test suite comprising said first list obtained in step c and
completed in step e and said second list obtained in step d corresponding to said
source-code.
2. Method according to claim 1, further comprising the following supplementary preliminary step, before step b of implementing at least one semantic analysis algorithm, comprising implementing at least one mathematical optimization algorithm on parts of said completed source-code, including:
- identifying test cases that satisfy at least a part of said test objectives,
- feeding said first list of set of test cases with test cases that satisfy said test objectives,
- categorizing said test objectives in category i/.
3. Method according to one of the preceding claims, wherein the step e is implemented a first time with a first mathematical optimization algorithm, and then, the step e is implemented at least a second time with a second mathematical optimization algorithm different from the first mathematical optimization algorithm.
4. Method according to one of the preceding claims, wherein the step e is implemented at least one time with at least one mathematical optimization algorithm, and then, before step f, the series of the following steps b', c' and d' is implemented at least one time:
b') implementing at least one supplementary semantic analysis algorithm on parts of said completed source-code corresponding to test objectives of category iii/ such that to categorize at least a part of said test objectives into categories i/ or ii/;
c') feeding said first list of set of test cases with test cases that satisfy the test objectives of category i/;
d') feeding said second list of test objectives with test objectives that are impossible to satisfy and pertaining to category ii/.
5. Method according to one of the preceding claims, wherein step d further comprises associating, to each test objective impossible to satisfy and pertaining to category ii/, information about the reason of impossibility to be satisfied, said information being in a natural language.
6. Method according to one of the preceding claims, wherein at least one semantic analysis algorithm is one of the following:
- the "Value Analysis" module of "Frama-C"
- "CBMC", and
- the "PathCrawler" module of "Frama-C".
7. Method according to one of the preceding claims, comprising the
following steps in this order:
b) implementing the "Value Analysis" module of "Frama-C" on said completed source-code;
e) if the category iii/ is not empty, implementing a genetic algorithm on parts of said completed source-code corresponding to test objectives of category iii/;
b') implementing the CBMC analysis algorithm
b") implementing the PathCrawler analysis algorithm of "Frama-C".
8. Computer software comprising instructions to implement the method of one of claims 1 to 7 when the software is executed by a processor.
9. A computer-readable non-transient recording medium on which a software is registered to implement the method according to one of claims 1 to 7 when the software is executed by a processor.
| # | Name | Date |
|---|---|---|
| 1 | 202047038611-STATEMENT OF UNDERTAKING (FORM 3) [07-09-2020(online)].pdf | 2020-09-07 |
| 2 | 202047038611-REQUEST FOR EXAMINATION (FORM-18) [07-09-2020(online)].pdf | 2020-09-07 |
| 3 | 202047038611-PROOF OF RIGHT [07-09-2020(online)].pdf | 2020-09-07 |
| 4 | 202047038611-POWER OF AUTHORITY [07-09-2020(online)].pdf | 2020-09-07 |
| 5 | 202047038611-FORM 18 [07-09-2020(online)].pdf | 2020-09-07 |
| 6 | 202047038611-FORM 1 [07-09-2020(online)].pdf | 2020-09-07 |
| 7 | 202047038611-DRAWINGS [07-09-2020(online)].pdf | 2020-09-07 |
| 8 | 202047038611-DECLARATION OF INVENTORSHIP (FORM 5) [07-09-2020(online)].pdf | 2020-09-07 |
| 9 | 202047038611-COMPLETE SPECIFICATION [07-09-2020(online)].pdf | 2020-09-07 |
| 10 | 202047038611-MARKED COPIES OF AMENDEMENTS [28-09-2020(online)].pdf | 2020-09-28 |
| 11 | 202047038611-FORM 13 [28-09-2020(online)].pdf | 2020-09-28 |
| 12 | 202047038611-AMMENDED DOCUMENTS [28-09-2020(online)].pdf | 2020-09-28 |
| 13 | 202047038611-FORM 3 [27-10-2020(online)].pdf | 2020-10-27 |
| 14 | 202047038611.pdf | 2021-10-18 |
| 15 | 202047038611-FER.pdf | 2021-10-18 |
| 16 | 202047038611-FER_SER_REPLY [30-11-2021(online)].pdf | 2021-11-30 |
| 17 | 202047038611-FORM 3 [24-05-2022(online)].pdf | 2022-05-24 |
| 18 | 202047038611-FORM 3 [27-11-2023(online)].pdf | 2023-11-27 |
| 19 | 202047038611-PatentCertificate30-04-2024.pdf | 2024-04-30 |
| 20 | 202047038611-IntimationOfGrant30-04-2024.pdf | 2024-04-30 |
| 1 | SearchE_31-08-2021.pdf |
| 2 | SearchE_02-09-2021.pdf |
| 3 | nplE_31-08-2021.pdf |