![]() |
![]() |
![]() |
![]() |
![]() |
A Case Study
The Test Case
For the purposes of this guideline we shall invent a simple case study for an imaginary protocol, which we shall call the X-Protocol. The case study is based on the architecture introduced in the previous section. The IUT is an implementation of the X-protocol.
We shall assume that there is an underlying service provider that provides a network service (N), over which we shall run the test. This leads to the following:
- the LT will be specified in terms of N-SERVICE primitives and X-PDUs,
- N_DATArequest and CR_PDU;
- the UT will be specified in terms of X-SERVICE primitives,
- X_CONNECTrequest;
Description of the Case Study
Our examples will introduce the TTCN features necessary to specify the simple scenario described below:
- The MTC initiates the test by CREATING the necessary PTCs. One lower PTC and one upper PTC for each connection.
- The lower PTC then establishes an X-connection with the upper PTC via the IUT. For the sake of simplicity we will assume that an (N)-connection has already been set up, and that the X-protocol does not allow an X_CONNECTrequest to be refused (the example has been created to illustrate TTCN features, rather than to specify a sensible protocol).
- The test then continues with the data phase, where the lower PTC transmits a data packet which shall be returned by the upper PTC via the IUT. The packet shall be returned within a given period of time. This process is repeated a given number of times.
- After the data transfer the lower PTC disconnects and sends its preliminary result to the MTC which then computes the final verdict and the test terminates
Purpose of the Test Case
The case study has two test purposes, these can be stated as:
- The IUT shall accept and return a given number of data packets within the time limitations of the protocol over a single X-connection.
- The IUT shall accept and return a given number of data packets within the time limitations of the protocol over two simultaneous X-connections.
Each test purpose will be expressed as a separate test case.
Case Study Road-Map
We shall create a TTCN complete mini-test suite that contains all the TTCN necessary to specify the above test cases. The following table (this is not a TTCN table!) shows the main sections of this example in the order in which they would appear in a real test suite. The complete study can be found in The Complete Case Study. The right-hand column of the table tells you where these sections are described in this guideline:
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |