Test Data Generation Using Seeding Tables - Gnorion/BizVR GitHub Wiki
The automatic test generation feature works by looking for literal values against which explicit named variables are tested and then adjusting the values up or down as necessary to satisfy the rule conditions. However, when a table is using embedded variables (in this case inside a function) that are not directly tested against literal values like this:
There is no easy way to know what are reasonable input values for a and b. You have to know what the function is doing to figure that out.
In such a case you can create a seeding table like this
which supplies some representative values for a and b. VV will generate all the possible combinations:
"J31 testcases": {
"tab": "TEST CASES",
"title": "J31 Test Cases",
"summary": "4 test cases generated",
"test cases": [
{"a": 10, "b": 5 },
{"a": 10, "b": 15 },
{"a": 16, "b": 5 },
{"a": 16, "b": 15 }
]
}
This is also a good way to divide up the test cases into distinct groups.
You could fix the value of a to a single number and allow the values of b to vary.
That way you reduce the number of combinations you have to deal with. Also you can control which variables are used simply by including or excluding an oval.
If there's no oval then the corresponding seeding values will be ignored.
The ovals don't actually even need to have dependency arrows for this to work.
Explicit variables that do have literal test values will be added to the combinations if there's an oval present
eg for this DRD
we now get 8 test cases (the original a + b cases) combined with the new c cases (that come directly from the rules)
"summary": "8 test cases generated",
"test cases": [
{"c": 9, "a": 10, "b": 5 },
{"c": 9, "a": 10, "b": 15 },
{"c": 9, "a": 16, "b": 5 },
{"c": 9, "a": 16, "b": 15 },
{"c": 91, "a": 10, "b": 5 },
{"c": 91, "a": 10, "b": 15 },
{"c": 91, "a": 16, "b": 5 },
{"c": 91, "a": 16, "b": 15 }
]
},