Automatic regression testing based on cyclomatic complexity
First Claim
Patent Images
1. A processor-implemented method of automating regression testing, the processor-implemented method comprising:
- identifying, by a processor, a base code change in a software program;
receiving, by the processor, a string of binary data that represents a cyclomatic complexity of the base code change, wherein the cyclomatic complexity of the base code change is defined by a formula;
M=E−
N+Pwhere E=a quantity number of edges in a graph of the base code change,N=a quantity of nodes in the graph of the base code change, andP=a quantity of exit nodes depicted in the graph of the base code change;
mapping, by the processor, the base code change to different software test routines, wherein the different software test routines have been predetermined to test changes to the software program; and
executing, by the processor, a quantity of the different software test routines on the base code change to automatically perform regression testing on the software program, wherein the quantity of the different software test routines that are executed on the base code change is determined by the cyclomatic complexity of the base code change.
1 Assignment
0 Petitions
Accused Products
Abstract
A processor-implemented method, system, and/or computer program product automates regression testing based on cyclomatic complexity of changed code. A base code change to a software program is identified as having a particular cyclomatic complexity. Multiple different software test routines are mapped to the base code change. A specific quantity of the different software test routines are then run to test the base code change, where the quantity of test routines that is run is based on the cyclomatic complexity of the base code change.
13 Citations
20 Claims
-
1. A processor-implemented method of automating regression testing, the processor-implemented method comprising:
-
identifying, by a processor, a base code change in a software program; receiving, by the processor, a string of binary data that represents a cyclomatic complexity of the base code change, wherein the cyclomatic complexity of the base code change is defined by a formula;
M=E−
N+Pwhere E=a quantity number of edges in a graph of the base code change, N=a quantity of nodes in the graph of the base code change, and P=a quantity of exit nodes depicted in the graph of the base code change; mapping, by the processor, the base code change to different software test routines, wherein the different software test routines have been predetermined to test changes to the software program; and executing, by the processor, a quantity of the different software test routines on the base code change to automatically perform regression testing on the software program, wherein the quantity of the different software test routines that are executed on the base code change is determined by the cyclomatic complexity of the base code change. - View Dependent Claims (2, 3, 4, 5, 6, 7, 18, 19, 20)
-
-
8. A computer program product for automating regression testing, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code readable and executable by a processor to perform a method comprising:
-
identifying, by a processor, a base code change in a software program; receiving, by the processor, a string of binary data that represents a cyclomatic complexity of the base code change, wherein the cyclomatic complexity of the base code change is defined by a formula;
M=E−
N+Pwhere E=a quantity number of edges in a graph of the base code change, N=a quantity of nodes in the graph of the base code change, and P=a quantity of exit nodes depicted in the graph of the base code change; mapping, by the processor, the base code change to different software test routines, wherein the different software test routines have been predetermined to test changes to the software program; and executing, by the processor, a quantity of the different software test routines on the base code change to automatically perform regression testing on the software program, wherein the quantity of the different software test routines that are executed on the base code change is determined by the cyclomatic complexity of the base code change. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer system comprising:
-
a processor, a computer readable memory, and a non-transitory computer readable storage medium; first program instructions to identify a base code change in a software program; second program instructions to receive a string of binary data that represents a cyclomatic complexity of the base code change, wherein the cyclomatic complexity of the base code change is defined by a formula;
M=E−
N+Pwhere E=a quantity number of edges in a graph of the base code change, N=a quantity of nodes in the graph of the base code change, and P=a quantity of exit nodes depicted in the graph of the base code change; third program instructions to map the base code change to different software test routines, wherein the different software test routines have been predetermined to test changes to the software program; and fourth program instructions to execute a quantity of the different software test routines on the base code change to automatically perform regression testing on the software program, wherein the quantity of the different software test routines that are executed on the base code change is determined by the cyclomatic complexity of the base code change; and
wherein the first, second, third, and fourth program instructions are stored on the non-transitory computer readable storage medium for execution by the processor via the computer readable memory.- View Dependent Claims (16, 17)
-
Specification