Method and system for generating an efficient test suite from a domain description with given constraints
First Claim
1. In a computing environment, a method comprising:
- receiving a plurality of parameters, and for each parameter, a value set of at least one value to test in conjunction with at least one other parameter value in an N- way combination wherein N is at least two; and
processing the plurality of parameters and the value set for each parameter into a suite of test cases, each test case comprising one value for each parameter, the suite automatically generated such that any valid N-way combination of values appears at least once in a test case.
2 Assignments
0 Petitions
Accused Products
Abstract
Provided is a system and method comprising a test suite generation mechanism for testing a domain (e.g., software program) via “black-box” testing. Parameters are defined, appropriate values for each are chosen, and via the system and method a suite of test cases are automatically generated that covers all N-way parameter combinations (e.g., pairs when N=2) while respecting any specified domain constraints. After receiving a model comprising the parameters and respective values to test, along with constraints in a form of logical predicates, the system and method produces the test cases. Based on the constraints, an algorithm removes invalid combinations in a first stage, and prevents any other invalid combinations from being used in a second stage during the test case generation process. A full set of statistically valuable test cases are thus efficiently and automatically generated, significantly improving testing while significantly reducing the resources needed to test.
-
Citations
33 Claims
-
1. In a computing environment, a method comprising:
-
receiving a plurality of parameters, and for each parameter, a value set of at least one value to test in conjunction with at least one other parameter value in an N- way combination wherein N is at least two; and
processing the plurality of parameters and the value set for each parameter into a suite of test cases, each test case comprising one value for each parameter, the suite automatically generated such that any valid N-way combination of values appears at least once in a test case. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. In a computing environment, a method of constructing a suite of test cases, comprising:
-
selecting a parameter for which a value is needed in a partial test case being built;
obtaining a list comprising at least one value for the parameter which when added to the partial test case does not violate any constraint, the values arranged as a set of N-way comibinations with respect to values of other parameters;
applying selection criteria determine a selected value from the list; and
adding the selected value to the partial test case. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28)
-
-
22. The method of claim 22 further comprising, providing a constraints language that can be parsed into a syntax tree.
-
29. In a computer system, a system comprising:
-
a test cases generation mechanism, the test cases generation mechanism configured to;
read a model comprising parameters and values to test for those parameters, and to process the model into a set of N-way combinations of values for the parameters; and
build a suite of test cases from the set by starting a partial test case, selecting a parameter, determining a valid value for that parameter by comparing the value against each other value in the partial test case with respect to any constraints, selecting a valid value and adding the selected value to the partial test case, and when adding the value makes the test case complete, adding the test case to a test suite, and tracking which N-way combinations are covered in the test case, the test suite complete when no valid combination in the set remains uncovered in at least one test case; and
a medium to which the test cases generation mechanism outputs the suite of test cases. - View Dependent Claims (30)
-
-
31. In a computing environment, a system comprising:
-
means for receiving a plurality of parameters and parameter values to test in an N-way combination of values; and
means for processing the values in the N-way combinations into a suite of test cases, each test case comprising one value for each parameter, the suite automatically generated such that any valid N-way combination of values appears at least once in a test case.
-
-
32. A computer-readable medium having maintained thereon a data structure, comprising:
-
a suite of test cases;
each test case comprising a set of values for a set of parameters to be tested in N-way combinations of those values; and
each value added to each test case by automatic generation such that any value to be added to a test case that is a partial test case having at least one other value is evaluated with respect to each other value and any constraints, such that no invalid N-way combination of values is included in a test case. - View Dependent Claims (33)
-
Specification