Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an ON-unit?

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?

like image 763
Matthew Avatar asked Sep 21 '12 21:09

Matthew


People also ask

What do unit tests do?

The main objective of unit testing is to isolate written code to test and determine if it works as intended. Unit testing is an important step in the development process, because if done correctly, it can help detect early flaws in code which may be more difficult to find in later testing stages.

What is a unit in unit testing?

Unit tests are typically automated tests written and run by software developers to ensure that a section of an application (known as the "unit") meets its design and behaves as intended. In procedural programming, a unit could be an entire module, but it is more commonly an individual function or procedure.

What is a unit in code?

A unit code is assigned based on the subject the unit covers, as well as what level the unit may be studied at. For example, LAW101 is a unit where the subject is Law, and where the unit is at a 100-level.

What is unit testing with example?

Unit testing is testing the smallest testable unit of an application. It is done during the coding phase by the developers. To perform unit testing, a developer writes a piece of code (unit tests) to verify the code to be tested (unit) is correct.


1 Answers

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).

like image 126
Matthew Strawbridge Avatar answered Sep 17 '22 15:09

Matthew Strawbridge