Testing Example - Gnorion/BizVR GitHub Wiki

Testing Example

Suppose we have a decision like this which takes five inputs (a,b,d,p,q) and produces a single result:

image

The decision tables are:

DT1: image

DT2: image

DT3: image

DT4: image

DT5: image

We can see that each of the five input variables has two possible values being tested in the rules. This means there are 2x2x2x2x2=32 different combinations of the input values.

If we run all these test cases these are the results we will get. You can see that in some cases the result was not determined.

image

We can identify the problem in a couple of ways:

  1. Look for missing rules using the validation engine. It will tell us:
There are 2 missing rules
if e='e1' and s='s2' then result not specified in ruleset DT5 
if e='e2' and s='d2' then result not specified in ruleset DT5 
  1. Check for values tested but not set. The validator finds that:
Attribute s is tested for ='d2' but no value in this range is ever set by a rule

And if we look at the decision table (DT4) where s is set we can see its is set to either s1 or s2.

Most likely DT5 should be testing for 's2' though to be sure we need to review the original specifications just in case its DT4 that is in error. Either way this is an issue that needs to be resolved.