Tutorial Automating test data generation - Gnorion/BizVR GitHub Wiki
Automating test data generation
In this section we will see how you can create a decision that will generate all possible combinations of various input values. The inputs and output from such a decision might look like this:
Which is exactly the input structure we need to our toy pricing decision. Of course, as we already discovered, many of these won't get a price since the rules don't yet cover a lot of these values. setting default price with exceptions covered by explicit rules
Let's explore how this can be done using decision tables.
The decision will now look like this
and the decision table looks like this
Notice that there are three collection binding statements eg {color in COLORS} {size in SIZES} and {shape in SHAPES}.
This is very powerful! Its what generates all the possible combinations. So the output will be a collection of things each of which has an attribute for color, size and shape. Every thing generated will be different.
Note: The reference to the "dummy" input is a temporary workaround - the rule conditions actually need some thing to test - without it you won't get any results
Ok, so now we can generate a whole bunch of test cases and run them, but is there a way we could automate the checking of the results too? Yes, of course. Tutorial Automating the checking of results