Test Script Structure

Component Testing for C

The C Test Script Language allows you to structure tests to:

Test script filenames must contain only plain alphanumerical characters.

A typical Component Testing .ptu test script looks like this:

HEADER add, 1, 1

<variable declarations for the test script>

BEGIN

SERVICE add

  <local variable declarations for the service>

  TEST 1

  FAMILY nominal

  ELEMENT

    VAR variable1, INIT=0, EV=0

    VAR variable2, INIT=0, EV=0

    #<call to the procedure under test>

  END ELEMENT

  END TEST

END SERVICE

 

All instructions in a test script have the following characteristics:

Structure statements

The following statements allow you to describe the structure of a test.

The three-level structure of the test scripts has been deliberately kept simple. This structure allows:

In the test script, the testers can add an optional REQUIREMENT statement in order to linked the tests to one or several requirements of the application under test.

The REQUIREMENT instruction appears within TEST blocks, where it defines the requirements for this test or within SERVICE blocks where it defines the requirements for the tests including in this service or before the first SERVICE block where it defines the requirements for the all the tests in the file.

Euclidian divisions in C

All Euclidian divisions performed by the Test Script Compiler round to the inferior integer.

Therefore, writing -a/b returns a different result than -(a/b), as in the following examples:

 

Related Topics

Component Testing Tester Configuration