Commit d5d414e7 authored by Yann Garcia's avatar Yann Garcia
Browse files

End of validation of AtsMec_FederationEnablement

parent 81cfa215
Loading
Loading
Loading
Loading
+5 −10
Original line number Original line Diff line number Diff line
@@ -75,17 +75,13 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters
AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_08
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_09
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_08
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_10
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_11
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_09
# Check that the IUT responds with an error when selection is not applicable - SystemId
# Check that the IUT responds with an error when selection is not applicable - SystemId
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_01
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_01
# Check that the IUT responds with an error when selection is not applicable - SystemName
# Check that the IUT responds with an error when selection is not applicable - SystemName
@@ -93,8 +89,7 @@ AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06
# Check that the IUT responds with an error when selection is not applicable - SystemProvider
# Check that the IUT responds with an error when selection is not applicable - SystemProvider
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_03
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_03
# Check that the IUT responds with an error when request is malformed
# Check that the IUT responds with an error when request is malformed
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR
AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR



# Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator
# Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_OK
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_OK
+12 −182
Original line number Original line Diff line number Diff line
@@ -399,7 +399,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
                                                                                             mw_body_json_fed_system_info_list(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                               {
                                                                                                                                  v_system_info_list[0],
                                                                                                                                  v_system_info_list[0],
                                                                                                                                  v_system_info_list[0]
                                                                                                                                  v_system_info_list[1]
                                                                                                                               }
                                                                                                                               }
                              ))))) {
                              ))))) {
            tc_ac.stop;
            tc_ac.stop;
@@ -419,7 +419,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06


    /**
    /**
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
     */
     */
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
@@ -449,7 +449,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=",
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")),
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
@@ -465,16 +465,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
                                                                   mw_http_message_body_json(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                               {
                                                                                                                                  mw_system_info(
                                                                                                                                  v_system_info_list[1]
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_1,
                                                                                                                                                 PX_FED_SYSTEM_NAME_1,
                                                                                                                                                 PX_FED_SYSTEM_ID_1
                                                                                                                                                 ),
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_2,
                                                                                                                                                 PX_FED_SYSTEM_NAME_2,
                                                                                                                                                 PX_FED_SYSTEM_ID_2
                                                                                                                                                 )
                                                                                                                               }
                                                                                                                               }
                              ))))) {
                              ))))) {
            tc_ac.stop;
            tc_ac.stop;
@@ -494,7 +485,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07


    /**
    /**
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters
     */
     */
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
@@ -524,7 +515,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")),
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "&systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")),
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
@@ -540,11 +531,8 @@ module AtsMec_FederationEnablementAPI_TestCases {
                                                                   mw_http_message_body_json(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                               {
                                                                                                                                  mw_system_info(
                                                                                                                                  v_system_info_list[0],
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_1,
                                                                                                                                  v_system_info_list[1]
                                                                                                                                                 PX_FED_SYSTEM_NAME_1,
                                                                                                                                                 PX_FED_SYSTEM_ID_1
                                                                                                                                                 )
                                                                                                                               }
                                                                                                                               }
                              ))))) {
                              ))))) {
            tc_ac.stop;
            tc_ac.stop;
@@ -564,7 +552,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08


    /**
    /**
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters
     */
     */
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        // Local variables
@@ -594,7 +582,7 @@ module AtsMec_FederationEnablementAPI_TestCases {
        httpPort.send(
        httpPort.send(
                      m_http_request(
                      m_http_request(
                                     m_http_request_get(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")),
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(v_system_info_list[0].systemId, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")),
                                                        v_headers
                                                        v_headers
                                                        )
                                                        )
                                     )
                                     )
@@ -610,16 +598,8 @@ module AtsMec_FederationEnablementAPI_TestCases {
                                                                   mw_http_message_body_json(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                               {
                                                                                                                                  mw_system_info(
                                                                                                                                  v_system_info_list[0],
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_1,
                                                                                                                                  v_system_info_list[2]
                                                                                                                                                 PX_FED_SYSTEM_NAME_1,
                                                                                                                                                 PX_FED_SYSTEM_ID_1
                                                                                                                                                 ),
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_2,
                                                                                                                                                 PX_FED_SYSTEM_NAME_2,
                                                                                                                                                 PX_FED_SYSTEM_ID_2
                                                                                                                                                 )
                                                                                                                               }
                                                                                                                               }
                              ))))) {
                              ))))) {
            tc_ac.stop;
            tc_ac.stop;
@@ -638,156 +618,6 @@ module AtsMec_FederationEnablementAPI_TestCases {
        f_cf_01_http_down();
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09


    /**
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters
     */
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_10() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        var SystemInfoList v_system_info_list := valueof(
                                                          {
                                                            m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit),
                                                            m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit),
                                                            m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit)
                                                          });

        // Test control
        if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
            log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
            setverdict(inconc);
            stop;
        }

        // Test component configuration
        f_cf_01_http_up();

        // Test adapter configuration

        // Preamble
        f_create_system_info_list(v_system_info_list);
        f_init_default_headers_list(-, -, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=",
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);

        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_ok(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_1,
                                                                                                                                                 PX_FED_SYSTEM_NAME_1,
                                                                                                                                                 PX_FED_SYSTEM_ID_1
                                                                                                                                                 ),
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_2,
                                                                                                                                                 PX_FED_SYSTEM_NAME_2,
                                                                                                                                                 PX_FED_SYSTEM_ID_2
                                                                                                                                                 )
                                                                                                                               }
                              ))))) {
            tc_ac.stop;

            log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_ac.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement

        // Postamble
        f_delete_system_info_list(v_system_info_list);
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_10

    /**
     * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters
     */
    testcase TC_MEC_MEC040_SRV_MEF_001_OK_11() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        var SystemInfoList v_system_info_list := valueof(
                                                          {
                                                            m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit),
                                                            m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit),
                                                            m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit)
                                                          });

        // Test control
        if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
            log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
            setverdict(inconc);
            stop;
        }

        // Test component configuration
        f_cf_01_http_up();

        // Test adapter configuration

        // Preamble
        f_create_system_info_list(v_system_info_list);
        f_init_default_headers_list(-, -, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")),
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);

        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_ok(
                                                                   mw_http_message_body_json(
                                                                                             mw_body_json_fed_system_info_list(
                                                                                                                               {
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_1,
                                                                                                                                                 PX_FED_SYSTEM_NAME_1,
                                                                                                                                                 PX_FED_SYSTEM_ID_1
                                                                                                                                                 ),
                                                                                                                                  mw_system_info(
                                                                                                                                                 PX_FED_SYSTEM_PROVIDER_2,
                                                                                                                                                 PX_FED_SYSTEM_NAME_2,
                                                                                                                                                 PX_FED_SYSTEM_ID_2
                                                                                                                                                 )
                                                                                                                               }
                              ))))) {
            tc_ac.stop;

            log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_ac.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
        } // End of 'alt' statement

        // Postamble
        f_delete_system_info_list(v_system_info_list);
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_11

    /**
    /**
     * @desc Check that the IUT responds with an error when selection is not applicable - SystemId
     * @desc Check that the IUT responds with an error when selection is not applicable - SystemId
     */
     */
+0 −2
Original line number Original line Diff line number Diff line
@@ -23,8 +23,6 @@ module AtsMec_FederationEnablementAPI_TestControl {
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_07());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_07());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_08());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_08());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_09());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_09());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_10());
        execute(TC_MEC_MEC040_SRV_MEF_001_OK_11());


        execute(TC_MEC_MEC040_SRV_MEF_001_NF_01());
        execute(TC_MEC_MEC040_SRV_MEF_001_NF_01());
        execute(TC_MEC_MEC040_SRV_MEF_001_NF_02());
        execute(TC_MEC_MEC040_SRV_MEF_001_NF_02());