Testing Single Rules With Positive and Negative Test Cases - Gnorion/BizVR GitHub Wiki
Suppose we want to test this rule in isolation from all other rules.
NOTE: VV will alert you to this E006 ERROR: Invalid range found. Ruleset: TC17B rule: R1 value: (20..20). Lower value must be strictly less than the upper
How many test cases are required and what are they?
Positive Test cases
"test cases" : [
{"testid" : "Test1","x" : -11},
{"testid" : "Test2","x" : -4},
{"testid" : "Test3","x" : 21},
{"testid" : "Test4","x" : 101},
{"testid" : "Test5","x" : 201}
]
Negative Test Cases
"test cases" : [
{"testid" : "Test1","x" : -9},
{"testid" : "Test2","x" : 6},
{"testid" : "Test3","x" : 21},
{"testid" : "Test4","x" : 200}
]
Here's a slightly more complex rule
12 positive test cases only
[
{"testid":"Test1","x":-11,"y":-1},
{"testid":"Test2","x":-11,"y":11},
{"testid":"Test3","x":-11,"y":46},
{"testid":"Test4","x":-11,"y":201},
{"testid":"Test5","x":101,"y":-1},
{"testid":"Test6","x":101,"y":11},
{"testid":"Test7","x":101,"y":46},
{"testid":"Test8","x":101,"y":201},
{"testid":"Test9","x":201,"y":-1},
{"testid":"Test10","x":201,"y":11},
{"testid":"Test11","x":201,"y":46},
{"testid":"Test12","x":201,"y":201}
]
6 negative test cases only
[
{"testid":"Test1","x":-9,"y":1},
{"testid":"Test2","x":-9,"y":26},
{"testid":"Test3","x":-9,"y":96},
{"testid":"Test4","x":200,"y":1},
{"testid":"Test5","x":200,"y":26},
{"testid":"Test6","x":200,"y":96}
]
35 Combined test cases
Combined Test Cases (i.e. all combinations of positive an negative)
[
{"testid":"Test1","x":-11,"y":-1},
{"testid":"Test2","x":-11,"y":11},
{"testid":"Test3","x":-11,"y":46},
{"testid":"Test4","x":-11,"y":201},
{"testid":"Test5","x":-11,"y":1},
{"testid":"Test6","x":-11,"y":26},
{"testid":"Test7","x":-11,"y":96},
{"testid":"Test8","x":101,"y":-1},
{"testid":"Test9","x":101,"y":11},
{"testid":"Test10","x":101,"y":46},
{"testid":"Test11","x":101,"y":201},
{"testid":"Test12","x":101,"y":1},
{"testid":"Test13","x":101,"y":26},
{"testid":"Test14","x":101,"y":96},
{"testid":"Test15","x":201,"y":-1},
{"testid":"Test16","x":201,"y":11},
{"testid":"Test17","x":201,"y":46},
{"testid":"Test18","x":201,"y":201},
{"testid":"Test19","x":201,"y":1},
{"testid":"Test20","x":201,"y":26},
{"testid":"Test21","x":201,"y":96},
{"testid":"Test22","x":-9,"y":-1},
{"testid":"Test23","x":-9,"y":11},
{"testid":"Test24","x":-9,"y":46},
{"testid":"Test25","x":-9,"y":201},
{"testid":"Test26","x":-9,"y":1},
{"testid":"Test27","x":-9,"y":26},
{"testid":"Test28","x":-9,"y":96},
{"testid":"Test29","x":200,"y":-1},
{"testid":"Test30","x":200,"y":11},
{"testid":"Test31","x":200,"y":46},
{"testid":"Test32","x":200,"y":201},
{"testid":"Test33","x":200,"y":1},
{"testid":"Test34","x":200,"y":26},
{"testid":"Test35","x":200,"y":96}
]