Using Environments
Automated Testing
END TEST
In the first test, only
his o 0]
has an override. Therefore, all the default tests were
generated except for the test on the
histo
variable, which had its
0
element removed,
and a test was generated on
histo[1 .255]
.
t [
.
i
In the second test, the override is more noticeable; the
histo[100]
element has been
removed to generate two tests: one on
h sto[0..99]
, and the other on
histo[101..255]
.
Using Environments
The USE keyword declares the use of an environment (in other words, the beginning
of that environment's visibility).
The impact or visibility of an environment is determined by the position at which
you declare the environment's use with the USE statement.
The initial values and tests associated with the environment are applied as follows,
depending on the position of the declaration:
·
To all the tests in a program
·
To all the tests in a service
·
To all the ELEMENT blocks of a particular test
·
Within one ELEMENT block of a given test.
Advanced C Testing
Advanced C Testing
This section covers some of the more complex notions behind Component Testing for
C.
Test Script Compiler Macro Definitions
You can specify a list of conditions to be applied when starting the Test Script
Compiler. You can then generate the test harness conditionally. In the test script, you
can include blocks delimited with the keywords IF, ELSE, and END IF.
If one of the conditions specified in the IF instruction is present, the code between the
keywords IF and ELSE (if ELSE is present), and IF and END IF (if ELSE is not
present) is analyzed and generated. The ELSE / END IF block is eliminated.
If none of the conditions specified in the IF instruction is satisfied, the code between
the keywords ELSE and END IF is analyzed and generated.
By default, no generation condition is specified, and the code between the keywords
ELSE and END IF is analyzed and generated.
155