background image
<< Virtual Tester as a Thread or Task | intermediate-level scenarios >>
<< Virtual Tester as a Thread or Task | intermediate-level scenarios >>

System Testing for C Test Scripts

Test RealTime - User Guide
{
pthread_t thrTester_1,thr_Tester_2;
pthread_attr_t pthread_attr_default;
ATL_T_ARG arg_Tester_1, arg_Tester_2;
int status;
arg_Tester_1.atl_riofilename = "Tester_1.rio";
arg_Tester_1.atl_filters = "";
arg_Tester_1.atl_instance = "Tester_1";
arg_Tester_1.atl_occid = 0;
arg_Tester_2.atl_riofilename = "Tester_2.rio";
arg_Tester_2.atl_filters = "";
arg_Tester_2.atl_instance = "Tester_2";
arg_Tester_2.atl_occid = 0;
pthread_attr_init(&pthread_attr_default);
/* Start Thread Tester 1 */
pthread_create(&thrTester_1,&pthread_attr_default,start,&arg_Te
ster_1);
/* Start Thread Tester 2 */
pthread_create(&thrTester_2,&pthread_attr_default,start,&arg_Te
ster_2);
/* Both Testers are running */
/* Wait for the end of Thread Tester 1 */
pthread_join(thrTester_1, (void *)&status);
/* Wait for the end of Thread Tester 2 */
pthread_join(thrTester_2, (void *)&status);
return(0);
}
System Testing for C Test Scripts
Test Script Structure
The overall structure of a C and Ada test script must follow these rules:
·
A test script always starts with the HEADER keyword.
·
A test script is composed of one or several scenarios.
The basic structuring statements are:
·
HEADER: Specifies the name of the test script, the version of the tested system,
and the version of the test script. This information will be included in the test
report.
·
SCENARIO: Indicates the beginning of a SCENARIO block. A SCENARIO block
ends with an END SCENARIO statement. A SCENARIO block can be iterated
multiple times using to the LOOP keyword.
·
FAMILY: Qualifies the scenario and all its sub-scenarios. The FAMILY attribute
is optional. A list of qualifiers can be given such as: FAMILY nominal,
structural.
Each scenario can be split into sub-scenarios.
200