|
|
# 6.1 Usage Scenarios
|
|
|
|
|
|
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
|
|
|
|
|
|
- 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.
|
|
|
- Defining test descriptions with the help of TDL.
|
|
|
- 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).
|
|
|
|
|
|
## 6.2 Selected TOP user scenarios
|
|
|
|
|
|
### 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
|
|
|
|
|
|
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 analysis of the specification the analysis level can be set.
|
|
|
|
|
|
![TDL Toolbar](images/TdlToolbar.png)
|
|
|
|
|
|
Figure 6.2.2-1: TDL toolbar
|
|
|
|
|
|
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.
|
|
|
|
|
|
![TDL Menu items](images/TdlMenuList.png)
|
|
|
|
|
|
Figure 6.2.2-2: TDL Menu items
|
|
|
|
|
|
### 6.2.3 Textual modelling
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Rename dialog box](images/RenameDialog.png)
|
|
|
|
|
|
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".
|
|
|
|
|
|
|
|
|
![Code formatting settings dialog box](images/SyntaxColoring.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Syntax auto complete example](images/SyntaxAutoCompletion.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Syntax error presentation](images/syntaxerror.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Constraint error presentation](images/ValidationView.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Template presentation](images/TemplatesInContext.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Template dialog box](images/TDLtxTemplates.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Wizard selection dialog box](images/NewProjectSelectWizard_TextualProject.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
![Creating a new template TDL project](images/NewProjectTextualProjectName.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
![Create new TDL project with support for OpenAPI](images/NewProjectSelectTemplate.png)
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
![Create new TDL project with advanced options features](images/NewProjectSelectBasicTDLtxProject.png)
|
|
|
|
|
|
Figure 6.2.4-4: Create new TDL project using the advanced options features
|
|
|
|
|
|
|
|
|
In this dialog box the additional properties of the project may be configured.
|
|
|
If "Advanced" option is set the following options can be selected:
|
|
|
|
|
|
- The name of path of the project files
|
|
|
- The imported packages
|
|
|
- The name of the project package, default is "Main"
|
|
|
|
|
|
### 6.2.5 Graphical modelling
|
|
|
|
|
|
1. **User scenario:** The TOP tool should provide ways to manage diagrams of model elements (create, delete, rename, open).
|
|
|
2. **User scenario:** Visual representation of all model elements should be implemented according to specification.
|
|
|
3. **User scenario:** All model elements and features should be editable either directly on the diagram or via property view.
|
|
|
4. **User scenario:** Negative validation results should be indicated graphically and linked to problem reports.
|
|
|
|
|
|
To define a TDL model using the graphical editor of the TOP tools, select menu "File" and in the menu select "New "and in the sub-menu list select "TDL project" or use shortcut "Alt-Shift-N". The dialog box shown in Figure 6.2.5-1 appears and a project name can be specified.
|
|
|
|
|
|
|
|
|
![Create new TDL graphical project](images/TDLgrNewProj.png)
|
|
|
|
|
|
Figure 6.2.5-1: Create a new TDL project using the graphical editor
|
|
|
|
|
|
When the "Finish" button is selected the project is created. In the "Project Explorer " select the project, press the right mouse button, and select option "Create Representation" and the dialog box shown in Figure 6.2.5-2 allow to create a new diagram.
|
|
|
|
|
|
![Create new TDL graphical diagram](images/TDLgrNewRepresentation.png)
|
|
|
|
|
|
Figure 6.2.5-2: Create a new diagram
|
|
|
|
|
|
There are two types of diagrams to create:
|
|
|
|
|
|
- "Generic TDL" diagram used to specify the package structure, test descriptions, configurations and data;
|
|
|
- "TDL Behaviour" diagram that defines the behaviour of a test description.
|
|
|
|
|
|
Select the type of diagram to be created, assign a name to the diagram, and press "Finish" to create the diagram.
|
|
|
|
|
|
NOTE: Initially it is only possible to create a "Generic TDL" diagram as to create a "TDL Behaviour" diagram at least one test description is needed.
|
|
|
|
|
|
The editors for the two types of diagrams provides access to all graphical elements of the TDL language. The textual parameters can be edited either directly in the graphical element or in the Properties View of a selected element. In Figure 6.2.5-3 the editor for "Generic TDL " diagrams is shown.
|
|
|
|
|
|
![Generic TDL diagram editor](images/GenericTdlGrEditor.png)
|
|
|
|
|
|
Figure 6.2.5-3: Generic TDL diagram editor
|
|
|
|
|
|
Both diagram editors have a pane with all the elements that can be used in the diagram. From the top tool bar a number of general edit functions are available, e.g. select all elements, show and hide elements. Also from the top tool bar the export diagram as an image file is available. The "Properties" view of the editor allows to define the textual parameters of a selected graphical element.
|
|
|
|
|
|
### 6.2.6 Importing protocol specifications
|
|
|
|
|
|
The TOP tools support importing external data specifications to TDL data representations with mapping information to the original data specifications. All importers for the external use the "Translate Input to TDL Model" from the "TDL" menu or alternatively the >T> icon on the TDL tool bar. The generated TDL file depends on the type of project the external specification is imported to. The naming convention for the TDL file generated is the original file name extended with "-generated" and with extension according to the importing TDL model type.
|
|
|
|
|
|
1. **Usage scenario:** Importing OpenAPI specifications according to ETSI EG 203 647 [i.32].
|
|
|
|
|
|
For OpenAPI specifications the TOP tools currently supports:
|
|
|
- Importing of data definitions under components/schemas.
|
|
|
- Data mappings to the base OpenAPI definition for traceability.
|
|
|
- Data mappings to the target (Java) data implementation derived from the OpenAPI definitions for executability.
|
|
|
|
|
|
Further details on how to use OpenAPI specifications with TDL are defined in **clause 8.2 of the present document**.
|
|
|
|
|
|
<ol start=2>
|
|
|
<li> <b>Usage scenario:</b> Importing RESTCONF and YANG specifications.</li>
|
|
|
</ol>
|
|
|
|
|
|
The TOP tools support for importing RESTCONF and YANG data specifications is offered by the conversion of JSON specifications. For YANG data specifications this means that they have to be converted to JSON specifications.
|
|
|
|
|
|
<ol start=3>
|
|
|
<li> <b>Usage scenario:</b> Importing ASN.1 specifications.</li>
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
ASN.1 data specifications can be converted to a TDL data model. Further details on how to use TDL with ASN.1 data specifications are defined in **clause 8.3 of the present document**.
|
|
|
|
|
|
### 6.2.7 Creating test objectives based on TDL meta-model
|
|
|
|
|
|
1. **User scenario:** Use the core TDL syntax for specifying test objectives.
|
|
|
|
|
|
The TOP tool editors for the standardised textual syntax in ETSI ES 203 119-8 [i.20] support the extended syntax for structured test objectives in ETSI ES 203 119-4 [i.16]. Details on how to use one of the TOP tool textual editors to define structured test objectives are described in **clause 6.7 of the present document**.
|
|
|
|
|
|
<ol start=2>
|
|
|
<li> <b>User scenario:</b> Templates for TO backed by TD, also for constituent parts.</li>
|
|
|
</ol>
|
|
|
|
|
|
The TOP tool textual editors provides context sensitive templates for specification of structured test objectives. Further details on how to use templates are described in **clause 6.2.3. of the present document**.
|
|
|
|
|
|
<ol start=3>
|
|
|
<li> <b>User scenario:</b> Template library for basic configurations and types.</li>
|
|
|
</ol>
|
|
|
|
|
|
The extended syntax for structured test objectives allows for more complete test purpose specification requiring, e.g. configuration specification. For these elements the TOP tool editors provide a template library is available from the template collection of the editors.
|
|
|
|
|
|
### 6.2.8 Generate TD from TO
|
|
|
|
|
|
Lossless conversion of TDL test objectives to test descriptions is generally not possible due to conceptual differences between the formalisms. Some of the discrepancies may be overcome by annotating source (and target) models with appropriate information.
|
|
|
|
|
|
1. **User scenario:** Means to include predefined annotations with TDL models to help guide the conversion process.
|
|
|
|
|
|
2. **User scenario:** Support for TO to TDL conversion according to element annotations or default (non-functional) mappings for cases where annotations are not provided.
|
|
|
|
|
|
3. **User scenario:** Generated test descriptions contain references to test objectives from which they originate.
|
|
|
|
|
|
As the conversion cannot be completely automated the process on how manual steps can support the transformation are defined in **clause 6.4 of the present document**. The TOP tools currently supports:
|
|
|
|
|
|
- Transforming of inline data descriptions within EventOccurrences into corresponding data types.
|
|
|
- Generation of TestConfigurations based on the EventSequences within the Structured Test Objective.
|
|
|
- Generation of TestDescription skeletons based on the EventSequences within the Structured Test Objective with references to it.
|
|
|
- Importing of the base package and imported packages.
|
|
|
|
|
|
### 6.2.9 Export to Word
|
|
|
|
|
|
An essential use case for TDL is its application in producing test specifications, which requires the conversion of models to printable format such as Microsoft Word:
|
|
|
|
|
|
1. **User scenario:** Export TDL diagrams as images.
|
|
|
2. **User scenario:** Export textual TDL test descriptions to be part of a Word document.
|
|
|
3. **User scenario:** Export test objectives as parts of a Word document.
|
|
|
|
|
|
The TOP tool graphical editors provide a function to export the current diagram as an image in the format of the users choice. The function is available via the "camera" button shown in Figure 6.2.5-3.
|
|
|
Textual TDL code can be copied from the TDL editors.
|
|
|
|
|
|
The TOP tools provides a TDL-TO converter for Test Objectives to the Word table format. The TDL-TO converter supports both Structured Test Objectives defined in the example syntax and new the standardised notation. Template files allow to define the layout of the generated Word document. In **clause 5.3.3 in the present document** more information on the TDL-TO converter is defined.
|
|
|
|
|
|
### 6.2.10 Conversion to TTCN-3
|
|
|
|
|
|
1. **User scenario:** Conversion of TDL models to TTCN-3 test suites
|
|
|
|
|
|
The TOP tools support generation of TTCN-3 according to ES 203 119-6 [i.18]. To use this feature use the T3 button in the TDL tool bar or the TDL Menu item "Transform TDL model to TTCN-3" with the model to be transformed open. In **clause 6.6 of the present document** further information on the translation can be found.
|
|
|
|