views:

15

answers:

1

I am reading a book where I am getting stuck at few white box testing concepts. The article in the below link is taken exactly from the book. http://testdesigners.com/testingstyles/ControlFlowTesting.html

1. 'ON-Units' terminology is introduced first in the 'Decision Coverage' article without describing what it is. The article continues to use this term later which is hard without knowing what is the meaning of ON-Unit.

Questions - Is 'ON-Unit' a path that a decision takes or traverses ? How do one 'invoke' On units ?

2. In the example under 'Condition Coverage' DO K=0 TO 50 WHILE (J+K < QUEST)

The article goes to explain - "If one is using decision testing, the criterion can be satisfied by letting the loop run from K = 0 to 51, without ever exploring the circumstance where the WHILE clause becomes false"

Questions -

By the definition of decision coverage, the test cases should explore both the true and false branch of decisions at least once. In other words, K = 0 to 50 is not material because the While (J+K < Quest) is True branch and (J+K < QUEST) is false branch. Why does the article mention under decision coverage - Not exploring the While clause being false?

Also in the first part of the line in decision coverage, decision criterion is satisfied by letting the loop run from K = 0 to K = 51 that is just the true branch, decision criteria is not met alone by having a test case for True branch, why does the article say that this along is sufficient to meet the decision criteria?

A: 
  1. First one figured out. ON-Unit is nothing but the "Entry point". To trigger them write at least one test case for the condition to traverse the decision.

  2. Second question is still open.

rockbala