IP Library Granted Patent US 9,734,043
Granted Patent B2
US 9,734,043 · App. 14/822,050 · Granted Aug 15, 2017

Test selection

Inventors: Gael C. Crova (Cherbourg-Octeville, FR); Guilhem J. Molines (Le Rouret, FR); Pierrick Perret (La Gaude, FR)
Assignee: International Business Machines Corporation
G06F11/3676G06F11/3672
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,734,043
App. No.
14/822,050
Granted
Aug 15, 2017
Kind
B2
Abstract

In a method for selecting one or more tests for a compiled software module, a processor detects that one or more changes have been made to source code for a software module. A processor compiles the source code for the software module. A processor accesses a set of tests for the software module. A processor accesses metadata for each test of the set of tests. A processor receives a first set of one or more rules describing logical conditions relative to the metadata for the tests. A processor selects at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules.

Claims (51)

1. A method of selecting one or more tests for a compiled software module, the method comprising the steps of:

detecting, by one or more processors, that one or more changes have been made to source code for a software module;

compiling, by one or more processors, the source code for the software module;

accessing, by one or more processors, a set of tests for the software module;

accessing, by one or more processors, metadata for each test of the set of tests;

receiving a first set of one or more rules describing logical conditions relative to the metadata for the tests; and

selecting at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules.

2. The method of claim 1 , wherein:

the metadata for each test comprises one or more user-defined properties, not derivable from test data; and

at least a rule of the received first set of one or more rules describes a logical condition in respect of a user-defined property of the one or more user-defined properties.

3. The method of claim 1 , further comprising:

receiving a second set of one or more rules describing execution context for the set of tests; and

wherein, selecting the at least one test from the set of tests further comprises selecting the at least one test from the set of tests whose metadata corresponds to the received second set of one or more rules.

4. The method of claim 1 , wherein the step of selecting the at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules is performed using a rule inference engine.

5. The method of claim 4 , wherein the rule inference engine is implemented with a RETE algorithm.

6. A computer system for selecting one or more tests for a compiled software module, the computer system comprising:

one or more computer processors, one or more computer-readable storage media, and program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising:

program instructions to detect that one or more changes have been made to source code for a software module;

program instructions to compile the source code for the software module;

program instructions to access a set of tests for the software module;

program instructions to access metadata for each test of the set of tests;

program instructions to receive a first set of one or more rules describing logical conditions relative to the metadata for the tests; and

program instructions to select at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules.

7. The computer system of claim 6 , wherein:

the metadata for a test comprises one or more user-defined properties, not derivable from test data; and

at least one a rule of the received first set of one or more rules describes a logical condition in respect of a user-defined property of the one or more user-defined properties.

8. The computer system of claim 6 , further comprising:

program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more processors, to receive a second set of one or more rules describing execution context for the set of tests; and

wherein program instructions to select the at least one test from the set of tests further comprises program instructions to select the at least one test from the set of tests whose metadata corresponds to the received second set of one or more rules.

9. The computer system of claim 6 , wherein the program instructions to select the at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules are performed using a rule inference engine.

10. The computer system of claim 9 , wherein the rule inference engine is implemented with a RETE algorithm.

11. A computer program product for selecting one or more tests for a compiled software module, the computer program product comprising:

one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, the program instructions comprising:

program instructions to detect that one or more changes have been made to source code for a software module;

program instructions to compile the source code for the software module;

program instructions to access a set of tests for the software module;

program instructions to access metadata for each test of the set of tests, wherein the metadata for each test of the set of tests comprises a coverage table defining entry points within the software module impacted by the respective test;

program instructions to receive a first set of one or more rules describing logical conditions relative to the metadata for the tests, wherein at least a rule of the received first set of one or more rules describes a logical condition to identify entry points of respective coverage tables corresponding to the detected one or more changes to the source code; and

program instructions to select at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules.

12. The computer program product of claim 11 , wherein:

the metadata for each test further comprises one or more user-defined properties, not derivable from test data; and

at least a rule of the received first set of one or more rules describes a logical condition in respect of a user-defined property of the one or more user-defined properties.

13. The computer program product of claim 11 , further comprising:

program instructions, stored on the one or more computer readable storage media, to receive a second set of one or more rules describing execution context for the set of tests; and

wherein program instructions to select the at least one test from the set of tests further comprise program instructions to select the at least one test from the set of tests whose metadata corresponds to the received second set of one or more rules.

14. The computer program product of claim 11 , wherein the program instructions to select the at least one test from the set of tests whose metadata corresponds to the received first set of one or more rules are performed using a rule inference engine.

15. The computer program product of claim 14 , wherein the rule inference engine is implemented with a RETE algorithm.

16. The computer program product of claim 1 , wherein the coverage table is a matrix, wherein:

each row of the matrix represents an entry point;

each column of the matrix represents a function; and

each cell represents whether the function of the corresponding column is called by the entry point of the corresponding row.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 10, 2015
From: CROVA, GAEL C.; MOLINES, GUILHEM J.; PERRET, PIERRICK
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 036315/0291 →
Priority Claims (1)
GB 1414257.4 · Aug 12, 2014 · national
Continuity (1)
Related Publication 20160048444A1 · Feb 18, 2016