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, wherein processing the plurality of parameters and the value set for each parameter into a suite of test cases comprises selecting a parameter, determining each valid value for that parameter with respect to any other value in a partial test case, and selecting a valid value as a selected value for that test case, and wherein selecting a valid value comprises determining whether any value appears uncovered more than any other.
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.
22 Citations
29 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, wherein processing the plurality of parameters and the value set for each parameter into a suite of test cases comprises selecting a parameter, determining each valid value for that parameter with respect to any other value in a partial test case, and selecting a valid value as a selected value for that test case, and wherein selecting a valid value comprises determining whether any value appears uncovered more than any other. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 28)
-
-
12. A computer-readable storage medium having computer-executable instructions that when executed by a processor are configured to:
-
receive 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 process 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, wherein processing the plurality of parameters and the value set for each parameter into a suite of test cases comprises selecting a parameter, determining each valid value for that parameter with respect to any other value in a partial test case, and selecting a valid value as a selected value for that test case, and wherein selecting a valid value comprises determining whether any value appears uncovered more than any other.
-
-
13. 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 combinations with respect to values of other parameters; applying selection criteria to determine a selected value from the list, wherein applying selection criteria includes determining whether any one value for that parameter would, if used, cover more uncovered N-way combinations of parameter values in the set than any other value, and if so, selecting that value as the selected value; and adding the selected value to the partial test case. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
-
26. A computer-readable storage medium having computer executable instructions that when executed by a processor are configured to:
-
select a parameter for which a value is needed in a partial test case being built; obtain 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 combinations with respect to values of other parameters; apply selection criteria to determine a selected value from the list, wherein applying selection criteria includes determining whether any one value for that parameter would, if used, cover more uncovered N-way combinations of parameter values in the set than any other value, and if so, selecting that value as the selected value; and add the selected value to the partial test case.
-
-
27. A computer system comprising:
-
a processor; one or more computer readable storage media comprising computer executable instructions that are configured to be executed by the processor, and that when executed by the processor, are configured to; generate a plurality of parameter values, each parameter value being applicable to at least one parameter; generate a plurality of N-way combinations where N parameters are each assigned a value from among the plurality of parameter values, and wherein generating a plurality of N-way combinations comprises generating N-way combinations for all valid combinations of parameter values assigned to parameters; and generate a test case, by selecting a plurality of N-way combinations for the test case and where a sufficient number of parameters have been assigned parameter values to create a valid test case, wherein one or more of the N-way combinations arc selected from remaining untested N-way combinations to maximize the number of valid N-way combinations, from among the plurality of N-way combinations, in the test case.
-
-
29. In a computing environment, a method of creating a test suite comprising one or more test cases, wherein each test case comprises a plurality of parameters, each parameter having a parameter value, wherein parameter values for the test cases are selected such that all valid value combinations for different parameters in an N-way combination are represented in the test suite, where N is a value greater than two, the method comprising:
-
generating a plurality of parameter values, each parameter value being applicable to at least one parameter; generating a plurality of N-way combinations where N parameters are each assigned a value from among the plurality of parameter values, and wherein generating a plurality of N-way combinations comprises generating N-way combinations for all valid combinations of parameter values assigned to parameters; and generating a test case, by selecting a plurality of N-way combinations for the test case and where a sufficient number of parameters have been assigned parameter values to create a valid test case, wherein one or more of the N-way combinations are selected from remaining untested N-way combinations to maximize the number of valid N-way combinations, from among the plurality of N-way combinations, in the test case.
-
Specification