Commit 07baf013 authored by Yann Garcia's avatar Yann Garcia
Browse files

TTF T027: TTCN-3 ATS MEC 013 finalized

parent 07a33b7e
Loading
Loading
Loading
Loading
+24 −51
Original line number Diff line number Diff line
/**
 *    @author   ETSI / STF569
 *    @author   ETSI / STF569 / TTF T027
 *    @version  $URL:$
 *              $ID:$
 *    @desc     This module provides the MEC test cases.
@@ -7,7 +7,7 @@
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
 *    @see      ETSI GS MEC 003, ETSI GS MEC 014 V2.1.1
 *    @see      ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1
 */
module AtsMec_UEidentityAPI_TestCases {
  
@@ -38,7 +38,6 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_001_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
@@ -61,11 +60,9 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      v_headers
                                                      )
                                   )
                    );
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -96,7 +93,6 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_001_BR() runs on HttpComponent system HttpTestAdapter {
      // Local variables
@@ -119,11 +115,9 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      v_headers
                                                      )
                                   )
                    );
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -154,7 +148,6 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_001_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
@@ -177,11 +170,9 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")),
                                                      v_headers
                                                      )
                                   )
                    );
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -212,15 +203,14 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_002_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      
      // Test control
      if (not(PICS_MEC_PLAT) or not(PICS_UE_IDENTITY_API_SUPPORTED)) {
        log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
      if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_UE_IDENTITY_API_SUPPORTED)) {
        log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***");
        setverdict(inconc);
        stop;
      }
@@ -240,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_put(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      v_headers,
                                                      m_http_message_body_json(
                                                                               m_body_json_ue_identity_tag_info(
@@ -251,12 +241,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                                                                REGISTERED
                                                                                                                                                                )
                                                                                                                                         }
                                                                                                                                       )
                                                                                                                )
                                                                               )
                                                      )
                                   )
                    );
                    ))))));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -292,7 +277,6 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT responds with an error when an unauthorised request is sent by a MEC Application
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_002_BR() runs on HttpComponent system HttpTestAdapter {
      // Local variables
@@ -320,7 +304,7 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_put(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      v_headers,
                                                      m_http_message_body_json(
                                                                               m_body_json_ue_identity_tag_info(
@@ -331,12 +315,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                                                                INVALID_STATE
                                                                                                                                                                )
                                                                                                                                         }
                                                                                                                                       )
                                                                                                                )
                                                                               )
                                                      )
                                   )
                    );
                    ))))));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -367,7 +346,6 @@ module AtsMec_UEidentityAPI_TestCases {
    
    /**
     * @desc Check that the IUT responds with ProblemDetails on information an invalid URI
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
    testcase TC_MEC_MEC014_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid?
      // Local variables
@@ -390,7 +368,7 @@ module AtsMec_UEidentityAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_put(
                                                      "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
                                                      v_headers,
                                                      m_http_message_body_json(
                                                                               m_body_json_ue_identity_tag_info(
@@ -401,12 +379,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                                                                UNREGISTERED
                                                                                                                                                                )
                                                                                                                                         }
                                                                                                                                       )
                                                                                                                )
                                                                               )
                                                      )
                                   )
                    );
                    ))))));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
@@ -465,7 +438,7 @@ module AtsMec_UEidentityAPI_TestCases {
//      httpPort.send(
//                    m_http_request(
//                                   m_http_request_post(
//                                                       "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
//                                                       PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
//                                                       v_headers,
//                                                       m_http_message_body_json(
//                                                                                m_body_json_ue_identity_tag_info(
@@ -543,7 +516,7 @@ module AtsMec_UEidentityAPI_TestCases {
//      httpPort.send(
//                    m_http_request(
//                                   m_http_request_post(
//                                                       "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
//                                                       PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info",
//                                                       v_headers,
//                                                       m_http_message_body_json(
//                                                                                m_body_json_ue_identity_tag_info(
+8 −9
Original line number Diff line number Diff line
@@ -11,16 +11,15 @@ module AtsMec_UEidentityAPI_TestControl {
  
  control {
    
    if (PICS_MEC_PLAT and PICS_SERVICES) {
      if (PICS_UE_IDENTITY_API_SUPPORTED) {
    if (PICS_MEC_PLAT and PICS_SERVICES and PICS_UE_IDENTITY_API_SUPPORTED) {
      execute(TC_MEC_MEC014_SRV_UETAG_001_OK());
      execute(TC_MEC_MEC014_SRV_UETAG_001_BR());
      execute(TC_MEC_MEC014_SRV_UETAG_001_NF());
      
      execute(TC_MEC_MEC014_SRV_UETAG_002_OK());
      execute(TC_MEC_MEC014_SRV_UETAG_002_BR());
      execute(TC_MEC_MEC014_SRV_UETAG_002_PF());
    }
    }

  } // End of 'control' statement