Commit 910f0227 authored by Yann Garcia's avatar Yann Garcia
Browse files

Started MEC045 TPs

parent 3d631483
Loading
Loading
Loading
Loading
+377 −0
Original line number Diff line number Diff line
Package MEC_MEC045_SRV_QOS_EVENT_SUB_NOT {

    import all from MEC_Common;

    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK"

        Test objective
            "Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.3.3.4"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "qms/v1/subscriptions"
                        body containing
                            qoSMeasurementSubscription containing
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT";;,
                                measuringPeriod indicating value 1;; // One Hz
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.3.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "201 Created"
                        body containing
                            qoSMeasurementSubscription containing
                                links containing 
                                    self containing
                                        href set to HREF_VALUE;,
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT";;,
                                measuringPeriod indicating value 1;;; // One Hz
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_01"

        Test objective
            "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"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.3.3.4"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "qms/v1/subscriptions"
                        body containing
                            qoSMeasurementSubscription containing
                                subscriptionType indicating value "QoSEventSubscription",
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT";;,
                                measuringPeriod indicating value 1;; // One Hz
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.3.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "400 Bad Request";
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02"

        Test objective
            "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"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.3.3.4"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPOST containing
                        uri indicating value "qms/v1/subscriptions"
                        body containing
                            qoSMeasurementSubscription containing
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                websockNotifConfig indicating value WEBSOCKET_CONFIG,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT";;,
                                measuringPeriod indicating value 1;; // One Hz
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.3.3.4
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "400 Bad Request";
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK"

        Test objective
            "Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.4.3.2"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state and
            the IUT entity having a qos_event_subscription containing
                href indicating value HREF_VALUE;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "qms/v1/subscriptions/{SUBSCRIPTION_ID}"
                        body containing
                            qoSMeasurementSubscription containing
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP,
                                        sourcePort indicating value any_value;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT",
                                    elem2 indicating value "ERROR_RATE";;,
                                measuringPeriod indicating value 1;; // One Hz
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.4.3.2
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "200 OK"
                        body containing
                            qoSMeasurementSubscription containing
                                links containing 
                                    self containing
                                        href set to HREF_VALUE;,
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP,
                                        sourcePort indicating value any_value;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT",
                                    elem2 indicating value "ERROR_RATE";;,
                                measuringPeriod indicating value 1;;; // One Hz
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF"

        Test objective
            "Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.4.3.2"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state and
            the IUT entity having a qos_event_subscription containing
                href indicating value HREF_VALUE;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vPUT containing
                        uri indicating value "qms/v1/subscriptions/{UNKNOWN_SUBSCRIPTION_ID}"
                        body containing
                            qoSMeasurementSubscription containing
                                subscriptionType indicating value "QoSEventSubscription",
                                callbackReference indicating value CALLBACK_URL,
                                users containing
                                    elem0 indicating value ACR_SOME_IP;,
                                flowInfo containing
                                    flowFilter containing
                                        sourceIp indicating value ACR_SOME_IP,
                                        sourcePort indicating value any_value;;;,
                                reportTrigger containing
                                    metricType containing
                                        elem0 indicating value "LATENCY",
                                        elem1 indicating value "THROUGHPUT",
                                    elem2 indicating value "ERROR_RATE";;,
                                measuringPeriod indicating value 1;; // One Hz
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.4.3.2
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "404 Not Found";
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK"

        Test objective
            "Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.4.3.5"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state and
            the IUT entity having a qos_event_subscription containing
                href indicating value HREF_VALUE;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vDELETE containing
                        uri indicating value "qms/v1/subscriptions/{SUBSCRIPTION_ID}";
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.4.3.5
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "204 No Content";
                    to the MEC_APP entity
                }
            }
    }


    Test Purpose {
        TP Id "TP_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF"

        Test objective
            "Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application"

        Reference
            "ETSI GS MEC 045 3.1.1 Clause 5.2.2",
            "ETSI GS MEC 013 3.1.1 Clause 6.3.3",
            "ETSI GS MEC 013 3.1.1 Clause 7.4.3.5"

        Config Id Config_MEC_8

        PICS Selection PIC_MEC_PLAT and PIC_SERVICES

        Initial conditions  with {
            the IUT entity being_in idle_state and
            the IUT entity having a qos_event_subscription containing
                href indicating value HREF_VALUE;
        }

        Expected behaviour
            ensure that {
                when {
                    the IUT entity receives a vDELETE containing
                        uri indicating value "qms/v1/subscriptions/{UNKNOWN_SUBSCRIPTION_ID}";
                    from the MEC_APP entity
                }
                then {
                    // MEC 045, clause 7.4.3.5
                    the IUT entity sends a HTTP_RESPONSE containing
                        status_code set to "404 Not Found";
                    to the MEC_APP entity
                }
            }
    }


} // End of Package MEC_MEC045_SRV_QOS_EVENT_SUB_NOT
 No newline at end of file
+378 −0

File added.

Preview size limit exceeded, changes collapsed.

+409 −0

File added.

Preview size limit exceeded, changes collapsed.

+9 −1
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ Package MEC_Common {
            - AMS_CLIENT
            - AMS_SERVER
            - MEC_FED
            - MEC_QMS
        ;
        events:
            - services_running      // services available in the IUT
@@ -204,6 +205,7 @@ Package MEC_Common {
        Component Type MecGenericProvider with gate p of type apiPort;
        Component Type MecGenericConsumer with gate p of type apiPort;
        Component Type MecFederator with gate p of type apiPort;
        Component Type MecQmS with gate p of type apiPort;

        Test Configuration Config_MEC_1 containing
            Tester component MEC_App of type MecAppComponent
@@ -247,5 +249,11 @@ Package MEC_Common {
            connection between Mec_Orchestrator.p and IUT.p
        ;

        Test Configuration Config_MEC_8 containing 
            Tester component MEC_App of type MecAppComponent
            SUT component IUT of type MecQmS
            connection between MEC_App.p and IUT.p
        ;

    }
}