background image
<< System Testing for C Test Scripts | Flow Control >>
<< System Testing for C Test Scripts | Flow Control >>

intermediate-level scenarios

Automated Testing
Example
HEADER "Registering", "1.0", "1.0"
SCENARIO basic_registration
FAMILY nominal
-- The body of my basic_registration test

END SCENARIO
SCENARIO extented_registration
FAMILY robustness
SCENARIO reg_priv_area
-- The body of my reg_priv_area test
END SCENARIO -- reg_priv_area
SCENARIO reg_pub_area LOOP 10
-- The body of my reg_pub_area test
END SCENARIO -- reg_priv_area
END SCENARIO
Include Statements
To avoid writing large test scripts, you can split test scripts into several files and link
them using the INCLUDE statement.
This instruction consists of the keyword INCLUDE followed by the name of the file
to include, in quotation marks (" ").
INCLUDE instructions can appear in high- and intermediate-level scenarios, but not
in the lowest-level scenarios.
You can specify both absolute or relative filenames. There are no default filename
extensions for included files. You must specify them explicitly.
Example
HEADER "Socket validation", "1.0", "beta"
INCLUDE "../initialization"

SCENARIO first
END SCENARIO

SCENARIO second
INCLUDE "scenario_3.pts"
SCENARIO level2
FAMILY nominal, structural
...
END SCENARIO
END SCENARIO
Procedures
You can also use procedures to build more compact test scripts. The following are
characteristics of procedures:
·
They must be defined before they are used in scenarios.
·
They do not return any parameters.
201