Commit 30daf79b authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ part 1 examples

parent aaa4cbfc
Loading
Loading
Loading
Loading
+169 −0
Original line number Original line Diff line number Diff line
/*
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
+154 −0
Original line number Original line Diff line number Diff line
/*
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
+134 −0
Original line number Original line Diff line number Diff line
/*
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
+41 −31
Original line number Original line Diff line number Diff line
/*
/*
Copyright (c) ETSI 2020.
Copyright (c) ETSI 2022.


This software is subject to copyrights owned by ETSI. Non-exclusive permission
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
is hereby granted, free of charge, to copy, reproduce and amend this file
@@ -43,25 +43,38 @@ Package Layer_2_DL_SCH_Data_Transfer {
  //Test objectives (copied verbatim from source document)
  //Test objectives (copied verbatim from source document)
  Test Objective TP1 {
  Test Objective TP1 {
    from : "36523-1-a20_s07_01.doc::7.1.3.1.1 (1)" ;
    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 {
             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 
                      for the UE's C-RNTI and receives data in the 
                      associated subframe and UE performs HARQ 
                      associated subframe and UE performs HARQ 
                  operation }
                      operation 
                 then { UE sends a HARQ feedback on the HARQ 
               }
                  process }
               then { 
                 UE sends a HARQ feedback on the HARQ process 
               }
             }" ;
             }" ;
  }
  }
  Test Objective TP2 {
  Test Objective TP2 {
    from : "36523-1-a20_s07_01.doc::7.1.3.1.1 (2)" ;
    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 {
             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 
                      with a C-RNTI unknown by the UE and data is 
                  available in the associated subframe }
                      available in the associated subframe 
               then { UE does not send any HARQ feedback on the 
               }
                  HARQ process }
               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);
  Type PDCCH (optional c_rnti of type C_RNTI);
  PDCCH pdcch();
  PDCCH pdcch();


  Type CONFIGURATION;
  CONFIGURATION RRCConnectionReconfiguration ;
  
  //User-defined time units
  //User-defined time units
  Time Second;
  Time Second;
  Second five;
  Second five;
  
  
  //Gate type definitions
  //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 definitions
  Component Type defaultCT having {
  Component Type defaultCT having {
+0 −0

Empty file added.

Loading