Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:comb_data_modeling [2020/06/10 03:45] admin |
tutorial:comb_data_modeling [2021/01/05 03:00] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tutorial: Combinatorial Modeling and Test Generation ====== | ====== Tutorial: Combinatorial Modeling and Test Generation ====== | ||
- | Learning Objectives: | + | ====Learning Objectives |
* [[#What is Combinatorial Model?]] | * [[#What is Combinatorial Model?]] | ||
- | * [[#Build Model]] | + | * [[#Create |
* [[#Generate Test Cases]] | * [[#Generate Test Cases]] | ||
* [[#Make Changes]] | * [[#Make Changes]] | ||
Line 10: | Line 10: | ||
Combinatorial Model is an abstraction and representation of a combinatorial problem. | Combinatorial Model is an abstraction and representation of a combinatorial problem. | ||
- | Combinatorial Model consists of a list of variables with each variable having a set of domain values to be tested. The objective | + | Combinatorial Model consists of a list of variables with each variable having a set of domain values to be tested. The objective is to produce |
+ | |||
+ | Consider three variables with each variable has a domain of 10 possible values. | ||
+ | |||
+ | So if we were to reduce the test cases to test, which of the 1000 test cases can we cut? | ||
+ | |||
+ | According to {{https:// | ||
+ | |||
+ | // | ||
+ | |||
+ | In the example above, suppose we want to ensure every pair of variables are tested, we could use Pairwise algorithm to generate the test cases and the result is 99 test cases, which is 10% of 1000 test cases. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Create Model ===== | ||
+ | To create a combinatorial model, clicki on {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | The //Menu File List// opens: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | By default it opens at the root folder // | ||
+ | |||
+ | Enter the model name at the New Model prompt: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | The new model is open in //DEFINE// tab like this: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | |||
+ | The first step is to define | ||
+ | - click on {{wiki: | ||
+ | - select the appropriate data type: int, float, txt or bool | ||
+ | - enter domain values one value on each line | ||
+ | |||
+ | You should have something like this: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | Go ahead and create two more variables and we have the model built: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | You can also add constraints to remove certain permutations that are illegal, invalid or unwanted for any reason. | ||
+ | |||
+ | Save the changes and we are ready to generates the test cases from this model. | ||
- | ===== Build Model ===== | ||
===== Generate Test Cases ===== | ===== Generate Test Cases ===== | ||
+ | Test generation from combinatorial model is done in [[../ | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | To generate the test cases, | ||
+ | * select an algorithm {{wiki: | ||
+ | |||
+ | * click on ▶ next to the algorithm dropdown | ||
+ | |||
+ | Generated test cases are listed in // | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | You may remove or add additional rows to the // | ||
+ | |||
+ | Feel free to experiment with different generation algorithms. | ||
+ | |||
+ | When selecting //Mixed// algorithm, you will see an additional section displayed below the header (variable names): | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | //Mixed// algorithm allows you to selectively apply different interaction strength (pairwise vs three-wise, etc.) for specific subset of variables. | ||
+ | |||
+ | We will not cover //Mixed// algorithm here, but you can find more details about //Mixed// algorithm in [[../ | ||
+ | |||
+ | |||
+ | |||
===== Make Changes ===== | ===== Make Changes ===== | ||
+ | |||
+ | As you must have figured out that you can easily add additional variables and remove any variables from the model. | ||
+ | |||
+ | Other changes are adding, removing and changing the domain values of each variable. | ||
+ | |||
+ | Upon any changes to the model, you should always re-generate // | ||
- | ===== ===== | ||