Unit test generalization
First Claim
1. A computerized method comprising:
- receiving a unit test comprising a test of an implementation;
creating a parameterized unit test from the unit test comprising replacing plural concrete values in the unit test with symbolic values and exporting the symbolic values into a signature of the parameterized unit test;
symbolically executing the parameterized unit test to identify path constraints of the implementation; and
creating test cases that conform to the path constraints identified during symbolic execution.
2 Assignments
0 Petitions
Accused Products
Abstract
A computer system provides a test program and one or more unit tests, such as a traditional unit test and or a parameterized unit test. The system also includes a constraint solver, a theorem prover, an implementation under test, a symbolic executor, a generalizor, and generated test cases. The generalizor receives a traditional unit tests as input, and modifies the traditional unit test into a parameterized unit test. The modification includes replacing plural concrete values in the traditional unit test with symbols, and exporting the symbols into a signature of the parameterized unit test. A symbolic executor identifies constraints while symbolically executing the created parameterized unit test of the implementation under test. A constraint solver and or theorem prover generates a set of test cases by solving for values that satisfy the series of constraints. The test program executes the automatically generated test cases.
97 Citations
20 Claims
-
1. A computerized method comprising:
-
receiving a unit test comprising a test of an implementation;
creating a parameterized unit test from the unit test comprising replacing plural concrete values in the unit test with symbolic values and exporting the symbolic values into a signature of the parameterized unit test;
symbolically executing the parameterized unit test to identify path constraints of the implementation; and
creating test cases that conform to the path constraints identified during symbolic execution. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A system for testing programs comprising:
-
a digital processor; and
computer memory comprising, a traditional unit test comprising an implementation under test, a test generalizor for modifying the traditional unit test into a parameterized unit test, the modification comprising, replacing plural concrete values in the traditional unit test with symbols, and exporting the symbols into a parametric signature of the parameterized unit test, a symbolic executor for identifying constraints while symbolically executing the created parameterized unit test of the implementation under test, and a constraint solver that generates a set of test cases by solving for values that satisfy the series of constraints. - View Dependent Claims (15, 16, 17)
-
-
18. A computer readable medium comprising computer executable instructions comprising:
-
instructions for receiving a unit test of an implementation under test;
instructions for creating a parameterized unit test from the unit test comprising replacing plural concrete values in the unit test with symbolic values and exporting the symbolic values into a signature of the parameterized unit test;
instructions for symbolically executing the parameterized unit test;
instructions for identifying one or more path conditions during symbolic execution;
instructions for generating test cases comprising inputs for the parameters of the parameterized unit test; and
instructions for verifying an implementation under test by executing the generated test cases on the inputs to the parameterized unit test. - View Dependent Claims (19, 20)
-
Specification