Initialization Environment

System Testing for C

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

This initialization environment is executed before each scenario at the same level.

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

Example

In the following example, the highest level of the test script is made up of two scenarios called first and second. The initialization environment that precedes them is executed twice: once before scenario first is executed and once before scenario second is executed.

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

PROC Load_mem()

...

END PROC

INITIALIZATION Load_mem()

SCENARIO first

...

END SCENARIO

SCENARIO second

INITIALIZATION

END INITIALIZATION

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 initialization environment is executed before scenarios level2_1 and level2_2 are executed. The highest-level initialization environment is not re-executed between scenarios level2_1 and level2_2.

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

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

In a test report, the execution of an initialization environment is shown beginning with the word INITIALIZATION and ending with the words END INITIALIZATION.

Related Topics

Termination EnvironmentEnvironments