Question

The Art of Software Testing contains several references to "ON-units". Here is an example from the section on test-case design:

Decision coverage usually can satisfy statement coverage. Since every statement is on some subpath emanating either from a branch statement or from the entry point of the program, every statement must be executed if every branch direction is executed. There are, however, at least three exceptions:

  • Programs with no decisions.
  • Programs or subroutines/methods with multiple entry points. A given statement might be executed only if the program is entered at a particular entry point.
  • Statements within ON-units. Traversing every branch direction will not necessarily cause all ON-units to be executed.

I haven't seen the term ON-unit before, and I'm having trouble finding a definition on google. What is an ON-unit?

Was it helpful?

Solution

An ON-unit is a method of exception handling in the PL/I language, like a catch block in more modern languages. So it sounds as if they're saying that executing every branch of code (outside the ON-units) won't necessarily trigger all the handled exceptions (inside the ON-units).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top