About Pair-wise Testing
Pair-wise testing is a technique for creating test cases that cover the combinations of values between two parameters. For more information on pair-wise testing, please check this document.
About Pair-wise testing in GIHOZ
- Parameters: Enter the name of the parameter.
- Values: Enter the possible value for the parameter.
- Constraints: By turning on Use constraints, you can enter constraints in the tabular format or PICT's format.
- Options toggle button: By turning on Use options, you can set options for generating combinations.
- Generate test cases button: Click to generate the test cases.
- Swap rows and columns button: By clicking this button, the table of parameters and values is displayed with its rows and columns swapped.
How to enter parameters and values and generate test cases
Enter a name of a parameter or a value to a cell. If you enter any characters in the bottom row or the rightmost column, the row or column will be added automatically. You can also add and remove the rows and the columns from the right-click menu.
Clicking Swap rows and columns will display the table of parameters and values with the rows and columns swapped. As shown in the figure above, the rows and columns are swapped. Clicking it again will return the table to its original state. After entering parameters and values, click Generate test cases to create test cases.
How to enter constraints in tabular format
Turn on Use constraints and select Tabular format to create a constraint table for each parameter.
In the "If" row (rows 1 to 6 in the image above), enter the values that represent the constraints. In the "Then" row (rows 7 to 12 in the image above), enter the values that each parameter should take based on the conditions specified in the "If" row. You can enter descriptions in the Comments column (row 13 in the image above) . The descriptions in the Comments column do not affect the generation of test cases.
The image above is an example of constraints where Size is always 1000 when Type is Primary, and Cluster size is always 1024 when Type is Single and File system is NTFS. Multiple values can be entered by separating them with ,. If you want to exclude a specific value from the combination, enter # at the beginning of the value you want to exclude. (For example, enter #3000.) If you want to exclude multiple values from the combination, enter # at the beginning and separate them with , (For example, enter #1000,5000).
If there are rows you do not want to display, select the rows you want to hide and choose Hide rows from the right-click menu to hide them.
To display the hidden rows again, select the rows before and after the hidden rows, right-click, and choose Show rows to display them.
How to enter constraints in PICT's format
Turn on Use constraints and select PICT's format to display the PICT's format entry field.
Enter formulas of constraints in PICT's format in the entry field. If you want to know the PICT's format, please click About PICT's format and check the official PICT documentation.
- PICT is a combinatorial test case generation tool released by Microsoft.
How to use options
By turning on Use options, you can set options for generating combinations. Number of parameters to combine allows you to specify the number of parameters to cover the combinations. Only integer between 1 and 5 are allowed.
The generating method can be selected from Default, Random, or Search for the smallest combination. If you select Default, combinations will be generated with the default seed value.
If you select Random, you can generate combinations with the specific seed value. Only integer between 0 and 9999 can be used for the seed.
If you select Search for the smallest combination, GIHOZ will repeat generating combinations for the specified number of attempts and display the smallest combinations of the generated results. Only integer between 1 and 99 can be used for the number of attempts.
If you use Include Seeding Rows, you can generate combinations including specific ones. Enter the name of parameter in the first row of the table and the combinations of values in the second and subsequent rows. For example, if you enter the seeding rows as shown in the figure above, you can generate combinations that includes Type as Primary, Size as 10, and Compression as on.
If you use Sub Model, you can specify the number of parameters to be combined in groups of parameters. Enter sub models in the following format.
{ <Parameter name1>, <Parameter name2>, ... } @ <Order>
For example, if you enter the sub models as shown in the figure above, the combinations are generated by 3-wise between Type, Size, Format method67 and 2-wise between File system and Cluster size.
In the above example of parameters and values, the combinations are generated as follows.
Advanced Features
Re-using Parameter Definitions
You can reuse a parameter once defined by entering the name adding <> as follows.
Aliasing
You can specify multiple names for a single value by entering the names separated with | as follows. The names are rotated among the test cases.
You can use only the first name in constraints. For example, if you want to use quick | fast in the above example in constraints, use quick. fast is not evaluated in constraints.
Negative Testing
When generating combinations that include invalid values, we need to generate combinations where only one invalid value appears. This is due to the fact that typical software is created to perform some kind of error handling the first time it detects an invalid value. If multiple invalid values appears in a generated combination, you can only test the first invalid value to be processed as an error. By entering ~ at the beginning of invalid values as follows, only one invalid value appears in a combination.
If you use a invalid value in constraints, use the value without ~. For example, if you want to use ~-1 in the above example in constraints, use -1. To set an alias to an invalid value, add ~ only to the first name of the alias.
Weighting
You can specify a weight for a value by entering (N) after the value as follows. N can be any positive integer. If a weight is not specified, it is assumed to be 1.
The higher the weight, the more likely it is that the value appears in the combination. However, weight values have no intuitive meaning and do not specify the number of appearances or the relative frequency of appearances.