![]() |
![]() |
![]() |
![]() |
![]() |
The principal building blocks of TTCN-3 are modules written as free text files: line breaks or paragraph marks may be used without restrictions.
Related keywords:
module module_identifier { [ module_definitions ] [ control {module_control } ] } [ with attributes ] |
The module keyword introduces the module definition.
module_identifier is the name used to refer to the module. Must begin with a letter, may contain letters, numbers and underscore characters.
the optional module_definitions part may contain type, constant, template, function, signature, testcase, altstep and group definitions.
the optional module_control part states the execution order of the test cases (cf. the keyword execute) and may contain local definitions.
attributes: see the keyword with for details.
module Principal {
modulepar float tsp_hlavni;
modulepar integer tsp_vypinac, tsp_nouzove;
type component CT {};
type enumerated Examplg {jeudi, vendredi, samedi};
testcase tcprov() runs on CT {
/* Imagine Test Case body here */
};
control {execute (tc_prov())}
}
The module Principal declared here has one float (tsp_hlavni) and two integer module parameters (tsp_vypinac, tsp_nouzove), an empty component type (CT) as well as an enumerated type (Examplg) defined in the module definitions part. The control part contains the execution of the test case tc_prov.
BNF definition of module