![]() |
![]() |
![]() |
![]() |
![]() |
TTCN Link Commands in the TTCN Suite
TTCN Link Commands in the TTCN Suite on UNIX
This section describes the extra menu choices that are available in the TTCN Suite when TTCN Link is used on UNIX.
Browser Commands in the SDT Link Menu
The following menu choices are available in the Browser SDT Link menu:
Select Link Executable
Makes a connection between a test suite and the corresponding SDL system. In the file dialog that opens, a Link executable should be selected. If the file is not a legal Link executable, the selection will fail.
When a Link executable is selected, a place holder for it is stored in the test suite. It is possible to change the Link executable if, and only if, there is no test case which uses the current SDL system (i.e. there is no synchronized test case).
It is also possible to select a Link executable by associating the SDL system with the TTCN system in the Organizer. However, a Link executable selected in the TTCN Suite will override an executable selected in the Organizer.
See also External synonyms.
Generate Declarations
Generates TTCN versions of the relevant type declarations in the SDL system. The menu choice is only available if a Link executable has been selected.
The generated objects use the ASN.1 syntax. They are automatically analyzed after they have been generated. This is necessary for later operations and usage of these types. If there is no other declarations (types) in the test suite (e.g. the test suite is empty), the analysis will not fail. On the contrary if other declarations (types) already exist, the analysis may fail due to name conflicts and incorrect references. The error messages of this analyzing will not be displayed. To check if the generated declarations are analyzed, use the Selector and the Show Error Message command on the incorrect tables.
At the same time that the declarations are generated, a Default table will be generated. It consists of an otherwise statement for each PCO and a timeout statement.
No timer will be generated from the SDL system. If the design of the test suite requires any timers they must be defined manually.
More details about the generated tables etc. can be found in Generating the Declarations.
Table Editor Commands in the SDT Link Menu
To generate a test case (the behaviour description of a test case), the test case table must be in synchronized mode. In synchronized mode, the test case is synchronized (has an established connection) with the selected Link executable.
Once in synchronized mode, the test case editor will stay in this mode as long as only commands from the SDT Link menu are used. As soon as any field in the table (besides the comment fields) is edited, the synchronized mode will be terminated. It is however possible to analyze the test case without leaving the synchronized mode.
The following commands are available from a Table Editor for test cases or test steps. They are applied on a behaviour line (they insert a new behaviour line below/after the behaviour line with the input focus) hence it is required that the test case or the test step either is empty or has the input focus on a leaf row.
When each of these commands is performed the input focus is moved to the new generated behaviour line.
- Send
- Receive
- Start Timer
- Cancel Timer
- Attach
- Resynchronize
- Show SDL
- Show MSC
- Show Coverage
- Show Options
Send
Adds a send statement below/after the behaviour line with the input focus. The new behaviour line will have an increased indent level compared with the previous one.
The send statement with the selected PCO, ASP/PDU and constraint will be verified by the selected SDL system. If the verification does not fail, a send statement is generated and inserted below/after the row with the input focus. For a more detailed description of this dialog, see Add Send Statement.
Receive
Adds appropriated receive and/or timeout statement(s) below/after the behaviour line with the input focus. The new row(s) will have the same indent level. This indent level will be increased compared with the previous one.
For each retrieved receive statement from the SDL system, a new Constraint is generated if there is no appropriate Constraint (a Constraint with a similar value). The new Constraint will be named with a unique name and will be analyzed. This new name is used in the Constraints Ref column.
Start Timer
Adds a start timer statement below/after the behaviour line with the input focus. The new behaviour line will have an increased indent level compared to the previous one.
The start timer statement with the selected timer will be verified with the selected SDL system. If the verification does not fail, a start timer statement is generated and inserted below/after the behaviour line with the input focus. For a more detailed description of this dialog see Add Send Statement.
Cancel Timer
Analogous to Start Timer.
Attach
Adds an attachment statement below/after the row with the input focus. The new behaviour line will have an increased indent level compared to the previous one.
The test step dialog used by this command is similar to the dialog in the Table Editor. The selected test step (the behaviour lines in the behaviour description) will be verified with the SDL system. The test step must have passed analysis before this operation.
Resynchronize
Verifies the test case in a Table Editor using the previously chosen Link executable. The table will change mode to the synchronized mode. This command is available from Table Editors for test cases and only if an SDL system is selected.
If the test case does not have any default reference and there is more than one default in the test suite, a selection dialog pops up and a default must be selected. If the test suite contains only one default, it will be selected automatically. If the test case already has a default, no change will be made.
If the test case (or the test step) contains behaviour lines, they will be verified with the current SDL system. If the verification of any line fails, the table will keep the normal mode.
Show SDL
Opens the SDL Editor with the symbols selected which were executed in the SDL system and are associated with the behaviour line which has the input focus. More precisely, the SDL symbols which were executed after the current test case line but before the next test case line, are selected exactly.
Show MSC
Opens the MSC Editor with a process level MSC that illustrates the execution path from the start of the SDL system to the state corresponding to the behaviour line with input focus.
Show Coverage
Opens the Coverage Viewer that displays test coverage information for the current test case. The test coverage displays how many times each symbol in the SDL system has been executed during the generation of the test case. Note that the important information is not the exact number of times a particular symbol has been executed (since this is dependent upon the particular algorithm used by the Link executable). The important information is whether a symbol has been executed or not. If a symbol in the SDL system has not been executed when generating the test case, the requirement defined by this symbol is not tested by the test case.
Show Options
Shows the current settings of the configuration parameters that control the way the Link executable explores the state space of the combined SDL/TTCN system.
TTCN Link Commands in the TTCN Suite in Windows
In Windows, different TTCN Link commands are included in the SDT Link menu and the Link dialog. The menu choices in the SDT Link menu are used for selecting the Link executable, generating declarations and for showing execution information. By using the Link dialog, you can generate various statements.
The SDT Link menu and the Link dialog will be explained below.
The SDT Link Menu
The following menu choices are included in the SDT Link menu:
Select Link Executable
Makes a connection between a test suite and the corresponding SDL system. Opens a dialog in which you may select the Link executable.
It is also possible to specify the Link executable in the Organizer by associating the SDL system with the TTCN system. However, a Link executable selected in the TTCN Suite will override an executable selected in the Organizer.
See also External synonyms.
Generate Declarations
Generates TTCN versions of the relevant type declarations in the SDL system. The menu choice is only available if a Link executable has been selected.
The generated objects use the ASN.1 syntax. They are automatically analyzed after they have been generated. This is necessary for later operations and usage of these types.
At the same time as the declarations are generated, a Default table will be generated. It consists of an otherwise statement for each PCO and a timeout statement.
Timers will not be generated from the SDL system. If the design of the test suite requires any timers, they must be defined manually.
Show SDL
Opens an SDL Editor with the symbols selected which were executed in the SDL system and are associated with the selected behaviour line. More precisely, the SDL symbols which were executed after the current test case line but before the next test case line, are selected exactly.
Show MSC
Opens an MSC Editor with a process level MSC that illustrates the execution path from the start of the SDL system to the state corresponding to selected the behaviour line.
Show Coverage
Opens an SDL Coverage Viewer that displays test coverage information for the current test case. The test coverage displays how many times each symbol in the SDL system has been executed during the generation of the test case. Note that the important information is not the exact number of times a particular symbol has been executed (since this is dependent upon the particular algorithm used by the Link executable). The important information is whether a symbol has been executed or not. If a symbol in the SDL system has not been executed when the test case was generated, the requirement defined by this symbol is not tested by the test case.
Show Options
Shows the current settings of the configuration parameters that control the way the Link executable explores the state space of the combined SDL/TTCN system.
The Link Dialog
The Link dialog can be opened from the SDT Link menu. The Link dialog can only be used when a behaviour line is selected in the table or if the table does not yet contain a behaviour line. When the Link dialog is opened, the current table automatically becomes synchronized with the Link executable, that is, the table is read-only. The only time synchronization is lost for the current table, is when TTCN Link is activated in another table or when you insert a behaviour line from the Data Dictionary dialog in the current table.
The Link dialog has almost the same appearance as the Data Dictionary dialog. A list in the lower left corner of the dialog makes it possible to switch between the Link and Data Dictionary dialog. For more information about the Data Dictionary, see Creating Behaviour Lines.
The operations available in the Link dialog will be described below. The operations are applied on a selected behaviour line and the result is that a new behaviour line is inserted below/after. The test case or the test step must be empty or a leaf row must be selected.
The Send/Receive Tab
Generate a send statement by selecting a PCO, ASP/PDU, constraint, etc. When you press the Apply button, the statement will be verified by the selected SDL system. If the verification succeeds, a new send statement will be inserted below the selected behaviour line.
Generate receives and/or timeout statement(s) below the selected behaviour line by clicking the Generate Receives button. The new row(s) will all have the same indent level. This indent level will be increased compared with the previous one.
This operation is only valid when the current selected behaviour line is a leaf row.
For each retrieved receive statement from the SDL system, a new Constraint is generated if there is no appropriate constraint (a constraint with a similar value). The new constraint will be named with a unique name and will be analyzed. This new name is used in the Constraints Ref column.
The Timer Tab
Generate a timer statement by selecting Start or Cancel and a timer from the listbox (optional for Cancel). When you click the Apply button, the timer statement will be verified against the SDL system. If the verification succeeds, a timer statement will be generated and inserted below the selected behaviour line. The new behaviour line will have an increased indent level compared to the previous one.
The Attachment Tab
When you select an attachment and click Apply, an attachment statement will be generated below the selected behaviour line. The new line will have an increased indent level compared to the previous one.
The selected test step (the behaviour lines in the behaviour description) will be verified with the SDL system. The test step must have passed analysis before this operation.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |