Commit 57699868 authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

add a testcase and add missing configuration file for MEC015 Traffic Management

parent 2ebde6af
Loading
Loading
Loading
Loading
+195 −0
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# IUT roles

LibCommon_Time.PX_TAC := 30.0
#LibCommon_Time.PX_TWAIT := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;

LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.39"

LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
#LibHttp_Pics.PICS_TOKEN_HEADER        := "Basic WrongToken"

# LibMec_Pixits


[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).

LogFile := "../logs/AtsMec_TrafficManagement/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.12,port=30030,use_ssl=0)"
#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)"

[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].

[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.

#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""

[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsMec_TestControl.control

# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_01
# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_02
# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_03
# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_04
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_BR
# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_01
# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_02
# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_03
# Check that the IUT acknowledges a creation of a bandwidthAllocation resource
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_01
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_02
# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK
#Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01
# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_02
#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
#TC_MEC_MEC015_SRV_TM_005_OK
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_01
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_02
#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application
#TC_MEC_MEC015_SRV_TM_005_NF
#Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK
#Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application
#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF

// Multi-access Traffic Steering information Test Cases
#Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK
#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_01
#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_02
#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_03
#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_04
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR
#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF
#Check that the IUT creates a MTS session when queried by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_01
#Check that the IUT creates a MTS session when queried by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_02
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR
#Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_OK
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_BR
#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_NF
#Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_OK
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_BR
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_NF
#Check that the IUT deregisters a MTS session when commanded by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_OK
#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application
#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_NF

// BWM change event susbsciption Testcases
#Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR
#Check that the IUT responds with an error when no subscription are created
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF
#Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK
#Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF
#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK
#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF
#Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02
#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03
#Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK
#Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF
#Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Applications
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK
#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
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF
#Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated
#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK


[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.

[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.

[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
+11 −6
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases {
                                        0
                                        );
          }
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, SubscriptionId: ", v_subscription_id," ***");
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwChgEventSubscription, SubscriptionId: ", v_subscription_id," ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
@@ -965,7 +965,7 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases {
    } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK

    /**
     * @desc Check that the MEC application receives and processes the BWM information event notification sent by the BWM service
     * @desc Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated
    */
    testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter {

@@ -999,10 +999,15 @@ module AtsMec_BandwidthChangeEventSubAPI_TestCases {
                                                                -,
                                                                -,
                                                                mw_http_message_body_json(
                                                                                          mw_body_json_bw_chg_event_subscription(
                                                                                                                                mw_bw_chg_event_subscription(
                                                                                                                                                            PX_BW_Subcription_type,
                                                                                                                                                            PX_BW_EVENT_SUB_CALLBACK_URI
                                                                                          mw_body_json__bw_chg_event_notification(
                                                                                                                                mw_bw_chg_event_notification(
                                                                                                                                                            -,
                                                                                                                                                            -,
                                                                                                                                                            mw_data_vol_dispersion(
                                                                                                                                                                                  1024,PX_APP_INSTANCE_ID
                                                                                                                                                                                  ),
                                                                                                                                                            -                      

                            )))))) -> value v_response {
          tc_wait.stop;

+3 −3
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ module TrafficManagementAPI_Functions {
        log("f_create_bw_chg_event_subscription: INFO: p_subscription_id: ", p_subscription_id);
      }
      [] tc_ac.timeout {
        log("f_create_qos_measure_subscription: INCONC: Expected message not received");
        log("f_create_bw_chg_event_subscription: INCONC: Expected message not received");
      }
    } // End of 'alt' statement

@@ -186,11 +186,11 @@ module TrafficManagementAPI_Functions {
        tc_ac.stop;
      }
      [] tc_ac.timeout {
        log("f_delete_qos_subscription: INCONC: Expected message not received");
        log("f_delete_bw_chg_event_subscription: INCONC: Expected message not received");
      }
    } // End of 'alt' statement
    
  } // End of function f_delete_qos_subscription
  } // End of function f_delete_bw_chg_event_subscription

  function f_create_mts_session_info_resource(
                                              in Json.String p_app_instance_id,
+20 −0
Original line number Diff line number Diff line
@@ -188,6 +188,26 @@ module TrafficManagementAPI_Templates {
    ueIp     := p_ueIp
  } // End of template m_flowfilterW

  template (present) BwChgEventNotification mw_bw_chg_event_notificatipn(
                                                                        template (present) Json.String p_notificationType := "BwChgEventNotification",
                                                                        template TimeStamp p_timeStamp := ?,
                                                                        template DataVolDispersion p_dataVolDispersion := *,
                                                                        template Links p_links := ?,
                                                                      ) := {
    appInsId := p_appInsId,
    ueIp     := p_ueIp
  } // End of template mw_bw_chg_event_notificatipn
  
  template (present) DataVolDispersion mw_data_vol_dispersion(
                                                              template (value) uint32 p_dataVol,
                                                              template (value) Json.String p_appInsId,
                                                              template (present) Json.String p_ueIp := ?
                                                              ) := {
    dataVol := p_dataVol,
    appInsId := p_appInsId,
    ueIp := p_ueIp
  } // End of template mw_data_vol_dispersion

  template (omit) MtsCapabilityInfo m_mts_capability_info(
                                                          in template (value) MtsAccessInfos p_mtsAccessInfo,
                                                          in template (value) MtsModes p_mtsMode,
+31 −0
Original line number Diff line number Diff line
@@ -261,6 +261,37 @@ module TrafficManagementAPI_TypesAndValues {
  }
  type set of Subscription Subscriptions

  /**
  * @desc This type represents a notification for bandwidth change events.
  * @member notificationType Shall be set to "BwChgEventNotification".
  * @member timeStamp Date and time of the generation of the notification (optional).
  * @member dataVolDispersion List of data volume dispersion information.
  * @member links Object containing hyperlinks related to the resource (optional).
  * @see Table 7.4.2: Attributes of the BwChgEventNotification
  */
  type record BwChgEventNotification {
      Json.String notificationType,
      TimeStamp timeStamp optional,
      DataVolDispersion dataVolDispersion,
      Links links optional
  } with {
      variant (links) "name as '_links'";
  };

  /**
  * @desc This type represents data volume dispersion information.
  * @member dataVol Sum of data volume (UL/DL) exchanged per UE per application.
  * @member appInsId Application instance identifier.
  * @member ueIp Source address identity of session (optional).
  */
  type record DataVolDispersion_ {
      UInt32 dataVol,
      Json.String appInsId,
      Json.String ueIp optional
  };
type set of DataVolDispersion_ DataVolDispersion


  /**
   * @desc The information on access network connection
   * @member timeStamp Time stamp to indicate when the corresponding information elements are sent
Loading