diff --git a/UserScenarios.md b/UserScenarios.md index c3316b54a8e3d23b1f32e315ecada8ef18c487d2..0923a67a23dd9886b460231853c285edaa952183 100644 --- a/UserScenarios.md +++ b/UserScenarios.md @@ -1,6 +1,7 @@ # User guides -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: +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.md#selected-top-user-scenarios) @@ -18,40 +19,24 @@ TDL and TOP can be used in different ways. Depending on the specific goals, diff - [Export to Word](UserScenarios.md#sec-export-to-word) - [Conversion to TTCN-3](UserScenarios.md#sec-conversion-to-tttn3) - [Defining Structured Test Objectives](UserScenarios.md#sec-defining-structured-test-objectives) + - [Transforming Structured Test Objectives into Test Descriptions](UserScenarios.md#sec-transforming-structured-test-objectives-into-test-descriptions) - [Defining Test Descriptions](UserScenarios.md#sec-defining-test-descriptions) + - [Transforming Test Descriptions into TTCN-3 Test Cases](UserScenarios.md#sec-transforming-test-descriptions-into-ttcn-3-test-cases) - - - - - - -[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). ## Selected TOP user scenarios -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. +### Overview +This section describes a set of user scenarios that illustrate how the features of the TOP tools can be used for specific testing tasks. -### 6.2.2 User control of the analysis level +### 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. @@ -64,25 +49,23 @@ From the TDL toolbar shown in [Figure TDL toolbar](#figure-TDL-toolbar) the anal
TDL toolbar -
Figure: TDL toolbar
+
Figure 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 shown in [Figure TDL Menu items](#figure-tdl-menu-items). +Alternatively these settings can be controlled from the TDL menu shown in [Figure 2](#figure-tdl-menu-items).
TDL Menu items -
Figure: TDL Menu items
+
Figure 2: TDL Menu items
### Textual modelling -6.2.3 - 1. **Usage scenario:** Refactoring and renaming @@ -92,7 +75,7 @@ To use the rename feature, select an instance of an element and from the options
Rename dialog -
Figure 6.2.3-1: Rename dialog box
+
Figure 3: Rename dialog box
@@ -105,13 +88,13 @@ In case the selected element is local to a single file the rename feature is exe 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 -
Figure 6.2.3-2: Code formatting settings dialog box
+
Figure 4: 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. +In the code formatting dialog box the preferences for different syntax elements can be set, see Figure 4.
  1. Usage scenario: Syntax auto complete
  2. @@ -122,7 +105,7 @@ To use the syntax auto complete feature type in an initial part of a keyword or
    Syntax auto complete -
    Figure 6.2.3-3: Syntax auto complete example
    +
    Figure 5: Syntax auto complete example
    @@ -132,53 +115,54 @@ Press "Enter" and the selected text is inserted.
  3. Usage scenario: Validation results presentation
-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. +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. -
+
Syntax error presentation -
Figure 6.2.3-4: Syntax error presentation
+
Figure 6: 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. +TDL model" is selected. In Figure 7 an example of a semantics check is illustrated. -
+
Constraint error presentation -
Figure 6.2.3-5: Constraint error presentation
+
Figure 7: Constraint error presentation
-
    +
    1. Usage scenario: Templates - usage and definition
    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. +An example of templates available in the context of a configuration specification is shown in Figure 8. -
    +
    Templates available in a configuration specification context -
    Figure 6.2.3-6: Templates available in a configuration specification context
    +
    Figure 8: 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 +From the Preferences dialog box the specific TOP editor can be selected and user-defined templates be created. Figure 9 illustrates a list of templates defined for the TDLtx editor. -
    +
    Template dialog box -
    Figure 6.2.3-7: Template dialog box
    +
    Figure 9: Template dialog box
    -### 6.2.4 TDL Wizards and Perspective +### 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 @@ -190,9 +174,9 @@ In order to create a new TDL specification:- Select from File menu item New and TDL project, e.g. TDLtx for a textual TDL specification. -
    +
    Wizard selection dialog box -
    Figure 6.2.4-1: Wizard selection dialog box
    +
    Figure 10: Wizard selection dialog box
    @@ -200,18 +184,18 @@ Press "Next" and in the dialog box specify a name of the project to be create. I the location of the project. -
    +
    Creating a new template TDL project -
    Figure 6.2.4-2: Creating a new template TDL project
    +
    Figure 11: 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 -
    Figure 6.2.4-3: Create new TDL project with support for OpenAPI
    +
    Figure 12: Create new TDL project with support for OpenAPI
    @@ -219,9 +203,9 @@ Select "Next" to open the dialog box for select among parameterized TDL textual Select template "TDLtx" and press "Next" to get further options to configure the TDL project. -
    +
    Create new TDL project with advanced options features -
    Figure 6.2.4-4: Create new TDL project using the advanced options features
    +
    Figure 13: Create new TDL project using the advanced options features
    @@ -233,7 +217,8 @@ If "Advanced" option is set the following options can be selected: - The imported packages - The name of the project package, default is "Main" -### 6.2.5 Graphical modelling +### 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. @@ -241,23 +226,23 @@ If "Advanced" option is set the following options can be selected: 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. +use shortcut "Alt-Shift-N". The dialog box shown in Figure 14 appears and a project name can be specified. -
    +
    Create new TDL graphical project -
    Figure 6.2.5-1: Create a new TDL project using the graphical editor
    +
    Figure 14: 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 Representation" and the dialog box shown in Figure 15 allow to create a new diagram. -
    +
    Create new TDL graphical diagram -
    Figure 6.2.5-2: Create a new diagram
    +
    Figure 15: Create a new diagram
    @@ -271,11 +256,12 @@ Select the type of diagram to be created, assign a name to the diagram, and pres 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. +element or in the Properties View of a selected element. In Figure 16 the editor for "Generic TDL " diagrams is shown. + -
    +
    Generic TDL diagram editor -
    Figure 6.2.5-3: Generic TDL diagram editor
    +
    Figure 16: Generic TDL diagram editor
    @@ -284,14 +270,14 @@ Both diagram editors have a pane with all the elements that can be used in the d 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 +### 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]. +1. **Usage scenario:** Importing OpenAPI specifications according to ETSI EG 203 647. For OpenAPI specifications the TOP tools currently supports: - Importing of data definitions under components/schemas. @@ -299,30 +285,31 @@ For OpenAPI specifications the TOP tools currently supports: - Data mappings to the target (Java) data implementation derived from the OpenAPI definitions for executability. -#### 8.2 Using TDL with OpenAPI™ Specifications +#### Using TDL with OpenAPI™ Specifications -### 8.2.1 Overview +### Overview -The OpenAPI™ Specification [i.31] (previously known as the Swagger Specification) is a notation for the specification of interfaces for RESTful web services. +The OpenAPI™ Specification (previously known as the Swagger Specification) is a notation for the specification of interfaces for RESTful web services. In addition to data-related information, OpenAPITM specifications also include paths to identify resources by means of URLs, along with applicable operations, and corresponding request and response specifications. While these can be used to derive skeletons for structured test objectives and test descriptions as -outlined in ETSI EG 203 647 [i.32], within the present document, the focus is solely on data-related information. Further information and guidelines regarding -the use of OpenAPI™ for specification and testing at ETSI can be found in ETSI EG 203 647 [i.32]. +outlined in ETSI EG 203 647 Methods for Testing and Specification (MTS); Methodology for RESTful APIs specifications and testing, +within the present document, the focus is solely on data-related information. Further information and guidelines regarding +the use of OpenAPI™ for specification and testing at ETSI can be found in ETSI EG 203 647. -In addition to a set of primitive data types, OpenAPI™ provides means for defining structured data types. The specification is an extension of the JSON schema -[i.33]. Data type schemas may be defined inline or in a schemas object which enables reuse of those definitions. In the present document, only the latter is +In addition to a set of primitive data types, OpenAPI™ provides means for defining structured data types. The specification is an extension of the +JSON schema. +Data type schemas may be defined inline or in a schemas object which enables reuse of those definitions. In the present document, only the latter is considered. Future editions may add guidelines for inline data definitions as well. -The built-in primitive types in OpenAPI™ are mapped to TDL according to the conventions in Table 8.2.1-1. The mapping relies on a TDL library of predefined types and constraints. +The built-in primitive types in OpenAPI™ are mapped to TDL according to the conventions in Table 1. The mapping relies on a TDL library of predefined types and constraints. As OpenAPI™ specifications may include format specifications for types, a generic constraint (OpenAPIFormat) with corresponding quantifiers may be used to capture this information in the derived TDL data model. Non-standard formats may be present in an OpenAPITM specification as well. The generic constraint can be used for such formats as well. - - - +
    Table 8.2.1-1: OpenAPI™ Built-in Type Mapping
    + @@ -341,14 +328,14 @@ information in the derived TDL data model. Non-standard formats may be present i
    Table 1: OpenAPI™ Built-in Type Mapping
    OpenAPI™ Type in TDL Constraints Formats and Patterns
    - - A structured type in OpenAPI™ is either an 'array' with member type declaration ('items' object) or an 'object' with a set of properties ('properties' object). Consequently, the transformation of OpenAPI™ data types into TDL data types involves the following conventions: -- If the data type corresponds to one of the primitive data types within the OpenAPI™ library as indicated in Table 8.2.1-1, the 'Type' is mapped to the corresponding 'SimpleDataType' from Table 8.2.1-1. +- If the data type corresponds to one of the primitive data types within the OpenAPI™ library as indicated in Table 1, the 'Type' is mapped to the corresponding 'SimpleDataType' +from Table 1. - If the data type is an 'object', it is mapped to a 'StructuredDataType' with a 'name' corresponding to the name of the OpenAPI™ data type. -- If the data type is an 'array', it is mapped to a 'CollectionDataType' with a 'name' corresponding to the name of the OpenAPI™ data type. The data type indicated in the 'items' object is mapped to the corresponding 'DataType' as the 'itemType' of the 'CollectionDataType'. If 'minItems' and 'maxItems' are specified for the 'array', the corresponding predefined constraints need to be added to the 'CollectionDataType'. +- If the data type is an 'array', it is mapped to a 'CollectionDataType' with a 'name' corresponding to the name of the OpenAPI™ data type. The data type indicated in the 'items' object is mapped to the corresponding +'DataType' as the 'itemType' of the 'CollectionDataType'. If 'minItems' and 'maxItems' are specified for the 'array', the corresponding predefined constraints need to be added to the 'CollectionDataType'. - Each item in the 'properties' object of the 'object' object is mapped to a 'Member' within the corresponding 'StructuredDataType' with a 'name' corresponding to the property. If a 'Member' with the same 'name' exists, no action is taken. All 'Members are to be marked as optional, except for @@ -358,7 +345,7 @@ A structured type in OpenAPI™ is either an 'array' with member type declaratio in case a property is of 'type' 'object'. - A 'SimpleDataType' corresponding to the 'type' of the property in case the 'SimpleDataType' is one of the predefined 'DataType's within the - OpenAPI™ library as indicated in Table 8.2.1-1. + OpenAPI™ library as indicated in Table 1. - Nested 'objects are transformed according to the conventions above. @@ -368,15 +355,17 @@ A structured type in OpenAPI™ is either an 'array' with member type declaratio - Corresponding 'DataElementMapping's are created for the defined data types. 'DataElementMapping's for 'DataType's derived from anonymous (inline) data types are not created. The 'DataElementMapping's may include target platform mappings in addition to the source mappings to the OpenAPI™ specifications. -### 8.2.2 Examples +### Examples -As an example consider the OpenAPI™ snippet shown in Figure 8.2.2-1 and the derived TDL data type model snippet showing in Figure 8.2.2-2. Corresponding +As an example consider the OpenAPI™ snippet shown in Figure 17 and the derived TDL data type model snippet showing +in Figure 18. Corresponding 'StructuredDataType's are created for both the 'Library' and 'LibraryBook' data types, as well as for the nested anonymous 'object's and 'array's, which are prefixed with 'Library___' and 'LibraryBook___' accordingly. This would also apply to additional anonymous 'object's and 'array's nested further within the 'object's. The 'dataType's for the corresponding 'Member's are then set accordingly. Finally, both source and target (for Java in this example) 'DataElementMapping's are provided. -
    + +
    components: @@ -404,11 +393,11 @@ As an example consider the OpenAPI™ snippet shown in Figure 8.2.2-1 and the de items: $ref: '#/components/schemas/LibraryBook' -
    Figure 8.2.2-1: OpenAPI™ example including nested anonymous data types
    +
    Figure 17: OpenAPI™ example including nested anonymous data types
    -
    +
    Type LibraryBook ( @@ -436,7 +425,7 @@ As an example consider the OpenAPI™ snippet shown in Figure 8.2.2-1 and the de Map Library to "Library" in TARGET_MAPPING as Library_TARGET_MAPPING -
    Figure 8.2.2-2: Corresponding flattened TDL definitions for Figure 8.2.2-1
    +
    Figure 18: Corresponding flattened TDL definitions for Figure 17
    @@ -453,26 +442,29 @@ that they have to be converted to JSON specifications.
-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**. - #### Using TDL with ASN.1 Specifications -8.3 ### Overview -8.3.1 -ASN.1 (Abstract Syntax Notation One) Recommendation ITU T X.680 [i.34] is a standardized language for the specification of data types and data structures. As the name implies, the specifications are abstract and therefore independent of a specific target platform. The specifications provide the information about the structure and encoding of the data which can be processed by generators or compilers to produce data type implementations for the desired target language and platform, including codecs for encoding and decoding the data for transmission. While TDL is not concerned with the encoding and decoding at the specification level, in many cases the test execution platform needs to include codes for the operationalisation of the tests. +ASN.1 (Abstract Syntax Notation One) Recommendation ITU T X.680 +is a standardized language for the specification of data types and data structures. As the name implies, the specifications are abstract +and therefore independent of a specific target platform. The specifications provide the information about the structure and encoding of the data which can be processed by generators or compilers to produce +data type implementations for the desired target language and platform, including codecs for encoding and decoding the data for transmission. While TDL is not concerned with the encoding and decoding at +the specification level, in many cases the test execution platform needs to include codes for the operationalisation of the tests. -When ASN.1 specifications are imported in TDL, the level of detail may vary from the bare essentials, including the data types only, to including additional constraints, and even encoding information (where applicable). The additional information can be utilised for early validation of the TDL specifications. While it is also possible to specify constant values in ASN.1, these are not covered in the guidelines at present. +When ASN.1 specifications are imported in TDL, the level of detail may vary from the bare essentials, including the data types only, to including additional constraints, and even encoding information +(where applicable). The additional information can be utilised for early validation of the TDL specifications. While it is also possible to specify constant values in ASN.1, these are not covered in +the guidelines at present. -ASN.1 includes a set of built-in types, some of which are mapped to TDL according to the conventions in Table 8.3.1-1. The mapping relies on a TDL library of predefined types and constraints. The generic constraints (ASN1String, ASN1DateTime, ASN1Real, ASN1ObjectIdentifier) may be used to provide additional patterns for the contents of data instances of the corresponding data types to facilitate validation. Alternatively, a tool may implement implicit validation based on the underlying types. +ASN.1 includes a set of built-in types, some of which are mapped to TDL according to the conventions in Table 2. The mapping relies on a TDL library of predefined types and constraints. +The generic constraints (ASN1String, ASN1DateTime, ASN1Real, ASN1ObjectIdentifier) may be used to provide additional patterns for the contents of data instances of the corresponding data types to facilitate +validation. Alternatively, a tool may implement implicit validation based on the underlying types. - - +
Table8.3.1-1: ASN.1 Built-in Type Mapping
+ @@ -520,7 +512,7 @@ ASN.1 includes a set of built-in types, some of which are mapped to TDL accordin - + @@ -557,49 +549,62 @@ ASN.1 includes a set of built-in types, some of which are mapped to TDL accordin The transformation of ASN.1 data types into TDL data types involves the following conventions: -- If the data type corresponds to one of the predefined 'DataType's within the ASN.1 library as indicated in Table 8.3.1-1, the ASN.1 'Type' is mapped -to the corresponding TDL 'SimpleDataType' from Table 8.3.1-1. For the supported ASN.1 types the following additional restrictions apply: +- If the data type corresponds to one of the predefined 'DataType's within the ASN.1 library as indicated in Table 2, the ASN.1 'Type' is mapped +to the corresponding TDL 'SimpleDataType' from Table 2. For the supported ASN.1 types the following additional restrictions apply: - NULL type is only used in the scope of a Choice type where if there is no information, the corresponding alternative is activated. -- If the ASN.1 data type is a 'SequenceType', a 'SetType', or a 'ChoiceType', it is mapped to a 'StructuredDataType' with a 'name' corresponding to the name of the ASN.1 data type. In the case of 'ChoiceType', a 'Constraint' with the predefined 'union' 'ConstraintType' is applied to the corresponding 'StructuredDataType', and all 'Members are marked as optional. +- If the ASN.1 data type is a 'SequenceType', a 'SetType', or a 'ChoiceType', it is mapped to a 'StructuredDataType' with a 'name' corresponding to the name of the ASN.1 data type. +In the case of 'ChoiceType', a 'Constraint' with the predefined 'union' 'ConstraintType' is applied to the corresponding 'StructuredDataType', and all 'Members are marked as optional. - If the ASN.1 data type is a 'SequenceOfType' or a 'SetOfType', it is mapped to a 'CollectionDataType' with a 'name' corresponding to the name of the ASN.1 data type. The 'Type' indicated for the 'SequenceOfType' or 'SetOfType' is mapped to the corresponding 'DataType' as the 'itemType' of the 'CollectionDataType'. +- If the ASN.1 data type is a 'SequenceOfType' or a 'SetOfType', it is mapped to a 'CollectionDataType' with a 'name' corresponding to the name of the ASN.1 data type. The 'Type' indicated for +the 'SequenceOfType' or 'SetOfType' is mapped to the corresponding 'DataType' as the 'itemType' of the 'CollectionDataType'. -- Each 'ComponentType' in the 'ComponentTypeList' of the 'SequenceType', 'SetType', or 'ChoiceType' is mapped to a 'Member' within the corresponding 'StructuredDataType' with a 'name' corresponding to the 'identifier' of the 'ComponentType'. If a 'Member' with the same 'name' exists, no action is taken. The 'dataType' of the 'Member' corresponds to: +- Each 'ComponentType' in the 'ComponentTypeList' of the 'SequenceType', 'SetType', or 'ChoiceType' is mapped to a 'Member' within the corresponding 'StructuredDataType' with a 'name' corresponding to the +'identifier' of the 'ComponentType'. If a 'Member' with the same 'name' exists, no action is taken. The 'dataType' of the 'Member' corresponds to: - A new 'DataType' corresponding to the 'Type' of the 'ComponentType' with a 'name' prefixed with the 'name' of the containing 'StructuredDataType' in case a 'ComponentType' is directly contained within another 'ComponentType'. - - A 'SimpleDataType' corresponding to the 'Type' of the 'ComponentType' in case the 'SimpleDataType' is one of the predefined 'DataType's within the ASN.1 library as indicated in Table 8.3.1-1. + - A 'SimpleDataType' corresponding to the 'Type' of the 'ComponentType' in case the 'SimpleDataType' is one of the predefined 'DataType's within the ASN.1 library as indicated in Table 2. - Nested 'ComponentType's are transformed according to the conventions above. -- If the ASN.1 data type is an 'EnumeratedType', it is mapped to an 'EnumDataType' with a 'name' corresponding to the name of the ASN.1 data type. The contained 'EnumerationItem's are mapped to 'SimpleDataInstance's of the 'EnumDataType' that are contained in the 'EnumDataType'. There are no guidelines for 'NamedNumber's at present. +- If the ASN.1 data type is an 'EnumeratedType', it is mapped to an 'EnumDataType' with a 'name' corresponding to the name of the ASN.1 data type. The contained 'EnumerationItem's are mapped +to 'SimpleDataInstance's of the 'EnumDataType' that are contained in the 'EnumDataType'. There are no guidelines for 'NamedNumber's at present. -- Corresponding 'DataElementMapping's are created for the defined data types. 'DataElementMapping's for 'DataType's derived from anonymous (inline) data types are not created. The 'DataElementMapping's may include target platform mappings in addition to the source mappings to the ASN.1 specifications. +- Corresponding 'DataElementMapping's are created for the defined data types. 'DataElementMapping's for 'DataType's derived from anonymous (inline) data types are not created. +The 'DataElementMapping's may include target platform mappings in addition to the source mappings to the ASN.1 specifications. -For the following built-in types not mentioned in Table 8.3.1-1, the transformations to TDL types are done as follows: +For the following built-in types not mentioned in Table 2, the transformations to TDL types are done as follows: -- UnrestrictedCharacterStringType: Replace the CHARACTER STRING type with its associated type obtained by expanding inner subtyping in the associated type of the CHARACTER STRING type (see clause 44.5 of Recommendation ITU-T X.680 [i.34]) to the corresponding TDL type. +- UnrestrictedCharacterStringType: Replace the CHARACTER STRING type with its associated type obtained by expanding inner subtyping in the associated type of the CHARACTER STRING +type (see clause 44.5 of Recommendation ITU T X.680) to the corresponding TDL type. -- EmbeddedPDVType: Replace any EMBEDDED PDV type with its associated type obtained by expanding inner subtyping in the associated type of the EMBEDDED PDV type (see clause 36.5 of Recommendation ITU-T X.680 [i.34]) to the corresponding TDL type. +- EmbeddedPDVType: Replace any EMBEDDED PDV type with its associated type obtained by expanding inner subtyping in the associated type of the EMBEDDED PDV type + (see clause 36.5 of Recommendation ITU T X.680) +to the corresponding TDL type. -- ExternalType: replace the EXTERNAL type with its associated type obtained by expanding inner subtyping in the associated type of the EXTERNAL type (see clause 37.5 of Recommendation ITU-T X.680 [i.34]) to the corresponding TDL type. +- ExternalType: replace the EXTERNAL type with its associated type obtained by expanding inner subtyping in the associated type of the EXTERNAL type +(see clause 37.5 of Recommendation ITU T X.680)) +to the corresponding TDL type. -- InstanceOfType: Replace the INSTANCE OF type with its associated type obtained by substituting INSTANCE OF DefinedObjectClass by its associated ASN.1 type (see clause C.7 of Recommendation ITU T X.681 [i.36]) and map all ASN.1 types to their TDL types according to Table 8.3.1-1. +- InstanceOfType: Replace the INSTANCE OF type with its associated type obtained by substituting INSTANCE OF DefinedObjectClass by its associated ASN.1 type (see clause C.7 of +Recommendation ITU T X.681 and +map all ASN.1 types to their TDL types according to Table 2. ### Examples -8.3.2 -For example, as shown in Figure 8.3.2-1 and Figure 8.3.2-2, for the 'NodeDescriptor' and related type definitions taken from [i.35], a corresponding 'StructuredDataType' is created, -including derived 'DataType's for the nested 'aNode' anonymous 'ContentType', as well as the 'aLink', 'aFile', and 'aDirectory' anonymous 'ContentType's nested further within the -'aNode' 'ContentType'. The 'dataType's for the corresponding 'Members are then set accordingly. The 'DataType' for the 'NodeIdentity' type as well as the derived 'DataType' for the -'aNode' 'Member' are assigned a 'Constraint' with the 'union' 'ConstraintType'. +For example, as shown in Figure 19 and Figure 20, for +the 'NodeDescriptor' and related type definitions taken from +ETSI TS 103 666-1, V15.0.0: Smart Secure Platform (SSP); Part 1: General characteristics (Release 15), + a corresponding 'StructuredDataType' is created, including derived 'DataType's for the nested 'aNode' anonymous 'ContentType', as well as the 'aLink', 'aFile', and 'aDirectory' anonymous + 'ContentType's nested further within the 'aNode' 'ContentType'. The 'dataType's for the corresponding 'Members are then set accordingly. The 'DataType' for the 'NodeIdentity' type as well + as the derived 'DataType' for the 'aNode' 'Member' are assigned a 'Constraint' with the 'union' 'ConstraintType'. -
+
NodeDescriptor ::= SEQUENCE @@ -635,11 +640,11 @@ including derived 'DataType's for the nested 'aNode' anonymous 'ContentType', as aNodeReference NodeReference -- Node reference } -
Figure 8.3.2-1: ASN.1 example including nested anonymous data types (excerpt from [i.35])
+
Figure 19: ASN.1 example including nested anonymous data types
-
+
Type NodeDescriptor ( @@ -671,11 +676,12 @@ including derived 'DataType's for the nested 'aNode' anonymous 'ContentType', as aFileSize of type FileSize ); -
Figure 8.3.2-2: Corresponding TDL definitions (excerpt) for Figure 8.3.2-1
+
Figure 20: Corresponding TDL definitions (excerpt) for Figure 19
-As an example consider the ASN.1 snippet shown in Figure 8.3.2-3 and the derived TDL data type model snippet showing in Figure 8.3.2-4. Corresponding 'StructuredDataType's are +As an example consider the ASN.1 snippet shown in Figure 21 and the derived TDL data type +model snippet showing in Figure 22. Corresponding 'StructuredDataType's are created for both the 'Library' and 'Document' data types, as well as for the nested anonymous 'ContentType's, which are prefixed with 'Library___' and 'Document___' accordingly. This would also apply to additional anonymous 'ContentType's nested further within the 'ContentType's. The 'dataType's for the corresponding 'Members are then set accordingly. The derived 'DataType' 'Document___number' for the 'number' 'ContentType' of type 'CHOICE' is assigned a 'Constraint' with the 'union' 'ConstraintType'. Default values are not @@ -684,7 +690,7 @@ values. In TDL it is possible to define a data instance which provides default v are provided. -
+
Library ::= SEQUENCE { @@ -704,11 +710,11 @@ are provided. updated DATE } -
Figure 8.3.2-3: ASN.1 example including nested anonymous data types
+
Figure 21: ASN.1 example including nested anonymous data types
-
+
Type Library ( @@ -738,7 +744,7 @@ are provided. Map Library to "Library" in SOURCE_MAPPING as Library_MAPPING; Map Document to "Document" in SOURCE_MAPPING as Document_MAPPING; -
Figure 8.3.2-4: Corresponding flattened TDL definitions (excerpt) for Figure 8.3.2-3
+
Figure 22: Corresponding flattened TDL definitions (excerpt) for Figure 21
#### Using TDL with YANG Specifications @@ -747,21 +753,20 @@ are provided. ### Creating test objectives based on TDL meta-model -6.2.7 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**. +The TOP tool editors for the standardised textual syntax in ETSI ES 203 119-8 +support the extended syntax for structured test objectives in ETSI ES 203 119-4. +Details on how to use one of the TOP tool textual editors to define structured test objectives are described below. #### Unified Definition of Test Puposes and Test Descriptions -6.7 ### Overview -6.7.1 With the standardised textual notation for TDL, a new unified syntax was also introduced to allow specifying test purpose-like test descriptions. Using this notation, users can start from a more abstract test purpose, and gradually add to the necessary details to reach executable specifications, @@ -773,7 +778,7 @@ the configuration and behaviour specifications can be simplified at first, e.g. 'Behaviour's such as 'Message's over time. -
+
Objective TO_MOVE_OBJECT_UNIFIED { @@ -793,11 +798,11 @@ the configuration and behaviour specifications can be simplified at first, e.g. } } -
Figure 6.7.1-1: Unified definition of test purposes and test descriptions
+
Figure 23: Unified definition of test purposes and test descriptions
-
+
Test Purpose Description TP_MOVE_OBJECT_UNIFIED { @@ -815,11 +820,11 @@ the configuration and behaviour specifications can be simplified at first, e.g. } } -
Figure 6.7.1-2: Unified definition of test purposes and test descriptions with refinements
+
Figure 24: Unified definition of test purposes and test descriptions with refinements
-
+
Test Purpose Description TP_MOVE_OBJECT_UNIFIED { @@ -837,18 +842,20 @@ the configuration and behaviour specifications can be simplified at first, e.g. } } -
Figure 6.7.1-3: Unified definition of test purposes and test descriptions with further refinements
+
Figure 25: Unified definition of test purposes and test descriptions with further refinements
-As shown in Figure 6.7.1-1, the test objective is specified separately and referenced within the test purpose description. The test purpose description itself references a +As shown in Figure 23, the test objective is specified separately and referenced within the test +purpose description. The test purpose description itself references a test confederation and has the familiar expected behaviour pattern with the when and then blocks. For simplicity, stimulus and response can be initially specified as inline actions. In this case, the action descriptions are expressed in plain text. At a later stage, the behaviour can be further refined, for example by using message exchanges, -but without yet defining and using any the data types, as shown in Figure 6.7.1-2. Eventually, when the data types are known and defined, they can be used as subsequent -refinement of the behaviour, as shown in Figure 6.7.1-3. Finally, they might even be defined as parameters, as the test purpose description gradually includes sufficient -detail to become executable. +but without yet defining and using any the data types, as shown in Figure 24. +Eventually, when the data types are known and defined, they can be used as subsequent +refinement of the behaviour, as shown in Figure 25. Finally, they might +even be defined as parameters, as the test purpose description gradually includes sufficient detail to become executable. -
+
Objective: TO_MOVE_OBJECT_UNIFIED @@ -868,11 +875,12 @@ detail to become executable. } } -
Figure 6.7.1-4: Representation of Figure 6.7.1-3 using the generic test description syntax
+
26: Representation of Figure 25 using the generic test description syntax
As the unified notation is simply using annotated blocks with specialised syntax, the same structure can also be expressed by using the generic syntax for test descriptions, -as shown in Figure 6.7.1-4. As the test purpose gradually becomes more detailed and more formalised, the annotated blocks could also eventually be dropped or extended with +as shown in Figure 26. As the test purpose gradually becomes more detailed and more formalised, +the annotated blocks could also eventually be dropped or extended with further annotations. Using this approach, there is no need for transformations between different notations and different conceptual representations. Is that the same model elements are used to express the full spectrum between more abstract and more concrete behaviour specifications. The level of detail can be refined over time as further information becomes available. @@ -881,16 +889,13 @@ information becomes available. - - - -
  1. User scenario: Templates for TO backed by TD, also for constituent parts.
-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**. +The TOP tool textual editors provides context sensitive templates for specification of structured test objectives. Further details on how to use templates can be found +here. +
  1. User scenario: Template library for basic configurations and types.
  2. @@ -902,7 +907,6 @@ The extended syntax for structured test objectives allows for more complete test ### Generate TD from TO -6.2.8 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. @@ -912,7 +916,8 @@ Lossless conversion of TDL test objectives to test descriptions is generally not 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: +As the conversion cannot be completely automated the process on how manual steps can support the transformation are defined in section +Transforming Structured Test Objectives into Test Descriptions. 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. @@ -921,7 +926,6 @@ As the conversion cannot be completely automated the process on how manual steps ### Export to Word -6.2.9 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: @@ -932,33 +936,34 @@ An essential use case for TDL is its application in producing test specification 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. +shown in Figure 16. 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. +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 ETSI TR 103 119 clause 5.3.3 more information on the TDL-TO converter is defined. ### Conversion to TTCN-3 -6.2.10 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. +The TOP tools support generation of TTCN-3 according to ETSI ES 203 119-6. +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 section "Transforming Test Descriptions into TTCN-3 Test Cases" additional +information on the translation can be found. ## Defining Structured Test Objectives -6.3 ### Overview -6.3.1 -TDL Structured Test Objective (TDL-TO) may be used in several ways in the test developments process. The process illustrated in this clause is based on the -test development process defined in ETSI EG 203 130 (V1.1.1) [i.21]. The TDL-TO specifies a refinement of a 'TestObjective' and defines a formal description of -a test objective, that may be the basis for a transformation to a TDL test description. +TDL Structured Test Objective (TDL-TO) may be used in several ways in the test developments process. The process illustrated here is based on the +test development process defined in ETSI EG 203 130 (V1.1.1). +The TDL-TO specifies a refinement of a 'TestObjective' and defines a formal description of a test objective, that may be the basis for a transformation to a TDL test description. Developing a test specification from a base standard the first step after identifying the requirements to be tested, is to define the test objectives. The entities and events to check the test objectives may then be specified and finally arguments of events (data values) and timing constraints may be @@ -979,12 +984,11 @@ re-use of basic data definitions and configurations. ### Domain part of TDL-TO -6.3.1 The domain part of a TDL-TO specification defines the PICS elements, entities, and events relevant for a set of TDL TOs. -
    +
    Domain { @@ -1012,43 +1016,41 @@ The domain part of a TDL-TO specification defines the PICS elements, entities, a - termination_SIP_signalling_session ; -
    Figure 6.3.1-1: TDL-TO Domain example
    +
    Figure 27: TDL-TO Domain example
    -In Figure 6.3.1-1 an example of a domain specification is shown. The example illustrates the definition of a single PICS value. The example also contains +In Figure 27 an example of a domain specification is shown. The example illustrates the definition of a single PICS value. The example also contains the definition of a list of entities that can be referenced in test configuration definitions and in event occurrences in the behaviour part. Finally, the example shows definition of events that may be referenced in the event occurrence parts of TDL-TO behaviour descriptions. ### Data definitions -6.3.2 In TDL-TO data may be used in the behaviour part without explicit declaration. However, in the data part of the TDLTO definition structured data types and structured data values may be specified. -
    +
    Data { type DiameterMessage; } -
    Figure 6.3.2-1: TDL-TO data definition example
    +
    Figure 28: TDL-TO data definition example
    -Figure 6.3.2-1 illustrates the specification of a single data type. +Figure 28 illustrates the specification of a single data type. ### Configuration -6.3.3 The configurations part of the TDL-TO specification defines by reference the context in which a TDL-TO is to be executed. The Configuration part may contain any number of test configuration as needed for the TDL-TOs to which it may be associated. -
    +
    Configuration { @@ -1072,22 +1074,21 @@ may contain any number of test configuration as needed for the TDL-TOs to which ; } -
    Figure 6.3.3-1: TDL-TO configuration example
    +
    Figure 29: TDL-TO configuration example
    -The configuration part in Figure 6.3.3-1 shows the definition of two test configurations "CF_VxLTE_INT" and "CF_VxLTE_RMI". Both test configurations are +The configuration part in Figure 29 shows the definition of two test configurations "CF_VxLTE_INT" and "CF_VxLTE_RMI". Both test configurations are based on the same component type "DiameterComp" and gate type "defaultGT". The 'defaultGT' is specified to accept instances of the datatype 'DiameterMessage'. The test configurations also specify the role of involved entities, as tester or SUT component. ### Test purpose behaviour -6.3.4 The test behaviour defines the behaviour of a TDL-TO to check a single test objective in terms of a sequence of event occurrences in a referenced test configuration and with data values and timing constraints. -
    +
    Package TP_RX { @@ -1100,7 +1101,7 @@ configuration and with data values and timing constraints. Test objective "Verify that IUT after reception of 486 response sends an ST-Request at originating leg." Reference - "ETSI TS 129 214 (V15.6.0) [i.27], clauses 4.4.4" + "ETSI TS 129 214 (V15.6.0), clauses 4.4.4" Config Id CF_VxLTE_INT @@ -1126,12 +1127,13 @@ configuration and with data values and timing constraints. } } -
    Figure 6.3.4-1: TDL-TO behaviour example
    +
    Figure 30: TDL-TO behaviour example
    -A test purpose behaviour example is shown in Figure 6.2.4-1. The test purpose behaviour references the other parts of a TDL-TO, that is the domain, -data and configuration part, that in this example are all imported from the two packages 'SIP_Common' and 'Diameter_Common'. +A test purpose behaviour example is shown in Figure 30 from the test specification +ETSI TS 103 029 V5.1.1. The test purpose behaviour +references the other parts of a TDL-TO, that is the domain, data and configuration part, that in this example are all imported from the two packages 'SIP_Common' and 'Diameter_Common'. A test purpose is assigned a unique id often reflecting its association within a test suite structure. In this example indicating in the TP name the interface 'RX', the component 'PCSCF', and the message 'STR' relevant for this TP. @@ -1151,13 +1153,11 @@ illustrates the use of undeclared data instances '486_Response_INVITE' and 'STR' 'Session_Id_AVP'. In case the test purpose needs to perform operations after the test objective is achieved, such behaviour may be specified in the final conditions part. -## Transforming Test Objectives into Test Descriptions +## Transforming Structured Test Objectives into Test Descriptions -6.4 ### Overview -6.4.1 Structured test objectives can be used as a starting point for test descriptions or even for executable test cases. As the abstraction gap between structured tests objectives and executable test cases is often too large, it is recommended to refine the structured test objectives into test descriptions in a stepwise @@ -1173,7 +1173,6 @@ The examples are provided in the textual representation for brevity and convenie ### Data -6.4.2 TDL-TO provides different means for the use of data within a 'StructuredTestObjective'. In addition to the use of defined 'DataIntances' and 'SpecialValueUse's, TDL-TO provides means for the specification of literal 'Value's inline, within a 'StructuredTestObjective'. @@ -1181,12 +1180,12 @@ TDL-TO provides means for the specification of literal 'Value's inline, within a The use of defined 'DataInstance's and 'SpecialValueUse's does not require particular handling as the same 'DataInstance's can be used in the resulting 'TestDescription's. While the concrete syntax may be different, the underlying model elements are the same. The corresponding 'DataType's may need to be taken into account if a 'TestConfiguration' needs to be inferred from the 'StructuredTestObjective'. Additionally, any qualifying 'Comment's used to describe -further details related to the context of its usage may need to be interpreted according to the existing conventions (if defined). The example in Figure 6.4.2-1 +further details related to the context of its usage may need to be interpreted according to the existing conventions (if defined). The example in Figure 31 illustrates the definition of 'DataType's and 'DataInstance's in TDL-TO. The corresponding data definitions in the textual representation of TDL are shown -in Figure 6.4.2-2. Apart from minor syntactical differences, the underlying model structures are the same. In fact, the TOP tools enable cross referencing between +in Figure 32. Apart from minor syntactical differences, the underlying model structures are the same. In fact, the TOP tools enable cross referencing between both notations so that data definitions in TDL can be reused in TDL-TO and vice-versa. -
    +
    Package data { @@ -1199,11 +1198,11 @@ both notations so that data definitions in TDL can be reused in TDL-TO and vice- } } -
    Figure 6.4.2-1: Predefined data example in TDL-TO
    +
    Figure 31: Predefined data example in TDL-TO
    -
    +
    Package data { @@ -1214,7 +1213,7 @@ both notations so that data definitions in TDL can be reused in TDL-TO and vice- position startingPosition ( x = -21 ) ; } -
    Figure 6.4.2-2: Corresponding data in TDL
    +
    Figure 32: Corresponding data in TDL
    @@ -1224,14 +1223,14 @@ at an early stage, where the data structures and contents are not fixed yet. 'Li details related to the context of its usage may need to be interpreted according to the existing conventions (if defined). In order to transform 'LiteralValue's, first corresponding 'DataType's and 'DataInstance's need to be inferred. Consider the following example illustrated -in Figure 6.4.2-3, showing a 'LiteralValue' specification within an 'EventOccurrenceSpecification'. The basic structure is the same, but there are no predefined -'DataType's and 'DataInstance's. The inferred 'DataType's and 'DataInstance's are illustrated in Figure 6.4.2-4. The inferred 'DataElement's are prefixed +in Figure 33, showing a 'LiteralValue' specification within an 'EventOccurrenceSpecification'. The basic structure is the same, but there are no predefined +'DataType's and 'DataInstance's. The inferred 'DataType's and 'DataInstance's are illustrated in Figure 34. The inferred 'DataElement's are prefixed with 'inferred_' for illustrative purposes. The contextual information may provide hints for more appropriate naming. Apart from the inference, type compatibility and merging needs to be considered. In this example, it is assumed that 'x' and 'y' are of the same type, otherwise distinct 'DataType's need to be inferred as well. If a 'StructuredDataInstance' is used only once, it is also possible to specify it as inline 'DataInstanceUse' in TDL. -
    +
    when { @@ -1243,11 +1242,11 @@ as well. If a 'StructuredDataInstance' is used only once, it is also possible to the Object entity moves_to the received start position } -
    Figure 6.4.2-3: Literal data in TDL-TO
    +
    Figure 33: Literal data in TDL-TO
    -
    +
    Package inferred_data { @@ -1258,7 +1257,7 @@ as well. If a 'StructuredDataInstance' is used only once, it is also possible to inferred_position inferred_start_position ( x = 22, y = 21 ) ; } -
    Figure 6.4.2-4: Inferred literal data in TDL
    +
    Figure 34: Inferred literal data in TDL
    @@ -1267,18 +1266,17 @@ defined as part of the refinement process for both existing data specifications ### Configurations -6.4.3 Similar to the use of data, TDL-TO provides different means for the specification of the entities related to an 'EventOccurrenceSpecification'. Abstract entities can be useful, especially at an early stage, where the 'TestConfiguration's are not fixed yet. If 'TestConfiguration's are already specified, the corresponding 'ComponentInstances' can be used in 'EventOccurrenceSpecification's. An example for a simple 'TestConfiguration' and corresponding -'ComponentType's and 'GateType's specified in TDL-TO is shown in Figure 6.4.3-1. The corresponding definitions in the textual representation of TDL are -showing in Figure 6.4.3-2. The use of defined 'ComponentInstance's does not require particular handling as the same 'TestConfiguration's can be used in +'ComponentType's and 'GateType's specified in TDL-TO is shown in Figure 35. The corresponding definitions in the textual representation of TDL are +shown in Figure 36. The use of defined 'ComponentInstance's does not require particular handling as the same 'TestConfiguration's can be used in the resulting 'TestDescription's. Apart from minor syntactical differences, the underlying model structures are the same. The TOP tools enable cross referencing between both notations so that definitions related to 'TestConfiguration's in TDL can be reused in TDL-TO. -
    +
    Package base_configuration { @@ -1294,11 +1292,11 @@ cross referencing between both notations so that definitions related to 'TestCon } } -
    Figure 6.4.3-1: Predefined configuration example in TDL-TO
    +
    Figure 35: Predefined configuration example in TDL-TO
    -
    +
    Package base_configuration { @@ -1314,15 +1312,16 @@ cross referencing between both notations so that definitions related to 'TestCon } } -
    Figure 6.4.3-2: Corresponding configuration in TDL
    +
    Figure 36: Corresponding configuration in TDL
    The use of abstract entities provides more flexibility early on, however, it requires clear guidelines and conventions for the interpretation of the abstract entities. An 'Entity' may be transformed into a 'ComponentInstance' or a 'GateInstance' depending on the intended interpretation. Hints and conventions regarding the desired interpretation of an 'Entity' can be provided in the 'Entity' definition, in the context of its use, or outside the TDL-TO specification. -Considering the example illustrated in Figure 6.4.2-3, it can be inferred that the 'Controller' entity and the 'Object' entity have some means to interact without -this being explicitly specified. Figure 6.4.3-3 illustrates one possible 'TestConfiguration' which can be inferred from the behaviour specification in Figure 6.4.2-3. +Considering the example illustrated in Figure 33, it can be inferred that the 'Controller' entity and the 'Object' entity have some means to interact without +this being explicitly specified. Figure 37 illustrates one possible 'TestConfiguration' which can be inferred from the +behaviour specification in Figure 33. First, one or more 'GateType's need to be inferred, then the corresponding 'ComponentType's and their 'GateInstance's. For simplicity, it is assumed that 'Controller' and 'Object' are of the same 'ComponentType', conventions may be put in place to indicate that. Alternatively, subsequent refinement may further differentiate the 'ComponentType's where appropriate. Finally, the 'TestConfiguration' is inferred, including assigning 'ComponentInstance's with corresponding roles, as well as @@ -1331,7 +1330,7 @@ context (e.g. when/then clauses, etc.). Similar to 'DataType's, compatible infer merged where applicable to avoid unnecessary duplication. -
    +
    Package inferred_configuration { @@ -1347,14 +1346,13 @@ merged where applicable to avoid unnecessary duplication. } } -
    Figure 6.4.3-3: Inferred configuration in TDL
    +
    Figure 37: Inferred configuration in TDL
    ### Behaviour -6.4.4 Initial conditions, expected behaviour, and final conditions in TDL-TO are expressed by means of 'EventSequences'. 'EventSequences' are comprised of 'EventOccurrenceSpecification's. This provides simple generic high-level construct with loose semantics indicated by the referenced 'Event'. The @@ -1362,15 +1360,15 @@ interpretation of the 'Event' can be indicated in the domain description and/or well-defined specification conventions in order to ensure consistent interpretation. TDL 'TestDescriptions' require more differentiated specification of behaviour, distinguishing between 'Interaction's, 'Action's, and other kinds of 'Behaviour's. While some assumptions regarding the mapping of 'Event's to 'AtomicBehaviour's can be made intuitively, it is recommended to define explicit conventions in order to ensure consistent interpretation and transformation. -The example in Figure 6.4.4 1 illustrates a minimal 'StructuredTestObjective' containing only the specification of the expected behaviour. Assuming the data +The example in Figure 38 illustrates a minimal 'StructuredTestObjective' containing only the specification of the expected behaviour. Assuming the data and configuration related information has been inferred as illustrated in the previous examples, the corresponding 'TestDescription' inferred from the -'StructuredTestObjective' is shown in Figure 6.4.4-2. In this scenario, the first 'EventOcurrenceSpecification' in the 'whenClause' is interpreted as an +'StructuredTestObjective' is shown in Figure 39. In this scenario, the first 'EventOcurrenceSpecification' in the 'whenClause' is interpreted as an 'Interaction' between the 'Controller' and the 'Object', the latter is assumed to be the implicit opposite entity in the 'EventOcurrenceSpecification'. It is recommended to make opposite entities explicit whenever possible. The second 'EventOcurrenceSpecification' in the 'thenClause' is interpreted as an 'ActionReference'. In this case, it is also necessary to infer a definition for the action. -
    +
    Test Purpose { @@ -1389,11 +1387,11 @@ It is recommended to make opposite entities explicit whenever possible. The seco } } -
    Figure 6.4.4-1: Expected behaviour specification in TDL-TO
    +
    Figure 38: Expected behaviour specification in TDL-TO
    -
    +
    Action move_to (position of type inferred_position); @@ -1402,15 +1400,16 @@ It is recommended to make opposite entities explicit whenever possible. The seco perform action move_to (position = inferred_start_position) on Object; } -
    Figure 6.4.4-2: Corresponding behaviour specification in TDL
    +
    Figure 39: Corresponding behaviour specification in TDL
    If desired, especially when 'StructuredDataInstance's are used only once, it is also possible to specify them as inline 'DataInstanceUse's in TDL. The resulting -'TestDescription' for the example in Figure 6.4.4-1 is shown in Figure 6.4.4 3, where instead of the 'inferred_start_position' 'DataInstance', the corresponding +'TestDescription' for the example in Figure 38 is shown in + Figure 40, where instead of the 'inferred_start_position' 'DataInstance', the corresponding data is specified inline. Since the 'DataInstance' is used twice in this case, it results in some duplication. -
    +
    Action move_to (position of type inferred_position); @@ -1419,7 +1418,7 @@ data is specified inline. Since the 'DataInstance' is used twice in this case, i perform action move_to (position = new inferred_position (x = 22, y = 21)) on Object; } -
    Figure 6.4.4-3: Corresponding behaviour specification in TDL using inline data
    +
    Figure 40: Corresponding behaviour specification in TDL using inline data
    @@ -1427,7 +1426,8 @@ The steps for the derivation of 'TestDescription's from 'StructuredTestObjective remains the same, starting with the data definitions, through the test configurations, and finally the behaviour specifications. The above guidelines can be used as a template for deriving 'TestDescription's from other kinds of documents and artifacts as a starting point. -### 6.4.5 Transformation Conventions and Assumptions +### Transformation Conventions and Assumptions + The transformation of 'LiteralValue's involves the following conventions: @@ -1453,26 +1453,30 @@ The transformation of 'LiteralValue's involves the following conventions: - Each nested 'Content' or 'LiteralValue' element is transformed according to the conventions above. -For example, as shown in Figure 6.4.5-1 and Figure 6.4.5-3, for the 'EventOccurrenceSpecification' taken from [i.37], a corresponding 'StructuredDataType' is +For example, as shown in Figure 41 and + Figure 43, for the 'EventOccurrenceSpecification' taken from +ETSI TS 103 597-2: MTS, Test Specification for MQTT, Part 2: Security Tests, +a corresponding 'StructuredDataType' is created for both the 'LiteralValue' 'message' and for the 'payload' 'Content' of the 'message'. The 'dataType' for the 'payload' 'Member' is then set accordingly. -Instead, since the 'value's for the 'filterLength' and 'topic_filter' Content's correspond to 'DataReference's to defined 'DataInstance's, as shown in Figure 6.4.5-2, +Instead, since the 'value's for the 'filterLength' and 'topic_filter' Content's correspond to 'DataReference's to defined 'DataInstance's, as shown in + Figure 42, the 'dataType's for the corresponding 'Member's in the derived 'SUBSCRIBE_message_payload' 'DataType' are: set to the 'dataType's of the referenced 'DataInstance's. -
    +
    the IUT entity receives a SUBSCRIBE message containing payload containing filterLength corresponding to TOPIC_FILTER_LEN_SEC_CVE_01, - topic_filter corresponding to TOPIC_FILTER_LEN_SEC_CVE_01;; + topic_filter corresponding to TOPIC_FILTER_SEC_CVE_01;; from the ATTACKER_CLIENT entity -
    Figure 6.4.5-1: 'LiteralValue's and 'DataReference's example (from [i.37])
    +
    Figure 41: 'LiteralValue's and 'DataReference's example
    -
    +
    Data { @@ -1480,10 +1484,10 @@ the 'dataType's for the corresponding 'Member's in the derived 'SUBSCRIBE_messag Int16 TOPIC_FILTER_LEN_SEC_CVE_01; // corresponds to lengthof(TOPIC_FILTER_SEC_CVE_01) + 1 } -
    Figure 6.4.5-2: Corresponding 'DataInstance' definitions (from [i.37])
    +
    Figure 42: Corresponding 'DataInstance' definitions
    -
    +
    Type SUBSCRIBE_message ( @@ -1494,7 +1498,7 @@ the 'dataType's for the corresponding 'Member's in the derived 'SUBSCRIBE_messag topic_filter of type UTF8String ) ; -
    Figure 6.4.5-3: Resulting 'DataType' specifications in TDL
    +
    Figure 43: Resulting 'DataType' specifications in TDL
    For the transformation of 'EventOccurrence's into 'Behaviour's, it is necessary to first derive the corresponding 'TestConfiguration' if no 'TestConfiguration' @@ -1539,51 +1543,55 @@ is specified for the 'StructuredTestObjective'. The derivation of the 'TestConfi ## Defining Test Descriptions -6.5 ### Overview -6.5.1 In the absence of structured test objectives or other documents which can serve as a starting point, test descriptions can be defined from scratch. The fundamental steps in the process involve the definition of data first, then configurations, finally the behaviour. The following examples illustrate the different steps by means of the graphical syntax for TDL with the help of the graphical editor. -### 6.5.2 Data and Configuration +### Data and Configuration Since the 'Generic TDL' diagram accommodates both the specification of data- and configuration-related elements, both are contemplated together. If necessary, separate -diagrams can be created instead to capture only data-related or configuration-related elements separately. In the example shown in Figure 6.5.2-1 the one diagram approach +diagrams can be created instead to capture only data-related or configuration-related elements separately. In the example shown in +Figure 44 the one diagram approach is shown for conciseness and also to show a complete overview of all relevant elements in one place. On the top-left side the predefined simple data types are shown. In the bottom part the verdict-related types and instances are shown. On the right side behaviour-related definitions for an 'Action' and a 'TestDescription' are shown. Finally, in the middle part, the data types, data instances, as well as component and gate types and the test configuration are shown. The graphical editor does provide some more flexibility with regard to the order of creation of the different elements. However, the fundamental order remains the same - data, configuration, behaviour. - - -![Data and configuration specification](images/DataAndConfSpecInTdlGr.png) -Figure 6.5.2-1: Data and configuration specification in TDL using the graphical editor +
    +Data and configuration specification in TDL using the graphical editor +
    Figure 44: Data and configuration specification in TDL using the graphical editor
    +
    + ### Test Behaviour and Time -6.5.3 The 'TDL Behaviour' diagram allows the visualization and specification of the behaviour of an individual 'TestDescription'. While the 'TestDescription' itself is defined within a 'Generic TDL' diagram, including its name, parameters, test configuration, and test objectives, the specifics of the behaviour are shown in a separate -'TDL Behaviour' diagram. The example shown in Figure 6.5.3-1 illustrates the behaviour of the 'TD_MOVE_OBJECT' 'TestDescription'. In addition to the basic behaviour, +'TDL Behaviour' diagram. The example shown in Figure 45 illustrates +the behaviour of the 'TD_MOVE_OBJECT' 'TestDescription'. In addition to the basic behaviour, temporal properties of the behaviour are illustrated with the help of a 'TimeLabel' and a 'TimeConstraint'. + + +
    +Test behaviour in TDL using the graphical editor +
    Figure 45: Test behaviour in TDL using the graphical editor
    +
    - ![Test behaviour in TDL using the graphical editor](images/TestBehaviourInTdlInGrFormat.png) - -Figure 6.5.3-1: Test behaviour in TDL using the graphical editor + 'TestDescriptionReference's enable the reuse of behaviour definitions. While in some other high-level test specification languages the use of so-called "data tables" has been gaining some popularity, TDL provides more sophisticated facilities both for the definition of data and for the reuse of behaviour. A parameterized -'TestDescription' can be invoked multiple times with different data instances as shown in the example in Figure 6.5.3-2. In the 'TC_MOVE_AROUND' 'TestDescription', -the 'TC_MOVE_TO' 'TestDescription is invoked four times to describe a test sequence where the 'Object' needs to move to four positions. +'TestDescription' can be invoked multiple times with different data instances as shown in the example in Figure 46. +In the 'TC_MOVE_AROUND' 'TestDescription', the 'TC_MOVE_TO' 'TestDescription is invoked four times to describe a test sequence where the 'Object' needs to move to four positions. -
    +
    Test Description TC_MOVE_TO (target_position of type inferred_position) @@ -1600,19 +1608,18 @@ the 'TC_MOVE_TO' 'TestDescription is invoked four times to describe a test seque execute TC_MOVE_TO (target_position = end_position); } -
    Figure 6.5.3-2: Test behaviour reuse in TDL using test description references
    +
    Figure 46: Test behaviour reuse in TDL using test description references
    -## Transforming Test Descriptions into TTCN-3 Test Cases +## Transforming Test Descriptions into TTCN-3 Test Cases -6.6 ### Overview -6.6.1 -One way to obtain executable test cases from TDL is to transform the test descriptions into TTCN-3 code. The standardized mapping to TTCN-3 in ETSI ES 203 119-6 [i.18] +One way to obtain executable test cases from TDL is to transform the test descriptions into TTCN-3 code. The standardized mapping to TTCN-3 in +ETSI ES 203 119-6 specifies in great detail all the peculiarities that need to be considered for the derivation of executable test cases in TTCN-3 from TDL. The basic steps remain fundamentally the same, involve transforming the data definitions, the configuration-related definitions, as well as the behaviour specifications. All the transformations have to take into account the semantic gaps between both languages, as well as the intrinsic differences in the levels of abstraction. The standardized mapping is defined for locally @@ -1622,16 +1629,15 @@ mapping within the TOP provides automated translation for the essential parts ne ### Data -6.6.2 -To illustrate the mapping of the data-related elements, consider the example in Figure 6.6.2-1. It illustrates different data definitions and data uses. The corresponding -equivalents in TTCN-3 are shown in Figure 6.6.2-2. The mappings for data are pretty straightforward in this example. Although the use of data mappings is recommended, +To illustrate the mapping of the data-related elements, consider the example in Figure 47. It illustrates different data definitions and data uses. The corresponding +equivalents in TTCN-3 are shown in Figure 48. The mappings for data are pretty straightforward in this example. Although the use of data mappings is recommended, in which case the respective mapping targets are used instead, it is also possible to generate basic data definitions in case no data mappings are present. Annotations -
    +
    - + //data types Type SESSIONS (id1 of type Integer, id2 of type Integer); Type MSG (ses of type SESSIONS, content of type String); @@ -1652,11 +1658,11 @@ Annotations gate g of type gt; } -
    Figure 6.6.2-1: Test data example in TDL
    +
    Figure 47: Test data example in TDL
    -
    +
    //data types @@ -1685,22 +1691,22 @@ Annotations port gt g; } -
    Figure 6.6.2-2: Test data equivalents for Figure 6.6.2-1 in TTCN-3
    +
    Figure 48: Test data equivalents in TTCN-3 for preceding figure
    ### Configuration -6.6.3 With regard to test configurations, there are several concerns to address. TTCN-3 provides means for the dynamic instantiation and management of test configurations. The essential parts of a configuration include the main test component which plays a special role, zero or more parallel test components, as well as a unified system interface. There is a distinction between connecting and mapping ports and there are some restrictions with regard to these. In TDL the test configuration is defined -upfront and remains static. TDL also provides a holistic view where the SUT can be decomposed into multiple interconnected components. The example in Figure 6.6.3-1 -illustrates a minimal test configuration in TDL. The corresponding mapping in TTCN-3 is illustrated in Figure 6.6.3-2. A unified system interface needs to be inferred +upfront and remains static. TDL also provides a holistic view where the SUT can be decomposed into multiple interconnected components. +The example in Figure 49 illustrates a minimal test configuration in TDL. The corresponding mapping in TTCN-3 is +illustrated in Figure 50. A unified system interface needs to be inferred in case there are multiple SUT components. The steps for instantiating and mapping/connecting the components are encapsulated in a function. -
    +
    Gate Type defaultGT accepts @@ -1716,12 +1722,12 @@ in case there are multiple SUT components. The steps for instantiating and mappi connect UE.g to SS.g ; } -
    Figure 6.6.3-1: Test configuration example in TDL
    +
    Figure 49: Test configuration example in TDL
    -
    +
    type port defaultGT_to_map message { @@ -1751,24 +1757,28 @@ in case there are multiple SUT components. The steps for instantiating and mappi map (TESTER_SS:g_to_map,system:g_to_map); } -
    Figure 6.6.3-2: Test configuration related equivalents for Figure 6.6.3-1 in TTCN-3
    +
    Figure 50: Test configuration related equivalents in TTCN-3 for preceding figure
    ### Behaviour -6.6.4 In terms of behaviour, TTCN-3 and TDL also have different assumptions. In TTCN-3, the focus is on the test system view, where all components execute their behaviour concurrently and independently unless there is explicit synchronization among them. TDL aims to provide a global view with the possibility to specify both locally and totally ordered behaviour, with explicit or implicit synchronization respectively. For the standardized mapping to TTCN-3 only the local ordering is taken into consideration. -User-defined mappings may also tackle the totally ordered behaviour. In the example shown in Figure 6.6.4-1 a locally ordered 'TestDescription' is illustrated. The -corresponding mappings in TTTCN-3 are shown in Figures 6.6.4-2, 6.6.4-3, and 6.6.4-4. First, the default handling needs to be taken care of. This involves the definition -of altsteps to handle deviations from the specified behaviour as well as quiescence, which is illustrated in Figure 6.6.4-2. Then the actual test behaviour from the -test system's point of view is translated to a function as illustrated in Figure 6.6.4-3. Finally, in Figure 6.6.4-4 a test case is defined which takes care of activating +User-defined mappings may also tackle the totally ordered behaviour. In the example shown in Figure 51 +a locally ordered 'TestDescription' is illustrated. The +corresponding mappings in TTTCN-3 are shown in Figure 52, +Figure 53, and +Figure 54. First, the default handling needs to be taken care of. This involves the definition +of altsteps to handle deviations from the specified behaviour as well as quiescence, which is illustrated in Figure 52. +Then the actual test behaviour from the +test system's point of view is translated to a function as illustrated in Figure 53. +Finally, in Figure 54 a test case is defined which takes care of activating the default behaviour, instantiating the test configuration, as well as starting the actual test behaviour. -
    +
    Test Description Implementation TD_7_1_3_1 @@ -1795,11 +1805,11 @@ the default behaviour, instantiating the test configuration, as well as starting } } -
    Figure 6.6.4-1: Test behaviour example in TDL
    +
    Figure 51: Test behaviour example in TDL
    -
    +
    altstep to_handle_deviations_from_TDL_description_AS () { @@ -1827,11 +1837,11 @@ the default behaviour, instantiating the test configuration, as well as starting } } -
    Figure 6.6.4-2: Required altstep definitions in TTCN-3
    +
    Figure 52: Required altstep definitions in TTCN-3
    -
    +
    function behaviourOfTESTER_SS() runs on defaultCT { @@ -1857,11 +1867,11 @@ the default behaviour, instantiating the test configuration, as well as starting } } -
    Figure 6.6.4-3: Behaviour mapping for Figure 6.6.4-1 in TTCN-3
    +
    Figure 53: Behaviour mapping in TTCN-3 for preceding test behaviour example
    -
    +
    testcase TD_7_1_3_1() runs on MTC_CT @@ -1873,10 +1883,7 @@ the default behaviour, instantiating the test configuration, as well as starting all component.done; } -
    Figure 6.6.4-4: Test case integrating all steps for mapping Figure 6.6.4-1 to TTCN-3
    +
    Figure 54: Test case integrating all steps for mapping to TTCN-3 the preceding test behaviour example
    - - -
Table 2: ASN.1 Built-in Type Mapping
ASN.1 Type Type in TDL Constraints Patterns Examples UTCTime UTCTime ASN1DateTime YYMMDDhhmm[ss]Z "991231235959+0200"
GeneralizedTime GeneralizedTime ASN1DateTime YYYYMMDDHH[MM[SS[.fff]]]Z
(ISO 8601 [i.38])
"20200425175522.214+0200" GeneralizedTime GeneralizedTime ASN1DateTime YYYYMMDDHH[MM[SS[.fff]]]Z
(ISO 8601 Date and time format)
"20200425175522.214+0200"
DATE Date ASN1DateTime YYYY-MM-DD "1636-09-18"