if(condition1)
dosomething1();
if(condition2)
dosomething2();
if(condition3)
dosomething3();
Is it full branch testing if I have two test cases in this example
- condition1 = condition2 = condition3 = true;
- condition1 = condition2 = condition3 = false;
Or have I misunderstood it?
Trying to figure out the difference between branch and path testing. I get path testing so hope this is correct.
Branch Testing:
Yes; you are performing correct branch testing, since all your branches are hit. In fact you can remove your second test case, since case 1 executes all the branches.
Obviously branch testing is less encompassing than path testing, since it’s likelyhood of hitting dependies is low and as such, ought not to be your only form of testing.