Newer
Older
# User guides
6.1
TDL and TOP can be used in different ways. Depending on the specific goals, different parts of TDL and TOP may be relevant for a given usage scenario. For different starting points and end goals, the following common use cases may come into question:
- [Selected TOP user scenarios](UserScenarios#selected-top-user-scenarios)
- [User control of the analysis level](#sec-user-control-of-the-analysislevel)
- [Using TDL with ASN.1 Specifications](#sec-using-tdl-with-asn-specifications)
- [Unified Definition of Test Puposes and Test Descriptions](#unified-definition-of-test-purposes-and-test-descriptions)
[Open and close specification](#uc1-openclose)
- [Textual modelling](#textual-modelling)
[Defining structured test objectives (or test purposes) with the help of TDL-TO.]
- Transforming existing structured test objectives in TDL-TO into TDL test descriptions.
- Transforming existing test descriptions in TDL into TTCN-3 test cases.
- Transforming existing test descriptions in TDL into a target execution language (see clause 9).
- Using existing interface specifications in OpenAPI™ with TDL (see clause 8.2).
- Using existing protocol specifications in ASN.1 with TDL (see clause 8.3).
## Selected TOP user scenarios <a name="selected-top-user-scenarios"></a>
6.2
### 6.2.1 Overview
This clause describes a set of user scenarios that illustrate just how the features of the TOP tools can be used for specific testing tasks.
### 6.2.2 User control of the analysis level <a name="sec-user-control-of-the-analysislevel"></a>
<a name="uc1-openclose"></a>
1. **Usage scenario:** The user saves and re-opens an incomplete TDL specification. The incomplete specification and associated analysis results are maintained.
2. **Usage scenario:** Incompatible assignment of types, e.g. assignment of a boolean value to integer type or exceeding the limit of a restricted list type (collection).
3. **Usage scenario:** The user may set the level of analysis performed by TOP tool when developing the TDL test model.
From the TDL toolbar shown in [Figure TDL toolbar](#figure-TDL-toolbar) the analysis level of the specification can be set.
<figure><a id="figure-TDL-toolbar"></a>
<img src="images/TdlToolbar.png" alt="TDL toolbar">
<figcaption><b>Figure: TDL toolbar</b>
</figcaption>
</figure>
The left "V" button sets the constraint validation to be automatically performed when editing the model. The selection mode is shown by marking the button with a darker
shade when constraint validation is active. The rightmost "V" button causes the model to be analysed for syntactical errors. Errors are shown in the editor and in the problem view.
Alternatively these settings can be controlled from the TDL menu shown in [Figure TDL Menu items](#figure-tdl-menu-items).
<figure><a id="figure-tdl-menu-items"></a>
<img src="images/TdlMenuList.png" alt="TDL Menu items">
<figcaption><b>Figure: TDL Menu items</b>
</figcaption>
</figure>
### Textual modelling
6.2.3
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
1. **Usage scenario:** Refactoring and renaming
Reuse of existing TDL specification for which a slight modification is needed to use it in a context. E.g. a package containing TDL type definitions or configuration declarations may be re-used in a specific test specification context. To increase the readability the TDL TOP tool refactoring features may be used.
To use the rename feature, select an instance of an element and from the options when right-click on the mouse select option "Rename Element" (alternatively use key shortcut Alt + Shift + R). Type in the new element name in the dialog box.

Figure 6.2.3-1: Rename dialog box
In case the selected element is local to a single file the rename feature is executed inline without the Rename Element dialog.
<ol start=2>
<li> <b>Usage scenario:</b> Code formatting and syntax highlighting</li>
</ol>
The syntax coloring can be set from the "Syntax Coloring" dialog box: Open the "Window" menu and select "Preferences". Select the TDL tool used, ("TDLan2", "TDLtx", or "TDLtxi"), expand the subitems and select "Syntax Coloring".

Figure 6.2.3-2: Code formatting settings dialog box
In the code formatting dialog box the preferences for different syntax elements can be set, see Figure 6.2.3-2.
<ol start=3>
<li> <b>Usage scenario:</b> Syntax auto complete</li>
</ol>
To use the syntax auto complete feature type in an initial part of a keyword or model element, press "Ctrl + Space", and the syntax auto complete options available in the context are displayed.

Figure 6.2.3-3: Syntax auto complete example
Press "Enter" and the selected text is inserted.
<ol start=4>
<li> <b>Usage scenario:</b> Validation results presentation </li>
</ol>
The TOP tools support syntax check for the textual and graphical notations defined in the TDL standard. Syntax errors are indicated in the Problems view as well as in the editor as shown in Figure 6.2.3-4.

Figure 6.2.3-4: Syntax error presentation
The TOP tool offers semantic constraints check of a TDL specification. When this check is to be performed can be controlled from the TDL tool bar or the TDL menu item list.
Either the check is performed when the "Validate TDL model" is selected or the check is performed automatically when the TDL model is updated, if the "Automatically validate
TDL model" is selected. In Figure 6.2.3-5 an example of a semantics check is illustrated.

Figure 6.2.3-5: Constraint error presentation
<ol start=5>
<li> <b>Usage scenario:</b> Templates - usage and definition </li>
</ol>
For each of the notations supported by the TOP tools the specific editor provides templates available in the context of the cursor position. The templates available at a given
cursor position are shown when "Ctrl + Space" are pressed. When a template is selected pressing "Enter" inserts the template and allows for parameters to be modified.
An example of templates available in the context of a configuration specification is shown in Figure 6.2.3-6.

Figure 6.2.3-6: Templates available in a configuration specification context
The user may define additional templates for the different editors available in the TOP tool. The template editor is accessed via the "Window" menu item, option "Preferences".
From the Preferences dialog box the specific TOP editor can be selected and user-defined templates be created. Figure 6.2.3-7 illustrates a list of templates defined for the
TDLtx editor.

Figure 6.2.3-7: Template dialog box
### 6.2.4 TDL Wizards and Perspective
Wizards provide support to create functional TDL project either with textual or graphical models according to user choice:
1. **User scenario:** Create new TDL project
2. **User scenario:** Reference to predefined model elements
3. **User scenario:** Using predefined skeletons
4. **User scenario:** Importing interface specifications
In order to create a new TDL specification:- Select from File menu item New and in the submenu select "Project". In the dialog box "Select a wizard", select the wanted
TDL project, e.g. TDLtx for a textual TDL specification.

Figure 6.2.4-1: Wizard selection dialog box
Press "Next" and in the dialog box specify a name of the project to be create. If the default location is not to be used, uncheck the "Use default location" and specify
the location of the project.

Figure 6.2.4-2: Creating a new template TDL project
Select "Next" to open the dialog box for select among parameterized TDL textual project templates.

Figure 6.2.4-3: Create new TDL project with support for OpenAPI
Select template "TDLtx" and press "Next" to get further options to configure the TDL project.

Figure 6.2.4-4: Create new TDL project using the advanced options features
Loading
Loading full blame…