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

Finalyze Pull TPs for I1

parent 8dc3cd81
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -146,24 +146,34 @@ AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_02_01
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response and an error code when receiving a PullRequest with inconsistent Involved agent
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BO_02_01

# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an Anomaly
# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an Anomaly service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_03

# Check that the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with a vessel document certificate
# Check that the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with a vessel document certificate service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_04
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest with a vessel document certificate with an invalid Integrity check
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BO_04

# Check that the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an Incident
# Check that the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an Incident service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_05

# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an IrregularMigrationIncident
# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an IrregularMigrationIncident service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_06

# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an IrregularMigrationIncident
# Check the IUT sends a PullResponse before reponse timout expiry when receiving a PullRequest with an IrregularMigrationIncident service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_07

# Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for an ongoing meteo condition service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_08

# Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for an organization service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_09

# Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for ongoing risk service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_10

# Check that the IUT sends a PullResponse before reponse timout expiry  when receiving a PullRequest for a cargo service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_11

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving multiple PullRequest for Vessel service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_MULTI_PULL_REQ_BV_01
+2 −2
Original line number Diff line number Diff line
@@ -2168,10 +2168,10 @@ Package CISE {
                import all from CISE_Common;
                Test Purpose {
                  TP Id "TP_CDM_NODE_PULL_REQ_BV_02_01"
                  TP Id "TP_CDM_NODE_PULL_REQ_BV_11"
                  Test objective
                    "Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest for Cargo service with discovery based on sea basin"
                    "Check that the IUT sends a PullResponse before reponse timout expiry  when receiving a PullRequest for a cargo"
                  Reference 
                    "ETSI GS CDM 004 [1] Clause 5.4.2 Pull",
+321 −3
Original line number Diff line number Diff line
@@ -1913,17 +1913,285 @@ module AtsCise_TestCases {

      } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_07

      /**
       * @desc Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for an ongoing meteo condition
       */
      testcase TC_CDM_NODE_PULL_REQUEST_BV_08() runs on CiseComponent system CiseTestAdapter {
        // Local variables

        if (not(PICS_IUT_CDM_NODE) or not(PICS_CDM_PULL) or not(PICS_CDM_METEO_SERVICE)) {
          log("*** " & testcasename() & ": PICS_IUT_CDM_NODE and PICS_CDM_PULL and PICS_CDM_METEO_SERVICE required for executing the TC ***");
          setverdict(inconc);
          stop;
        }

        // Test component configuration
        f_cf_02_up();

        // Test adapter configuration

        f_process_pull_request_await_pull_response(
                                                   -,
                                                   m_service( // Sender
                                                             { string := PX_CISE_SENDER_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_service( // Recipient
                                                             { string := PX_CISE_RECIPIENT_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_entity_payload( // Payload
                                                                    nonClassified,
                                                                    green,
                                                                    nonSpecified,
                                                                    {},
                                                                    false,
                                                                    -,
                                                                    false,
                                                                    -, -, -, -, -, -, -,
                                                                    m_meteo_oceanographic_condition(
                                                                                                    {
                                                                                                       m_location_derivations_location(
                                                                                                                                       m_location(
                                                                                                                                                  { m_geometry }
                                                                                                       ))
                                                                                                    },
                                                                                                    PX_METEO_AIR_TEMP,
                                                                                                    PX_METEO_CLOUD_CEILING,
                                                                                                    PX_METEO_CLOUD_COVER,
                                                                                                    PX_METEO_PRECIPITATION,
                                                                                                    -,
                                                                                                    PX_METEO_SALINITY,
                                                                                                    PX_METEO_SEA_CONDITION,
                                                                                                    PX_METEO_SEA_LEVEL_PRESSURE,
                                                                                                    PX_METEO_SOURCE_TYPE
                                                   )));

        // Postamble
        f_cf_02_down();

      } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_08

      /**
       * @desc Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for an organization
       */
      testcase TC_CDM_NODE_PULL_REQUEST_BV_09() runs on CiseComponent system CiseTestAdapter {
        // Local variables

        if (not(PICS_IUT_CDM_NODE) or not(PICS_CDM_PULL) or not(PICS_CDM_ORGANIZATION_SERVICE)) {
          log("*** " & testcasename() & ": PICS_IUT_CDM_NODE and PICS_CDM_PULL and PICS_CDM_ORGANIZATION_SERVICE required for executing the TC ***");
          setverdict(inconc);
          stop;
        }

        // Test component configuration
        f_cf_02_up();

        // Test adapter configuration

        f_process_pull_request_await_pull_response(
                                                   -,
                                                   m_service( // Sender
                                                             { string := PX_CISE_SENDER_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_service( // Recipient
                                                             { string := PX_CISE_RECIPIENT_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_entity_payload( // Payload
                                                                    nonClassified,
                                                                    green,
                                                                    nonSpecified,
                                                                    {},
                                                                    false,
                                                                    -,
                                                                    false,
                                                                    -, -, -, -, -, -, -, -,
                                                                    m_organization(
                                                                                   -, -, -, 
                                                                                   { PX_ORGANIZATION_COUNTRY },
                                                                                   {
                                                                                      {
                                                                                        location          := m_location_derivations_location(m_location({ m_geometry })),
                                                                                        agentRole         := isLocatedIn,
                                                                                        involvementPeriod := omit
                                                                                      }
                                                                                    }
                                                   )));

        // Postamble
        f_cf_02_down();

      } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_09

      /**
       * @desc Check that the IUT sends a PullResponse before response timeout expiry when receiving a PullRequest for ongoing risk
       */
      testcase TC_CDM_NODE_PULL_REQUEST_BV_10() runs on CiseComponent system CiseTestAdapter {
        // Local variables

        if (not(PICS_IUT_CDM_NODE) or not(PICS_CDM_PULL) or not(PICS_CDM_RISK_SERVICE)) {
          log("*** " & testcasename() & ": PICS_IUT_CDM_NODE and PICS_CDM_PULL and PICS_CDM_RISK_SERVICE required for executing the TC ***");
          setverdict(inconc);
          stop;
        }

        // Test component configuration
        f_cf_02_up();

        // Test adapter configuration

        f_process_pull_request_await_pull_response(
                                                   -,
                                                   m_service( // Sender
                                                             { string := PX_CISE_SENDER_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_service( // Recipient
                                                             { string := PX_CISE_RECIPIENT_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_entity_payload( // Payload
                                                                    nonClassified,
                                                                    green,
                                                                    nonSpecified,
                                                                    {},
                                                                    false,
                                                                    -,
                                                                    false,
                                                                    -, -, -, -, -, -, -, -, -,
                                                                    m_risk(
                                                                           m_unique_identifier(
                                                                                               -, -, -, 
                                                                                               PX_RISK_UUID
                                                                                               ), 
                                                                           -, -,
                                                                           {
                                                                              { location := m_location_derivations_location(m_location({ m_geometry })) }
                                                                            },
                                                                           -, -, -, -,
                                                                           PX_RISK_LEVEL,
                                                                           PX_RISK_PROBABILITY,
                                                                           PX_RISK_SEVERITY,
                                                                           PX_RISK_TYPE
                                                   )));

        // Postamble
        f_cf_02_down();

      } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_10

      /**
       * @desc Check that the IUT sends a PullResponse before reponse timout expiry  when receiving a PullRequest for a cargo
       */
      testcase TC_CDM_NODE_PULL_REQUEST_BV_11() runs on CiseComponent system CiseTestAdapter {
        // Local variables

        if (not(PICS_IUT_CDM_NODE) or not(PICS_CDM_PULL) or not(PICS_CDM_CARGO_SERVICE)) {
          log("*** " & testcasename() & ": PICS_IUT_CDM_NODE and PICS_CDM_PULL and PICS_CDM_CARGO_SERVICE required for executing the TC ***");
          setverdict(inconc);
          stop;
        }

        // Test component configuration
        f_cf_02_up();

        // Test adapter configuration

        f_process_pull_request_await_pull_response(
                                                   -,
                                                   m_service( // Sender
                                                             { string := PX_CISE_SENDER_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_service( // Recipient
                                                             { string := PX_CISE_RECIPIENT_SERVICE_ID },
                                                             pull,
                                                             -,
                                                             -,
                                                             -,
                                                             -,
                                                             anomalyService
                                                             ),
                                                   m_entity_payload( // Payload
                                                                    nonClassified,
                                                                    green,
                                                                    nonSpecified,
                                                                    {},
                                                                    false,
                                                                    -,
                                                                    false,
                                                                    -, -, -, -, -, -, -, -, -, -,
                                                                    m_cargo(
                                                                            -, -, -, 
                                                                            { PX_CARGO_NAME },
                                                                            -,
                                                                            {
                                                                               {
                                                                                  location := m_location_derivations_location(m_location({m_geometry(PX_CARGO_POS_LATITUDE, PX_CARGO_POS_LONGITUDE)})),
                                                                                  cOG                     := omit,
                                                                                  heading                 := omit,
                                                                                  metadata_list           := {},
                                                                                  periodOfTime            := omit,
                                                                                  sourceType              := observation,
                                                                                  placementPurpose        := omit,
                                                                                  plannedOperations_list  := {},
                                                                                  plannedWorks            := omit,
                                                                                  sensorType              := omit,
                                                                                  sOG                     := omit,
                                                                                  specialSecurityMeasures := omit,
                                                                                  speed                   := omit,
                                                                                  locationRole            := omit                                                                                
                                                                               }
                                                                            },
                                                                            -, -, -, -,
                                                                            m_unique_identifier(
                                                                                                -, -, -, 
                                                                                                PX_CARGO_UUID
                                                                                                ),
                                                                            PX_CARGO_TYPE
                                                                    )));

        // Postamble
        f_cf_02_down();

      } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_11

    } // End of group pull_request

@@ -2671,6 +2939,56 @@ module AtsCise_TestCases {

    group pull_request {

      group vessel {

        /**
        * @desc Check that the IUT sends a PullRequest to the GatewayProvider when receiving a PullRequest for a VesselService
        */
        testcase TC_CDM_NODE_I2_PULL_REQ_BV_01_01() runs on CiseMtc system CiseTestAdapter {
          // Local variables
          var CiseComponent v_adapter;
          var CiseComponent v_gateway;

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

          // Test component configuration
          f_cf_03_up();

          // Preamble

          // Start components
          v_adapter := f_getComponent(c_adapter_a);
          v_gateway := f_getComponent(c_adapter_b);
          v_adapter.start(f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_adapter());
          v_gateway.start(f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_gateway());

          // Synchronization
          f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Two simulated adatpers

          // Cleanup
          f_cf_03_down();
                      
        } // End of testcaste TC_CDM_NODE_I2_PULL_REQ_BV_01_01

        group f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01 {

          function f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_adapter() runs on CiseComponent {
            // Local variables
          } // End of function f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_adapter

          function f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_gateway() runs on CiseComponent {
            // Local variables
          } // End of function f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01_gateway

        } // End of group f_TC_CDM_NODE_I2_PULL_REQ_BV_01_01

      } // End of group vessel

    } // End of group pull_request

  } // End of group cise_node_i2
+95 −4

File changed.

Preview size limit exceeded, changes collapsed.

+14 −8

File changed.

Preview size limit exceeded, changes collapsed.

Loading