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?

4

1 回答 1

1
  1. 第一个想通了。ON-Unit 只不过是“入口点”。要触发它们,至少要为条件编写一个测试用例来遍历决策。

  2. 第二个问题仍然悬而未决。

于 2010-10-08T15:35:12.850 回答