Termination Environment

System Testing for C

A test script is composed of scenarios in a tree structure A termination environment can be defined at a given scenario level.

This termination environment is executed at the end of every scenario at the same level, provided that each scenario finished without any errors.

The syntax for termination environments can take two different forms, as follows:

  • A block: This begins with the keyword TERMINATION and ends with the sequence END TERMINATION. A termination block can contain any instruction.

  • A procedure call: This begins with the keyword TERMINATION followed by the name of the procedure and, where appropriate, its arguments.

Example

In the previous example, the highest level of the test script is made up of two scenarios called first and second. The termination environment that precedes them is executed twice:

  • once after scenario first is executed correctly

  • once after scenario second is executed correctly

HEADER "Validation", "01a", "01a"

PROC Unload_mem()

...

END PROC

TERMINATION Unload_mem()

SCENARIO first

...

END SCENARIO

SCENARIO second

TERMINATION

...

END TERMINATION

SCENARIO level2_1

FAMILY nominal, structural

...

END SCENARIO

SCENARIO level2_2

FAMILY nominal, structural

...

END SCENARIO

END SCENARIO

Scenario second is made up of two sub-scenarios, level2_1 and level2_2. The second termination environment is executed after the correct execution of scenarios level2_1 and level2_2. The highest-level termination environment is not re-executed between scenarios level2_1 and level2_2.

Only one termination environment can appear at a given scenario level.

A termination environment can appear among scenarios at the same level. The termination environment does not have to be placed before a set of scenarios at the same level.

In a test report, the execution of a termination environment is shown beginning with the word TERMINATION and ending with the words END TERMINATION.

Related Topics

Initialization Environment | Environments | Basic Structure