From 30daf79bdde4304eb36d64543971d4c304a54a01 Mon Sep 17 00:00:00 2001 From: Philip Makedonski <makedonski@informatik.uni-goettingen.de> Date: Fri, 22 Dec 2023 14:10:39 +0100 Subject: [PATCH] + part 1 examples --- .../Example-1-3GPP-7.1.3.tdlan2.tdltx | 169 +++++ .../Example-2-IMS-4.5.1.tdlan2.tdltx | 154 +++++ .../Example-3-Data.tdlan2.tdltx | 134 ++++ part1-examples/Example-1-3GPP-7.1.3.tdlan2 | 72 +- ...xample-1-3GPP-7.1.3.tdlan2-generated.ttcn3 | 0 ...ample-1-3GPP-7.1.3.tdlan2-generated.ttcn3m | 615 ++++++++++++++++++ part1-examples/Example-2-IMS-4.5.1.tdlan2 | 18 +- part1-examples/Example-3-Data.tdlan2 | 4 +- part1-examples/Example-3-Data.tdlan2.tdl | 4 +- .../Example-1-3GPP-7.1.3.tdlan2.tdltx.tdltxi | 162 +++++ .../Example-2-IMS-4.5.1.tdlan2.tdltx.tdltxi | 142 ++++ .../Example-3-Data.tdlan2.tdltx.tdltxi | 125 ++++ 12 files changed, 1557 insertions(+), 42 deletions(-) create mode 100644 part1-examples/Brace-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx create mode 100644 part1-examples/Brace-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx create mode 100644 part1-examples/Brace-based-variant/Example-3-Data.tdlan2.tdltx create mode 100644 part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3 create mode 100644 part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3m create mode 100644 part1-examples/Indentation-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx.tdltxi create mode 100644 part1-examples/Indentation-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx.tdltxi create mode 100644 part1-examples/Indentation-based-variant/Example-3-Data.tdlan2.tdltx.tdltxi diff --git a/part1-examples/Brace-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx b/part1-examples/Brace-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx new file mode 100644 index 0000000..5455935 --- /dev/null +++ b/part1-examples/Brace-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx @@ -0,0 +1,169 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//Translated from [i.5], Section 7.1.3. + +Note : "Taken from 3GPP TS 36.523-1 V10.2.0 (2012-09)" +@TITLE : "Correct handling of DL assignment / Dynamic case" +Package Layer_2_DL_SCH_Data_Transfer { + //Procedures carried out by a component of a test configuration + //or an actor during test execution + Action preCondition : "Pre-test Conditions: + RRC Connection Reconfiguration" + Action preamble : "Preamble: + The generic procedure to get UE in test state Loopback + Activated (State 4) according to TS 36.508 clause 4.5 + is executed, with all the parameters as specified in the + procedure except that the RLC SDU size is set to return no + data in uplink. + (reference corresponding behavior once implemented)" + + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //User-defined annotation types + Annotation TITLE //Test description title + Annotation STEP //Step identifiers in source documents + Annotation PROCEDURE //Informal textual description of a test step + Annotation PRECONDITION //Identify pre-condition behaviour + Annotation PREAMBLE //Identify preamble behaviour. + + //Test objectives (copied verbatim from source document) + Objective TP1 { + Description: " + with { + UE in E-UTRA RRC_CONNECTED state + } + ensure that { + when { + UE receives downlink assignment on the PDCCH + for the UE's C-RNTI and receives data in the + associated subframe and UE performs HARQ + operation + } + then { + UE sends a HARQ feedback on the HARQ process + } + }" + References: "36523-1-a20_s07_01.doc::7.1.3.1.1 (1)" + } + Objective TP2 { + Description: " + with { + UE in E-UTRA RRC_CONNECTED state + } + ensure that { + when { + UE receives downlink assignment on the PDCCH + with a C-RNTI unknown by the UE and data is + available in the associated subframe + } + then { + UE does not send any HARQ feedback on the + HARQ process + } + }" + References: "36523-1-a20_s07_01.doc::7.1.3.1.1 (2)" + } + + //Relevant data definitions + Type PDU + PDU mac_pdu + Type ACK + ACK harq_ack + Type C_RNTI + C_RNTI ue + C_RNTI unknown + Structure PDCCH ( + optional C_RNTI c_rnti + ) + PDCCH pdcch ( ) + + //User-defined time units + Time sec + + //Gate type definitions + Message Gate defaultGT accepts ACK,PDU,PDCCH,C_RNTI + + //Component type definitions + Component defaultCT { + gate defaultGT g + } + + //Test configuration definition + Configuration defaultTC { + defaultCT SystemSimulator as Tester, + defaultCT UserEquipment as SUT, + connect UE=UserEquipment::g to SS=SystemSimulator::g + } + + //Test description definition + Test Description TD_7_1_3_1 uses defaultTC { + //Pre-conditions and preamble from the source document + @PRECONDITION + perform preCondition + @PREAMBLE + perform preamble + + //Test sequence + @STEP : "1" + @PROCEDURE : "SS transmits a downlink assignment + including the C-RNTI assigned to + the UE" + SS sends pdcch ( c_rnti = ue ) to UE + @STEP : "2" + @PROCEDURE : "SS transmits in the indicated + downlink assignment a RLC PDU in + a MAC PDU" + SS sends mac_pdu to UE + Objective: TP1 + @STEP : "3" + @PROCEDURE : "Check: Does the UE transmit an + HARQ ACK on PUCCH?" + UE sends harq_ack to SS + set verdict to PASS + @STEP : "4" + @PROCEDURE : "SS transmits a downlink assignment + to including a C-RNTI different from + the assigned to the UE" + SS sends pdcch ( c_rnti = unknown ) to UE + @STEP : "5" + @PROCEDURE : "SS transmits in the indicated + downlink assignment a RLC PDU in + a MAC PDU" + SS sends mac_pdu to UE + + //Interpolated original step 6 into an alternative behaviour, + //covering both the incorrect and the correct behaviours of the UE + @STEP : "6" + @PROCEDURE : "Check: Does the UE send any HARQ ACK + on PUCCH?" + alternatively { + UE sends harq_ack to SS + set verdict to FAIL + } or { + quiet for 5 {sec} on gate SS + set verdict to PASS + } with { + Objective: TP2 + } + } with { + Note : "Note 1: For TDD, the timing of ACK/NACK is not + constant as FDD, see Table 10.1-1 of TS 36.213." + } +} \ No newline at end of file diff --git a/part1-examples/Brace-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx b/part1-examples/Brace-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx new file mode 100644 index 0000000..4efdfbe --- /dev/null +++ b/part1-examples/Brace-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx @@ -0,0 +1,154 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//Translated from [i.6], Section 4.5.1. +Note : "Taken from ETSI TS 186 011-2 [i.3] V3.1.1 (2011-06)" +@TITLE : "SIP messages longer than 1 500 bytes" +Package IMS_NNI_General_Capabilities { + //Procedures carried out by a component of a test configuration + //or an actor during test execution + Action preConditions : "Pre-test conditions: + - HSS of IMS_A and of IMS B is configured according to table 1 + - UE_A and UE_B have IP bearers established to their respective + IMS networks as per clause 4.2.1 + - UE_A and IMS_A configured to use TCP for transport + - UE_A is registered in IMS_A using any user identity + - UE_B is registered user of IMS_B using any user identity + - MESSAGE request and response has to be supported at II-NNI + (ETSI TS 129 165 [16] + see tables 6.1 and 6.3)" + + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //User-defined annotation types + Annotation TITLE //Test description title + Annotation STEP //Step identifiers in source documents + Annotation PROCEDURE //Informal textual description of a test step + Annotation PRECONDITION //Identify pre-condition behaviour + Annotation PREAMBLE //Identify preamble behaviour. + Annotation SUMMARY //Informal textual description of test sequence + + //Test objectives (copied verbatim from source document) + Objective TP_IMS_4002_1 { + Description: "ensure that { + when { UE_A sends a MESSAGE to UE_B + containing a Message_Body greater than 1 300 + bytes } + then { IMS_B receives the MESSAGE containing the + Message_Body greater than 1 300 bytes } + }" + References: "ts_18601102v030101p.pdf::4.5.1.1 (CC 1)", + "ETSI TS 124 229 [1], clause 4.2A, paragraph 1" + } + Objective UC_05_I { + References: "ts_18601102v030101p.pdf::4.4.4.2" + } + + //Relevant data definitions + Structure MSG ( + optional CONTENT TCP + ) + MSG MESSAGE ( ) + MSG DING ( ) + MSG DELIVERY_REPORT ( ) + MSG M_200_OK ( ) + Type CONTENT + CONTENT tcp + Time SECONDS + SECONDS default_timeout + + //Gate type definitions. + Message Gate defaultGT accepts MSG,CONTENT + + //Component type definitions + //In this case they may also be reduced to a single component type + Component USER { + gate defaultGT g + } + Component UE { + gate defaultGT g + } + Component IMS { + gate defaultGT g + } + Component IBCF { + gate defaultGT g + } + + //Test configuration definition + Configuration CF_INT_CALL { + USER USER_A as Tester, + UE UE_A as Tester, + IMS IMS_A as Tester, + IBCF IBCF_A as Tester, + IBCF IBCF_B as Tester, + IMS IMS_B as SUT, + UE UE_B as Tester, + USER USER_B as Tester, + connect USER_A::g to UE_A::g, + connect UE_A::g to IMS_A::g, + connect IMS_A::g to IBCF_A::g, + connect IBCF_A::g to IBCF_B::g, + connect IBCF_B::g to IMS_B::g, + connect IMS_B::g to UE_B::g, + connect UE_B::g to USER_B::g + } + + //Test description definition + Test Description TD_IMS_MESS_0001 uses CF_INT_CALL + @SUMMARY : "IMS network shall support SIP messages greater than + 1 500 bytes" + { + //Pre-conditions from the source document + @PRECONDITION + perform preConditions + + //Test sequence + @STEP : "1" + USER_A::g sends MESSAGE to UE_A::g + @STEP : "2" + UE_A::g sends MESSAGE to IMS_A::g + @STEP : "3" + IMS_A::g sends MESSAGE to IBCF_A::g + @STEP : "4" + IBCF_A::g sends MESSAGE to IBCF_B::g + @STEP : "5" + IBCF_B::g sends MESSAGE ( TCP = tcp ) to IMS_B::g + @STEP : "6" + IMS_B::g sends MESSAGE to UE_B::g + @STEP : "7" + UE_B::g sends DING to USER_B::g + @STEP : "8" + UE_B::g sends M_200_OK to IMS_B::g + @STEP : "9" + IMS_B::g sends M_200_OK to IBCF_B::g + @STEP : "10" + IBCF_B::g sends M_200_OK to IBCF_A::g + @STEP : "11" + IBCF_A::g sends M_200_OK to IMS_A::g + @STEP : "12" + IMS_A::g sends M_200_OK to UE_A::g + alternatively { + @STEP : "13" + UE_A::g sends DELIVERY_REPORT to USER_A::g + } or { + quiet for default_timeout on gate USER_A::g + } + } +} \ No newline at end of file diff --git a/part1-examples/Brace-based-variant/Example-3-Data.tdlan2.tdltx b/part1-examples/Brace-based-variant/Example-3-Data.tdlan2.tdltx new file mode 100644 index 0000000..d86f537 --- /dev/null +++ b/part1-examples/Brace-based-variant/Example-3-Data.tdlan2.tdltx @@ -0,0 +1,134 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//A manually constructed example illustrating the data mapping concepts +Package DataExample { + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //Test objectives + Objective CHECK_SESSION_ID_IS_MAINTAINED { + Description: "Check whether the session id is maintained after the first response." + } + + //Data definitions + Type SESSION_ID + SESSION_ID SESSION_ID_1 + SESSION_ID SESSION_ID_2 + + Structure MSG ( + optional SESSION_ID session + ) + MSG REQUEST_SESSION_ID ( + session = omit + ) + MSG RESPONSE ( + session = ? + ) + MSG MESSAGE ( + session = ? + ) + + //Data mappings + //Load resource.ttcn3 + Use "resource.ttcn3" as TTCN_MAPPING + Map MSG to "record_message" in TTCN_MAPPING as MSG_mapping { + session -> "session_id" + } + Map REQUEST_SESSION_ID to "template_message_request" in TTCN_MAPPING as REQUEST_mapping + Map RESPONSE to "template_response" in TTCN_MAPPING as RESPONSE_mapping + Map MESSAGE to "template_message" in TTCN_MAPPING as MESSAGE_mapping + + //Map types and instances to TTCN-3 records and templates, respectively + //(located in the used TTCN-3 file) + Use "runtime://sessions/" as RUNTIME_MAPPING + //Map session ID data instances to locations within the runtime URI + Map SESSION_ID_1 to "id_1" in RUNTIME_MAPPING as SESSION_ID_1_mapping + Map SESSION_ID_2 to "id_2" in RUNTIME_MAPPING as SESSION_ID_2_mapping + + //Gate type definitions + Message Gate defaultGT accepts MSG + + //Component type definitions + Component defaultCT { + gate defaultGT g + } + + //Test configuration definition + Configuration defaultTC { + defaultCT UE as SUT, + defaultCT SS as Tester, + connect SS::g to UE::g + } + + //Test description definition + Test Description exampleTD uses defaultTC { + Note: "Tester requests a session id" + SS::g sends REQUEST_SESSION_ID to UE::g + Note: "SUT responds with a session id that is assigned to the URI + provided by the execution environment" + UE::g sends RESPONSE ( session = SESSION_ID_1 ) to SS::g + Note: "Tester sends a message with the session id from the runtime URI" + SS::g sends MESSAGE ( session = SESSION_ID_1 ) to UE::g + alternatively { + Note: "SUT responds with the same session id" + UE::g sends RESPONSE ( session = SESSION_ID_1 ) to SS::g + set verdict to PASS + } or { + Note: "SUT responds with a new session id" + UE::g sends RESPONSE ( session = SESSION_ID_2 ) to SS::g + set verdict to FAIL + } with { + Objective: CHECK_SESSION_ID_IS_MAINTAINED + } + } + + //Alternative approach with variables + + //Component type definitions + Component defaultCTwithVariable { + variable MSG v + gate defaultGT g } + + //Test configuration definition + Configuration defaultTCwithVariables { + defaultCT UE as SUT, + defaultCTwithVariable SS as Tester, + connect SS::g to UE::g + } + Test Description exampleTD uses defaultTCwithVariables { + Note: "Tester requests a session id" + SS::g sends REQUEST_SESSION_ID to UE::g + Note: "SUT responds with a session id that is assigned to the URI + provided by the execution environment" + UE::g sends RESPONSE to SS::g where it is assigned to v + Note: "Tester sends a message with the session id from the runtime URI" + SS::g sends MESSAGE ( session = SS::v.session ) to UE::g + alternatively { + Note: "SUT responds with the same session id" + UE::g sends RESPONSE ( session = SS::v.session ) to SS::g + set verdict to PASS + } or { + Note: "SUT responds with a new session id" + UE::g sends RESPONSE to SS::g + set verdict to FAIL + } with { + Objective: CHECK_SESSION_ID_IS_MAINTAINED + } + } +} \ No newline at end of file diff --git a/part1-examples/Example-1-3GPP-7.1.3.tdlan2 b/part1-examples/Example-1-3GPP-7.1.3.tdlan2 index 442f6c8..a6c0c17 100644 --- a/part1-examples/Example-1-3GPP-7.1.3.tdlan2 +++ b/part1-examples/Example-1-3GPP-7.1.3.tdlan2 @@ -1,5 +1,5 @@ /* -Copyright (c) ETSI 2020. +Copyright (c) ETSI 2022. This software is subject to copyrights owned by ETSI. Non-exclusive permission is hereby granted, free of charge, to copy, reproduce and amend this file @@ -18,7 +18,7 @@ Package Layer_2_DL_SCH_Data_Transfer { //Procedures carried out by a component of a test configuration //or an actor during test execution Action preCondition : "Pre-test Conditions: - RRC Connection Reconfiguration" ; + RRC Connection Reconfiguration" ; Action preamble : "Preamble: The generic procedure to get UE in test state Loopback Activated (State 4) according to TS 36.508 clause 4.5 @@ -43,25 +43,38 @@ Package Layer_2_DL_SCH_Data_Transfer { //Test objectives (copied verbatim from source document) Test Objective TP1 { from : "36523-1-a20_s07_01.doc::7.1.3.1.1 (1)" ; - description : "with { UE in E-UTRA RRC_CONNECTED state } + description : " + with { + UE in E-UTRA RRC_CONNECTED state + } ensure that { - when { UE receives downlink assignment on the PDCCH + when { + UE receives downlink assignment on the PDCCH for the UE's C-RNTI and receives data in the - associated subframe and UE performs HARQ - operation } - then { UE sends a HARQ feedback on the HARQ - process } - }" ; + associated subframe and UE performs HARQ + operation + } + then { + UE sends a HARQ feedback on the HARQ process + } + }" ; } Test Objective TP2 { from : "36523-1-a20_s07_01.doc::7.1.3.1.1 (2)" ; - description : "with { UE in E-UTRA RRC_CONNECTED state } + description : " + with { + UE in E-UTRA RRC_CONNECTED state + } ensure that { - when { UE receives downlink assignment on the PDCCH + when { + UE receives downlink assignment on the PDCCH with a C-RNTI unknown by the UE and data is - available in the associated subframe } - then { UE does not send any HARQ feedback on the - HARQ process } + available in the associated subframe + } + then { + UE does not send any HARQ feedback on the + HARQ process + } }" ; } @@ -79,15 +92,12 @@ Package Layer_2_DL_SCH_Data_Transfer { Type PDCCH (optional c_rnti of type C_RNTI); PDCCH pdcch(); - Type CONFIGURATION; - CONFIGURATION RRCConnectionReconfiguration ; - //User-defined time units Time Second; Second five; //Gate type definitions - Gate Type defaultGT accepts ACK, PDU, PDCCH, C_RNTI, CONFIGURATION ; + Gate Type defaultGT accepts ACK, PDU, PDCCH, C_RNTI ; //Component type definitions Component Type defaultCT having { @@ -111,19 +121,19 @@ Package Layer_2_DL_SCH_Data_Transfer { SS.g sends pdcch (c_rnti=ue) to UE.g with { STEP : "1" ; PROCEDURE : "SS transmits a downlink assignment - including the C-RNTI assigned to - the UE" ; + including the C-RNTI assigned to + the UE" ; } ; SS.g sends mac_pdu to UE.g with { STEP : "2" ; PROCEDURE : "SS transmits in the indicated - downlink assignment a RLC PDU in - a MAC PDU" ; + downlink assignment a RLC PDU in + a MAC PDU" ; } ; UE.g sends harq_ack to SS.g with { STEP : "3" ; PROCEDURE : "Check: Does the UE transmit an - HARQ ACK on PUCCH?" ; + HARQ ACK on PUCCH?" ; test objectives : TP1 ; } ; set verdict to PASS ; @@ -131,13 +141,13 @@ Package Layer_2_DL_SCH_Data_Transfer { STEP : "4" ; PROCEDURE : "SS transmits a downlink assignment to including a C-RNTI different from - the assigned to the UE" ; + the assigned to the UE" ; } ; SS.g sends mac_pdu to UE.g with { STEP : "5" ; PROCEDURE : "SS transmits in the indicated - downlink assignment a RLC PDU in - a MAC PDU" ; + downlink assignment a RLC PDU in + a MAC PDU" ; } ; //Interpolated original step 6 into an alternative behaviour, @@ -149,14 +159,14 @@ Package Layer_2_DL_SCH_Data_Transfer { gate SS.g is quiet for five ; set verdict to PASS ; } with { - STEP : "6" ; - PROCEDURE : "Check: Does the UE send any HARQ ACK - on PUCCH?" ; - test objectives : TP2 ; + STEP : "6" ; + PROCEDURE : "Check: Does the UE send any HARQ ACK + on PUCCH?" ; + test objectives : TP2 ; } } with { Note : "Note 1: For TDD, the timing of ACK/NACK is not - constant as FDD, see Table 10.1-1 of TS 36.213." ; + constant as FDD, see Table 10.1-1 of TS 36.213." ; } } with { Note : "Taken from 3GPP TS 36.523-1 V10.2.0 (2012-09)" ; diff --git a/part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3 b/part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3 new file mode 100644 index 0000000..e69de29 diff --git a/part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3m b/part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3m new file mode 100644 index 0000000..c501f34 --- /dev/null +++ b/part1-examples/Example-1-3GPP-7.1.3.tdlan2-generated.ttcn3m @@ -0,0 +1,615 @@ +<?xml version="1.0" encoding="ASCII"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tTCN3="http://www.ugoe.de/cs/swe/TTCN3"> + <tTCN3:TTCN3File> + <modules name="Layer_2_DL_SCH_Data_Transfer"> + <defs> + <definitions> + <def xsi:type="tTCN3:ModuleParDef"> + <param> + <type pre="float"/> + <list> + <params name="mp_componentElapsedTimerMaxDuration"/> + </list> + </param> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <sub xsi:type="tTCN3:SubTypeDefNamed" name="Layer_2_DL_SCH_Data_Transfer_SimpleDataType"> + <type pre="charstring"/> + </sub> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <sub xsi:type="tTCN3:SubTypeDefNamed" name="PDU"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.1/@def/@body/@sub"/> + </type> + </sub> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <sub xsi:type="tTCN3:SubTypeDefNamed" name="ACK"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.1/@def/@body/@sub"/> + </type> + </sub> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <sub xsi:type="tTCN3:SubTypeDefNamed" name="C_RNTI"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.1/@def/@body/@sub"/> + </type> + </sub> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <sub xsi:type="tTCN3:SubTypeDefNamed" name="CONFIGURATION"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.1/@def/@body/@sub"/> + </type> + </sub> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <structured> + <record xsi:type="tTCN3:RecordDefNamed" name="PDCCH"> + <body> + <defs name="c_rnti" optional="optional"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.4/@def/@body/@sub"/> + </type> + </defs> + </body> + </record> + </structured> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:FunctionDef" name="preCondition"> + <statement/> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:FunctionDef" name="preamble"> + <statement/> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:FunctionDef" name="setupTestConfiguration_defaultTC"> + <runsOn component="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component"/> + <statement> + <stat> + <statements> + <basic> + <assign> + <ref> + <ref> + <head target="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component/@defs.0/@element/@variable/@list/@variables.0"/> + </ref> + </ref> + <expression xsi:type="tTCN3:OpCall"> + <configuration> + <create type="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component"/> + </configuration> + </expression> + </assign> + </basic> + </statements> + <statements> + <configuration> + <map> + <spec> + <port1 port="/0/@modules.0/@defs/@definitions.11/@def/@body/@structured/@component/@defs.0/@element/@port/@instances.0"> + <component system="system"/> + </port1> + <port2 port="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"> + <component> + <ref> + <variable> + <ref> + <head target="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component/@defs.0/@element/@variable/@list/@variables.0"/> + </ref> + </variable> + </ref> + </component> + </port2> + </spec> + </map> + </configuration> + </statements> + <sc>;</sc> + <sc>;</sc> + </stat> + </statement> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <structured> + <component name="MTC_defaultTC"> + <defs sc=";"> + <element> + <variable> + <listType> + <ref head="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component"/> + </listType> + <list> + <variables name="SS"/> + </list> + </variable> + </element> + </defs> + </component> + </structured> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <structured> + <component name="SYSTEM_defaultTC"> + <defs sc=";"> + <element> + <port ref="/0/@modules.0/@defs/@definitions.13/@def/@body/@structured/@port"> + <instances name="UE_g"/> + </port> + </element> + </defs> + </component> + </structured> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <structured> + <component name="defaultCT"> + <defs sc=";"> + <element> + <timer> + <list> + <variables name="T_elapsedTimeOfComponent" ac=":="> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.0/@def/@param/@list/@params.0"/> + </ref> + </expr> + </variables> + </list> + </timer> + </element> + </defs> + <defs sc=";"> + <element> + <port ref="/0/@modules.0/@defs/@definitions.13/@def/@body/@structured/@port"> + <instances name="g"/> + </port> + </element> + </defs> + <defs sc=";"> + <element> + <port ref="/0/@modules.0/@defs/@definitions.13/@def/@body/@structured/@port"> + <instances name="g_to_UE_g"/> + </port> + </element> + </defs> + </component> + </structured> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TypeDef"> + <body> + <structured> + <port name="defaultGT"> + <body> + <attribs> + <message> + <messages direction="inout"> + <allOrTypeList> + <typeList> + <types> + <ref head="/0/@modules.0/@defs/@definitions.3/@def/@body/@sub"/> + </types> + <types> + <ref head="/0/@modules.0/@defs/@definitions.2/@def/@body/@sub"/> + </types> + <types> + <ref head="/0/@modules.0/@defs/@definitions.6/@def/@body/@structured/@record"/> + </types> + <types> + <ref head="/0/@modules.0/@defs/@definitions.4/@def/@body/@sub"/> + </types> + <types> + <ref head="/0/@modules.0/@defs/@definitions.5/@def/@body/@sub"/> + </types> + </typeList> + </allOrTypeList> + </messages> + </message> + </attribs> + </body> + </port> + </structured> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:FunctionDef" name="TD_7_1_3_1"> + <runsOn component="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component"/> + <statement> + <stat> + <statements> + <configuration> + <startTc> + <ref> + <variable> + <ref> + <head target="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component/@defs.0/@element/@variable/@list/@variables.0"/> + </ref> + </variable> + </ref> + <function ref="/0/@modules.0/@defs/@definitions.15/@def"/> + </startTc> + </configuration> + </statements> + <sc>;</sc> + </stat> + </statement> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:FunctionDef" name="TD_7_1_3_1_SS_main"> + <runsOn component="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component"/> + <statement> + <stat> + <statements> + <communication> + <send port="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"> + <send> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.16/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </send> + </send> + </communication> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <communication> + <send port="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"> + <send> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.17/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </send> + </send> + </communication> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <communication> + <receive> + <any ref="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"/> + <receive> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.18/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </receive> + </receive> + </communication> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <verdict> + <expression xsi:type="tTCN3:Value"> + <predef/> + </expression> + </verdict> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <communication> + <send port="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"> + <send> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.16/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </send> + </send> + </communication> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <communication> + <send port="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"> + <send> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.17/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </send> + </send> + </communication> + </statements> + <sc>;</sc> + </stat> + <stat> + <statements> + <behavior> + <alt> + <agList> + <guardList> + <guard/> + <block> + <stat> + <statements> + <verdict> + <expression xsi:type="tTCN3:Value"> + <predef/> + </expression> + </verdict> + </statements> + <sc>;</sc> + </stat> + </block> + <op> + <receive> + <any ref="/0/@modules.0/@defs/@definitions.12/@def/@body/@structured/@component/@defs.2/@element/@port/@instances.0"/> + <receive> + <template> + <template> + <simple> + <expr xsi:type="tTCN3:Value"> + <ref> + <head target="/0/@modules.0/@defs/@definitions.18/@def/@base"/> + </ref> + </expr> + </simple> + </template> + </template> + </receive> + </receive> + </op> + </guardList> + <guardList> + <guard/> + <block/> + </guardList> + </agList> + </alt> + </behavior> + </statements> + </stat> + </statement> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="pdcch"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.6/@def/@body/@structured/@record"/> + </type> + </base> + <body> + <field> + <spec ref="/0/@modules.0/@defs/@definitions.6/@def/@body/@structured/@record/@body/@defs.0"> + <body> + <simple> + <spec> + <expr> + <symbol/> + </expr> + </spec> + </simple> + </body> + </spec> + </field> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="mac_pdu"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.2/@def/@body/@sub"/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""mac_pdu""/> + </expr> + </simple> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="harq_ack"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.3/@def/@body/@sub"/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""harq_ack""/> + </expr> + </simple> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TestcaseDef" name="tc_TD_7_1_3_1"> + <spec> + <runsOn component="/0/@modules.0/@defs/@definitions.10/@def/@body/@structured/@component"/> + <systemSpec component="/0/@modules.0/@defs/@definitions.11/@def/@body/@structured/@component"/> + </spec> + <statement> + <stat> + <statements> + <behavior> + <function ref="/0/@modules.0/@defs/@definitions.9/@def"/> + </behavior> + </statements> + <statements> + <behavior> + <function ref="/0/@modules.0/@defs/@definitions.14/@def"/> + </behavior> + </statements> + <statements> + <configuration> + <done> + <component all="all"/> + </done> + </configuration> + </statements> + <sc>;</sc> + <sc>;</sc> + <sc>;</sc> + </stat> + </statement> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="ue"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.4/@def/@body/@sub"/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""ue""/> + </expr> + </simple> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="unknown"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.4/@def/@body/@sub"/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""unknown""/> + </expr> + </simple> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="RRCConnectionReconfiguration"> + <type> + <ref head="/0/@modules.0/@defs/@definitions.5/@def/@body/@sub"/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""RRCConnectionReconfiguration""/> + </expr> + </simple> + </body> + </def> + </definitions> + <definitions> + <def xsi:type="tTCN3:TemplateDef"> + <base name="five"> + <type> + <ref/> + </type> + </base> + <body> + <simple> + <expr xsi:type="tTCN3:Value"> + <predef charString=""five""/> + </expr> + </simple> + </body> + </def> + </definitions> + </defs> + </modules> + </tTCN3:TTCN3File> + <tTCN3:TemplateBody/> +</xmi:XMI> diff --git a/part1-examples/Example-2-IMS-4.5.1.tdlan2 b/part1-examples/Example-2-IMS-4.5.1.tdlan2 index c123c31..119501e 100644 --- a/part1-examples/Example-2-IMS-4.5.1.tdlan2 +++ b/part1-examples/Example-2-IMS-4.5.1.tdlan2 @@ -1,5 +1,5 @@ /* -Copyright (c) ETSI 2020. +Copyright (c) ETSI 2022. This software is subject to copyrights owned by ETSI. Non-exclusive permission is hereby granted, free of charge, to copy, reproduce and amend this file @@ -49,12 +49,16 @@ Package IMS_NNI_General_Capabilities { //Further reference to another document from : "ETSI TS 124 229 [1], clause 4.2A, paragraph 1" ; description : "ensure that { - when { UE_A sends a MESSAGE to UE_B + when { + UE_A sends a MESSAGE to UE_B containing a Message_Body greater than 1 300 - bytes } - then { IMS_B receives the MESSAGE containing the - Message_Body greater than 1 300 bytes } - }" ; + bytes + } + then { + IMS_B receives the MESSAGE containing the + Message_Body greater than 1 300 bytes + } + }" ; } Test Objective UC_05_I { //Only a reference to corresponding section in the source document @@ -136,7 +140,7 @@ Package IMS_NNI_General_Capabilities { } } with { SUMMARY : "IMS network shall support SIP messages greater than - 1 500 bytes" ; + 1 500 bytes" ; } } with { Note : "Taken from ETSI TS 186 011-2 [i.3] V3.1.1 (2011-06)" ; diff --git a/part1-examples/Example-3-Data.tdlan2 b/part1-examples/Example-3-Data.tdlan2 index 0092c55..6df8db1 100644 --- a/part1-examples/Example-3-Data.tdlan2 +++ b/part1-examples/Example-3-Data.tdlan2 @@ -1,5 +1,5 @@ /* -Copyright (c) ETSI 2020. +Copyright (c) ETSI 2022. This software is subject to copyrights owned by ETSI. Non-exclusive permission is hereby granted, free of charge, to copy, reproduce and amend this file @@ -60,7 +60,7 @@ Package DataExample { Map SESSION_ID_2 to "id_2" in RUNTIME_MAPPING as SESSION_ID_2_mapping ; //Gate type definitions - Gate Type defaultGT accepts MSG , SESSION_ID; + Gate Type defaultGT accepts MSG; //Component type definitions Component Type defaultCT having { diff --git a/part1-examples/Example-3-Data.tdlan2.tdl b/part1-examples/Example-3-Data.tdlan2.tdl index 4668006..60d3607 100644 --- a/part1-examples/Example-3-Data.tdlan2.tdl +++ b/part1-examples/Example-3-Data.tdlan2.tdl @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="ASCII"?> <tdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdl="http://www.etsi.org/spec/TDL/1.4.1" name="DataExample"> <packagedElement xsi:type="tdl:SimpleDataType" name="Verdict"/> <packagedElement xsi:type="tdl:SimpleDataInstance" name="PASS" dataType="//@packagedElement.0"/> @@ -12,7 +12,7 @@ </packagedElement> <packagedElement xsi:type="tdl:StructuredDataInstance" name="REQUEST_SESSION_ID" dataType="//@packagedElement.7"> <memberAssignment member="//@packagedElement.7/@member.0"> - <memberSpec xsi:type="tdl:OmitValue"/> + <memberSpec xsi:type="tdl:OmitValue" name="omit"/> </memberAssignment> </packagedElement> <packagedElement xsi:type="tdl:StructuredDataInstance" name="RESPONSE" dataType="//@packagedElement.7"> diff --git a/part1-examples/Indentation-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx.tdltxi b/part1-examples/Indentation-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx.tdltxi new file mode 100644 index 0000000..e657c4b --- /dev/null +++ b/part1-examples/Indentation-based-variant/Example-1-3GPP-7.1.3.tdlan2.tdltx.tdltxi @@ -0,0 +1,162 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//Translated from [i.5], Section 7.1.3. + +Note : "Taken from 3GPP TS 36.523-1 V10.2.0 (2012-09)" +@TITLE : "Correct handling of DL assignment / Dynamic case" +Package Layer_2_DL_SCH_Data_Transfer + //Procedures carried out by a component of a test configuration + //or an actor during test execution + Action preCondition : "Pre-test Conditions: + RRC Connection Reconfiguration" + Action preamble : "Preamble: + The generic procedure to get UE in test state Loopback + Activated (State 4) according to TS 36.508 clause 4.5 + is executed, with all the parameters as specified in the + procedure except that the RLC SDU size is set to return no + data in uplink. + (reference corresponding behavior once implemented)" + + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //User-defined annotation types + Annotation TITLE //Test description title + Annotation STEP //Step identifiers in source documents + Annotation PROCEDURE //Informal textual description of a test step + Annotation PRECONDITION //Identify pre-condition behaviour + Annotation PREAMBLE //Identify preamble behaviour. + + //Test objectives (copied verbatim from source document) + Objective TP1 + Description: " + with { + UE in E-UTRA RRC_CONNECTED state + } + ensure that { + when { + UE receives downlink assignment on the PDCCH + for the UE\'s C-RNTI and receives data in the + associated subframe and UE performs HARQ + operation + } + then { + UE sends a HARQ feedback on the HARQ process + } + }" + References: "36523-1-a20_s07_01.doc::7.1.3.1.1 (1)" + Objective TP2 + Description: " + with { + UE in E-UTRA RRC_CONNECTED state + } + ensure that { + when { + UE receives downlink assignment on the PDCCH + with a C-RNTI unknown by the UE and data is + available in the associated subframe + } + then { + UE does not send any HARQ feedback on the + HARQ process + } + }" + References: "36523-1-a20_s07_01.doc::7.1.3.1.1 (2)" + + //Relevant data definitions + Type PDU + PDU mac_pdu + Type ACK + ACK harq_ack + Type C_RNTI + C_RNTI ue + C_RNTI unknown + Structure PDCCH ( + optional C_RNTI c_rnti + ) + PDCCH pdcch ( ) + + //User-defined time units + Time sec + + //Gate type definitions + Message Gate defaultGT accepts ACK,PDU,PDCCH,C_RNTI + + //Component type definitions + Component defaultCT + gate defaultGT g + + //Test configuration definition + Configuration defaultTC + defaultCT SystemSimulator as Tester, + defaultCT UserEquipment as SUT, + connect UE = UserEquipment::g to SS = SystemSimulator::g + + //Test description definition + Test Description TD_7_1_3_1 uses defaultTC + //Pre-conditions and preamble from the source document + @PRECONDITION + perform preCondition + @PREAMBLE + perform preamble + + //Test sequence + @STEP : "1" + @PROCEDURE : "SS transmits a downlink assignment + including the C-RNTI assigned to + the UE" + SS sends pdcch ( c_rnti = ue ) to UE + @STEP : "2" + @PROCEDURE : "SS transmits in the indicated + downlink assignment a RLC PDU in + a MAC PDU" + SS sends mac_pdu to UE + Objective: TP1 + @STEP : "3" + @PROCEDURE : "Check: Does the UE transmit an + HARQ ACK on PUCCH?" + UE sends harq_ack to SS + set verdict to PASS + @STEP : "4" + @PROCEDURE : "SS transmits a downlink assignment + to including a C-RNTI different from + the assigned to the UE" + SS sends pdcch ( c_rnti = unknown ) to UE + @STEP : "5" + @PROCEDURE : "SS transmits in the indicated + downlink assignment a RLC PDU in + a MAC PDU" + SS sends mac_pdu to UE + + //Interpolated original step 6 into an alternative behaviour, + //covering both the incorrect and the correct behaviours of the UE + @STEP : "6" + @PROCEDURE : "Check: Does the UE send any HARQ ACK + on PUCCH?" + alternatively + UE sends harq_ack to SS + set verdict to FAIL + or + quiet for 5 { sec } on gate SS + set verdict to PASS + with + Objective: TP2 + with + Note : "Note 1: For TDD, the timing of ACK/NACK is not + constant as FDD, see Table 10.1-1 of TS 36.213." diff --git a/part1-examples/Indentation-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx.tdltxi b/part1-examples/Indentation-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx.tdltxi new file mode 100644 index 0000000..55cb834 --- /dev/null +++ b/part1-examples/Indentation-based-variant/Example-2-IMS-4.5.1.tdlan2.tdltx.tdltxi @@ -0,0 +1,142 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//Translated from [i.6], Section 4.5.1. +Note : "Taken from ETSI TS 186 011-2 [i.3] V3.1.1 (2011-06)" +@TITLE : "SIP messages longer than 1 500 bytes" +Package IMS_NNI_General_Capabilities + //Procedures carried out by a component of a test configuration + //or an actor during test execution + Action preConditions : "Pre-test conditions: + - HSS of IMS_A and of IMS B is configured according to table 1 + - UE_A and UE_B have IP bearers established to their respective + IMS networks as per clause 4.2.1 + - UE_A and IMS_A configured to use TCP for transport + - UE_A is registered in IMS_A using any user identity + - UE_B is registered user of IMS_B using any user identity + - MESSAGE request and response has to be supported at II-NNI + (ETSI TS 129 165 [16] + see tables 6.1 and 6.3)" + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //User-defined annotation types + Annotation TITLE //Test description title + Annotation STEP //Step identifiers in source documents + Annotation PROCEDURE //Informal textual description of a test step + Annotation PRECONDITION //Identify pre-condition behaviour + Annotation PREAMBLE //Identify preamble behaviour. + Annotation SUMMARY //Informal textual description of test sequence + + //Test objectives (copied verbatim from source document) + Objective TP_IMS_4002_1 + Description: "ensure that { + when { UE_A sends a MESSAGE to UE_B + containing a Message_Body greater than 1 300 + bytes } + then { IMS_B receives the MESSAGE containing the + Message_Body greater than 1 300 bytes } + }" + References: "ts_18601102v030101p.pdf::4.5.1.1 (CC 1)" + ,"ETSI TS 124 229 [1], clause 4.2A, paragraph 1" + Objective UC_05_I + References: "ts_18601102v030101p.pdf::4.4.4.2" + + //Relevant data definitions + Structure MSG ( + optional CONTENT TCP + ) + MSG MESSAGE ( ) + MSG DING ( ) + MSG DELIVERY_REPORT ( ) + MSG M_200_OK ( ) + Type CONTENT + CONTENT tcp + Time SECONDS + SECONDS default_timeout + + //Gate type definitions. + Message Gate defaultGT accepts MSG,CONTENT + + //Component type definitions + //In this case they may also be reduced to a single component type + Component USER + gate defaultGT g + Component UE + gate defaultGT g + Component IMS + gate defaultGT g + Component IBCF + gate defaultGT g + + //Test configuration definition + Configuration CF_INT_CALL + USER USER_A as Tester, + UE UE_A as Tester, + IMS IMS_A as Tester, + IBCF IBCF_A as Tester, + IBCF IBCF_B as Tester, + IMS IMS_B as SUT, + UE UE_B as Tester, + USER USER_B as Tester, + connect USER_A::g to UE_A::g, + connect UE_A::g to IMS_A::g, + connect IMS_A::g to IBCF_A::g, + connect IBCF_A::g to IBCF_B::g, + connect IBCF_B::g to IMS_B::g, + connect IMS_B::g to UE_B::g, + connect UE_B::g to USER_B::g + + //Test description definition + Test Description TD_IMS_MESS_0001 uses CF_INT_CALL + @SUMMARY : "IMS network shall support SIP messages greater than + 1 500 bytes" + //Pre-conditions from the source document + @PRECONDITION + perform preConditions + + //Test sequence + @STEP : "1" + USER_A::g sends MESSAGE to UE_A::g + @STEP : "2" + UE_A::g sends MESSAGE to IMS_A::g + @STEP : "3" + IMS_A::g sends MESSAGE to IBCF_A::g + @STEP : "4" + IBCF_A::g sends MESSAGE to IBCF_B::g + @STEP : "5" + IBCF_B::g sends MESSAGE ( TCP = tcp ) to IMS_B::g + @STEP : "6" + IMS_B::g sends MESSAGE to UE_B::g + @STEP : "7" + UE_B::g sends DING to USER_B::g + @STEP : "8" + UE_B::g sends M_200_OK to IMS_B::g + @STEP : "9" + IMS_B::g sends M_200_OK to IBCF_B::g + @STEP : "10" + IBCF_B::g sends M_200_OK to IBCF_A::g + @STEP : "11" + IBCF_A::g sends M_200_OK to IMS_A::g + @STEP : "12" + IMS_A::g sends M_200_OK to UE_A::g + alternatively + @STEP : "13" + UE_A::g sends DELIVERY_REPORT to USER_A::g + or + quiet for default_timeout on gate USER_A::g diff --git a/part1-examples/Indentation-based-variant/Example-3-Data.tdlan2.tdltx.tdltxi b/part1-examples/Indentation-based-variant/Example-3-Data.tdlan2.tdltx.tdltxi new file mode 100644 index 0000000..0304058 --- /dev/null +++ b/part1-examples/Indentation-based-variant/Example-3-Data.tdlan2.tdltx.tdltxi @@ -0,0 +1,125 @@ +/* +Copyright (c) ETSI 2022. + +This software is subject to copyrights owned by ETSI. Non-exclusive permission +is hereby granted, free of charge, to copy, reproduce and amend this file +under the following conditions: It is provided "as is", without warranty of any +kind, expressed or implied. + +ETSI shall never be liable for any claim, damages, or other liability arising +from its use or inability of use.This permission does not apply to any documentation +associated with this file for which ETSI keeps all rights reserved. The present +copyright notice shall be included in all copies of whole or part of this +file and shall not imply any sub-license right. +*/ + +//A manually constructed example illustrating the data mapping concepts +Package DataExample + //User-defined verdicts + //Alternatively the predefined verdicts may be used as well + Type Verdict + Verdict PASS + Verdict FAIL + + //Test objectives + Objective CHECK_SESSION_ID_IS_MAINTAINED + Description: "Check whether the session id is maintained after the first response." + + //Data definitions + Type SESSION_ID + SESSION_ID SESSION_ID_1 + SESSION_ID SESSION_ID_2 + + Structure MSG ( + optional SESSION_ID session + ) + MSG REQUEST_SESSION_ID ( + session = omit + ) + MSG RESPONSE ( + session = ? + ) + MSG MESSAGE ( + session = ? + ) + + //Data mappings + //Load resource.ttcn3 + Use "resource.ttcn3" as TTCN_MAPPING + Map MSG to "record_message" in TTCN_MAPPING as MSG_mapping + session -> "session_id" + Map REQUEST_SESSION_ID to "template_message_request" in TTCN_MAPPING as REQUEST_mapping + Map RESPONSE to "template_response" in TTCN_MAPPING as RESPONSE_mapping + Map MESSAGE to "template_message" in TTCN_MAPPING as MESSAGE_mapping + + //Map types and instances to TTCN-3 records and templates, respectively + //(located in the used TTCN-3 file) + Use "runtime://sessions/" as RUNTIME_MAPPING + //Map session ID data instances to locations within the runtime URI + Map SESSION_ID_1 to "id_1" in RUNTIME_MAPPING as SESSION_ID_1_mapping + Map SESSION_ID_2 to "id_2" in RUNTIME_MAPPING as SESSION_ID_2_mapping + + //Gate type definitions + Message Gate defaultGT accepts MSG + + //Component type definitions + Component defaultCT + gate defaultGT g + + //Test configuration definition + Configuration defaultTC + defaultCT UE as SUT, + defaultCT SS as Tester, + connect SS::g to UE::g + + //Test description definition + Test Description exampleTD uses defaultTC + Note : "Tester requests a session id" + SS::g sends REQUEST_SESSION_ID to UE::g + Note : "SUT responds with a session id that is assigned to the URI + provided by the execution environment" + UE::g sends RESPONSE ( session = SESSION_ID_1 ) to SS::g + Note : "Tester sends a message with the session id from the runtime URI" + SS::g sends MESSAGE ( session = SESSION_ID_1 ) to UE::g + alternatively + Note : "SUT responds with the same session id" + UE::g sends RESPONSE ( session = SESSION_ID_1 ) to SS::g + set verdict to PASS + or + Note : "SUT responds with a new session id" + UE::g sends RESPONSE ( session = SESSION_ID_2 ) to SS::g + set verdict to FAIL + with + Objective: CHECK_SESSION_ID_IS_MAINTAINED + + //Alternative approach with variables + + //Component type definitions + Component defaultCTwithVariable + variable MSG v + gate defaultGT g + + //Test configuration definition + Configuration defaultTCwithVariables + defaultCT UE as SUT, + defaultCTwithVariable SS as Tester, + connect SS::g to UE::g + + Test Description exampleTD uses defaultTCwithVariables + Note : "Tester requests a session id" + SS::g sends REQUEST_SESSION_ID to UE::g + Note : "SUT responds with a session id that is assigned to the URI + provided by the execution environment" + UE::g sends RESPONSE to SS::g where it is assigned to v + Note : "Tester sends a message with the session id from the runtime URI" + SS::g sends MESSAGE ( session = SS::v.session ) to UE::g + alternatively + Note : "SUT responds with the same session id" + UE::g sends RESPONSE ( session = SS::v.session ) to SS::g + set verdict to PASS + or + Note : "SUT responds with a new session id" + UE::g sends RESPONSE to SS::g + set verdict to FAIL + with + Objective: CHECK_SESSION_ID_IS_MAINTAINED -- GitLab