diff --git a/README.md b/README.md index 354d82c9338ce4dce482e01fa4b965c3794b882d..c7e260d824c42aa7c9fb6cf1a70f0568f34ac4a6 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,22 @@ test launch command followed by the file name. - You should configure your broker accordingly +- Interoperability tests (IOP_CNF_*) : + - The Interoperability tests assumes that it will manage multiple brokers + - Multiple NGSI-LD brokers will be running simultaneously on different ports + - The broker URLs will be passed as a variable by terminal + + The following example shows how to run an interoperability test with multiple brokers: + + ``` + robot --variable b1_url:http://localhost:8080/ngsi-ld/v1 \ + --variable b2_url:http://localhost:8081/ngsi-ld/v1 \ + --variable b3_url:http://localhost:8082/ngsi-ld/v1 \ + --variable b4_url:http://localhost:8083/ngsi-ld/v1 \ + --variable b5_url:http://localhost:8084/ngsi-ld/v1 \ + ./TP/NGSI-LD/Interoperability/Provision/Entities/CreateEntity/IOP_CNF_01_01.robot + ``` + ## Test Suite Management (tsm) The `tsm` script is designed to facilitate the selection and execution of the Test Suite, especially if not all the diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..0a39d979c170787b57f465fdd3f9527e5ea50991 --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot @@ -0,0 +1,80 @@ +*** Settings *** +Documentation Verify that the b1 broker can retrieve some attribute of an entity and that the b2 broker can retrieve the full entity. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${first_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${second_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld +${b1_url} +${b2_url} +${b3_url} + +*** Test Cases *** +IOP_CNF_01_01 Retrieve Entities In Three Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_1_1 inclusive exclusive interoperability + + ${response}= Retrieve Entity ${entity_id1} broker_url=${b1_url} context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response.status_code} + Should Contain ${response.json()} availableSpotsNumber + Should Contain ${response.json()} totalSpotsNumber + + ${expected_payload}= Load Entity ${first_entity_payload_filename} ${entity_id1} + ${response}= Retrieve Entity ${entity_id1} broker_url=${b2_url} context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response.status_code} + Should Be Equal ${response.json()} ${expected_payload} + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id1}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id1} + ${response}= Create Entity ${first_entity_payload_filename} ${entity_id1} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + + ${entity_id2}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id2} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${second_entity_payload_filename} ${entity_id2} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id1} + ... broker_url=${b2_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${exclusive_registration_payload_file_path} + ... entity_id=${entity_id2} + ... broker_url=${b3_url} + ... mode=exclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Entity By Id ${entity_id1} broker_url=${b2_url} + Delete Entity By Id ${entity_id2} broker_url=${b2_url} + Delete Entity By Id ${entity_id2} broker_url=${b3_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..db6c50787e21c024941c16dc8af66b414add4e20 --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot @@ -0,0 +1,78 @@ +*** Settings *** +Documentation Verify that the b1 broker can retrieve some attribute of an entity and that the b2 broker can retrieve the full entity. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${entity_payload_filename} interoperability/offstreet-parking2-no-location.jsonld +${full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld +${b1_url} +${b2_url} +${b3_url} + +*** Test Cases *** +IOP_CNF_01_02 Retrieve Entities In Three Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_1_2 inclusive exclusive interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 200 ${response.status_code} + + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} + ${second_expected_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} + Check Response Status Code 200 ${response.status_code} + Should Be Equal ${response.json()}[availableSpotNumbers][value] ${first_expected_payload}[availableSpotNumbers][value] + Should Be Equal ${response.json()}[totalSpotsNumber][value] ${first_expected_payload}[totalSpotsNumber][value] + Should Be Equal ${response.json()}[location][value] ${second_expected_payload}[location][value] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${exclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=exclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..8ba816986725405505da34c54162ac6ee068cc06 --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot @@ -0,0 +1,96 @@ +*** Settings *** +Documentation Verify that the b1 broker can retrieve some attribute parts from both b2 and b3 brokers. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${entity_payload_filename} interoperability/offstreet-parking1-no-location.jsonld +${first_full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${second_full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} + +*** Test Cases *** +IOP_CNF_02_01 Retrieve Entities In Four Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_2_1 inclusive redirect interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 207 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + Should Be Equal ${actual_payload} ${first_full_entity_payload_filename} + + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} + ${second_expected_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${actual_payload}[availableSpotNumbers][value] ${first_expected_payload}[availableSpotNumbers][value] + Should Be Equal ${actual_payload}[totalSpotsNumber][value] ${first_expected_payload}[totalSpotsNumber][value] + Should Be Equal ${actual_payload}[location][value] ${second_expected_payload}[location][value] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Context Source Registration ${registration_id3} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} + Delete Entity by Id ${entity_id} broker_url=${b4_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..67245c6959b60f452a499d45b2b3044a5b8f5a8f --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot @@ -0,0 +1,91 @@ +*** Settings *** +Documentation Verify that the b1 broker can retrieve the location attribute from b2 and this attribute is the same as the one found in b3. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${entity_payload_filename} interoperability/offstreet-parking1-location-and-name.jsonld +${first_full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${second_full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} + +*** Test Cases *** +IOP_CNF_02_02 Retrieve Entities In Four Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_2_2 inclusive redirect interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 207 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + Should Contain ${actual_payload} location + + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${expected_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${actual_payload}[location][value] ${expected_payload}[location][value] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Context Source Registration ${registration_id3} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} + Delete Entity by Id ${entity_id} broker_url=${b4_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..658da5878116d54d51428c1d6c3ae30d9c7c5268 --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot @@ -0,0 +1,99 @@ +*** Settings *** +Documentation Verify that the b1 broker contains the entity without the location attribute contained in the b2 broker. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${entity_payload_filename} interoperability/offstreet-parking1-no-location.jsonld +${first_full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${second_full_entity_payload_filename} interoperability/offstreet-parking2-full.jsonld +${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld +${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} + +*** Test Cases *** +IOP_CNF_03_01 Retrieve Entities In Four Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_3_1 auxiliary inclusive interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 207 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + Should Not Contain ${actual_payload} location + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} local=true + ${first_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true + ${second_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${third_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${actual_payload} ${first_payload} + Should Not Contain ${actual_payload} ${second_payload}[location] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${first_full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${second_full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${auxiliary_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=auxiliary + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${first_inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${second_inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Context Source Registration ${registration_id3} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} + Delete Entity by Id ${entity_id} broker_url=${b4_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..43853ddce48fb5d0e5f25aa3a65e060f8fa2e55a --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot @@ -0,0 +1,94 @@ +*** Settings *** +Documentation Verify that the b1 broker contains the entity with the location attribute and this is the same one contained in b3 broker. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${no_location_entity_payload_filename} interoperability/offstreet-parking1-no-location.jsonld +${location_name_entity_payload_filename} interoperability/offstreet-parking1-location-and-name.jsonld +${full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${first_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld +${second_inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld +${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} + +*** Test Cases *** +IOP_CNF_03_02 Retrieve Entities In Four Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_3_2 auxiliary inclusive interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 207 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + Should Contain ${actual_payload} location + + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${expected_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${actual_payload}[location][value] ${expected_payload}[location][value] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${auxiliary_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=auxiliary + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${first_inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${second_inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b1_url} + Delete Context Source Registration ${registration_id3} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} + Delete Entity by Id ${entity_id} broker_url=${b4_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..48b11e7357222be6b9a809c609e4477347a6690b --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot @@ -0,0 +1,118 @@ +*** Settings *** +Documentation Verify that the b1 broker contains the entity with attributes found in the leaf brokers b4 and b5. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${no_location_entity_payload_filename} interoperability/offstreet-parking1-no-location.jsonld +${full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld +${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld +${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld +${first_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld +${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} +${b5_url} + +*** Test Cases *** +IOP_CNF_04_01 Retrieve Entities In Five Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_4_1 auxiliary inclusive redirect interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 200 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity ${entity_id} broker_url=${b4_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b5_url} + ${second_expected_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${actual_payload}[availableSpotNumbers] ${first_expected_payload}[availableSpotNumbers] + Should Be Equal ${actual_payload}[totalSpotsNumber] ${first_expected_payload}[totalSpotsNumber] + Should Be Equal ${actual_payload}[location] ${second_expected_payload}[location] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b5_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${auxiliary_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=auxiliary + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${first_redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${second_redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b5_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id4}= Generate Random CSR Id + Set Suite Variable ${registration_id4} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id4} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id5}= Generate Random CSR Id + Set Suite Variable ${registration_id5} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id5} + ... ${exclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b5_url} + ... mode=exclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b2_url} + Delete Context Source Registration ${registration_id3} broker_url=${b2_url} + Delete Context Source Registration ${registration_id4} broker_url=${b1_url} + Delete Context Source Registration ${registration_id5} broker_url=${b3_url} + Delete Entity By Id ${entity_id} broker_url=${b4_url} + Delete Entity by Id ${entity_id} broker_url=${b5_url} \ No newline at end of file diff --git a/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..26ae7ec55e49d6e456e003b3b14463f15a96ed86 --- /dev/null +++ b/TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot @@ -0,0 +1,132 @@ +*** Settings *** +Documentation Verify that the b1 broker contains the entity with attributes found in the leaf brokers b4 and b5. + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceDiscovery.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextSourceRegistration.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Context Source Registrations +Test Teardown Delete Entities and Delete Registrations + +*** Variables *** +${no_location_entity_payload_filename} interoperability/offstreet-parking1-no-location.jsonld +${location_name_entity_payload_filename} interoperability/offstreet-parking1-location-and-name.jsonld +${full_entity_payload_filename} interoperability/offstreet-parking1-full.jsonld +${inclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld +${auxiliary_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld +${exclusive_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld +${second_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld +${third_redirect_registration_payload_file_path} csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld +${b1_url} +${b2_url} +${b3_url} +${b4_url} +${b5_url} + +*** Test Cases *** +IOP_CNF_04_02 Retrieve Entities In Five Different Brokers + [Documentation] Check that entities are created in the different brokers and can be retrieved accordingly. + [Tags] 6_2 I6_2_4_2 auxiliary inclusive redirect interoperability + + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} + Check Response Status Code 200 ${response.status_code} + ${payload}= Set To Dictionary ${response.json()} + Should Contain ${payload} location + + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true + ${second_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity ${entity_id} broker_url=${b5_url} local=true + ${third_expected_payload}= Set To Dictionary ${response.json()} + + Should Be Equal ${payload}[availableSpotsNumbers] ${first_expected_payload}[availableSpotsNumbers] + Should Be Equal ${payload}[totalSpotsNumber] ${first_expected_payload}[totalSpotsNumber] + Should Be Equal ${payload}[location] ${second_expected_payload}[location] + Should Be Equal ${payload}[name] ${third_expected_payload}[name] + +*** Keywords *** +Setup Initial Context Source Registrations + + ${entity_id}= Generate Random Parking Entity Id + Set Suite Variable ${entity_id} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${no_location_entity_payload_filename} ${entity_id} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${full_entity_payload_filename} ${entity_id} broker_url=${b4_url} + Check Response Status Code 201 ${response.status_code} + ${response}= Create Entity ${location_name_entity_payload_filename} ${entity_id} broker_url=${b5_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id1}= Generate Random CSR Id + Set Suite Variable ${registration_id1} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id1} + ... ${auxiliary_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b2_url} + ... mode=auxiliary + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id2}= Generate Random CSR Id + Set Suite Variable ${registration_id2} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id2} + ... ${second_redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b4_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id3}= Generate Random CSR Id + Set Suite Variable ${registration_id3} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id3} + ... ${third_redirect_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b5_url} + ... mode=redirect + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b2_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id4}= Generate Random CSR Id + Set Suite Variable ${registration_id4} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id4} + ... ${inclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b3_url} + ... mode=inclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b1_url} + Check Response Status Code 201 ${response.status_code} + + ${registration_id5}= Generate Random CSR Id + Set Suite Variable ${registration_id5} + ${registration_payload}= Prepare Context Source Registration From File + ... ${registration_id5} + ... ${exclusive_registration_payload_file_path} + ... entity_id=${entity_id} + ... broker_url=${b5_url} + ... mode=exclusive + ${response}= Create Context Source Registration With Return ${registration_payload} broker_url=${b3_url} + Check Response Status Code 201 ${response.status_code} + +Delete Entities And Delete Registrations + Delete Context Source Registration ${registration_id1} broker_url=${b1_url} + Delete Context Source Registration ${registration_id2} broker_url=${b2_url} + Delete Context Source Registration ${registration_id3} broker_url=${b2_url} + Delete Context Source Registration ${registration_id4} broker_url=${b1_url} + Delete Context Source Registration ${registration_id5} broker_url=${b3_url} + Delete Entity By Id ${entity_id} broker_url=${b1_url} + Delete Entity By Id ${entity_id} broker_url=${b2_url} + Delete Entity By Id ${entity_id} broker_url=${b3_url} + Delete Entity By Id ${entity_id} broker_url=${b4_url} + Delete Entity by Id ${entity_id} broker_url=${b5_url} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..d5dabec69d9bd4ef8db7daf8892dfc2ebe81ae92 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld @@ -0,0 +1,18 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Auxiliary:1", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ] + } + ], + "mode": "auxiliary", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..1d0373098a60475adbc0a28f2a0d0cbec3f5a0e1 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Auxiliary:2", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ], + "propertyNames": [ + "availableSpotsNumber", + "totalSpotsNumber" + ] + } + ], + "mode": "auxiliary", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..f11d58dee6fea19cefc17c70572f1273f0808e2c --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Exclusive:1", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "id": "urn:ngsi-ld:OffStreetParking:2" + } + ], + "propertyNames": [ + "totalSpotsNumber" + ] + } + ], + "mode": "exclusive", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fdc4730a159f07015bdce5309cf4e5cc491d786b --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Exclusive:2", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "id": "urn:ngsi-ld:OffStreetParking:2", + "type": "OffStreetParking" + } + ], + "propertyNames": [ + "location" + ] + } + ], + "mode": "exclusive", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..d137f7b405d3b8b79c8b78612cad4d83b209ff88 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Exclusive:3", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "id": "urn:ngsi-ld:OffStreetParking:1", + "type": "OffStreetParking" + } + ], + "propertyNames": [ + "location" + ] + } + ], + "mode": "exclusive", + "operations": ["redirectionOps"], + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..42145ec138ba9d656d3e5328070750af0c5d83ec --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld @@ -0,0 +1,18 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Inclusive:1", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ] + } + ], + "mode": "inclusive", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..4f835c57cee8119ba85c319a3f5de2feb4e95cfa --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Inclusive:2", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ], + "propertyNames": [ + "availableSpotsNumber", + "totalSpotsNumber" + ] + } + ], + "mode": "inclusive", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..754d1c63b74748ebb0e7051313f22c5bf84ebf67 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld @@ -0,0 +1,18 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Redirect:1", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ] + } + ], + "mode": "redirect", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..2cc6e981befbce4fdeb2f6b3defcb206d936f4c0 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Redirect:2", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking" + } + ], + "propertyNames": [ + "location" + ] + } + ], + "mode": "redirect", + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..44e537ca2002cd284628bcf906c5cfef16b7ee58 --- /dev/null +++ b/data/csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:ContextSourceRegistration:Redirect:3", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "type": "OffStreetParking", + "id": "urn:ngsi-ld:OffStreetParking:2" + } + ], + "propertyNames": [ + "location" + ] + } + ], + "mode": "redirect", + "operations": ["redirectionOps"], + "endpoint": "xxx", + "@context":[ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/interoperability/offstreet-parking1-full.jsonld b/data/entities/interoperability/offstreet-parking1-full.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..c35bf5996e94021155caa3e2e076a8b4846bdfad --- /dev/null +++ b/data/entities/interoperability/offstreet-parking1-full.jsonld @@ -0,0 +1,45 @@ +{ + "id": "urn:ngsi-ld:OffStreetParking:1", + "type": "OffStreetParking", + "name": { + "type": "Property", + "value": "Downtown One" + }, + "availableSpotsNumber": { + "type": "Property", + "value": 121, + "observedAt": "2017-07-29T12:05:02Z", + "reliability": { + "type": "Property", + "value": 0.7 + } + }, + "totalSpotsNumber": { + "type": "Property", + "value": 200 + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "@context": [ + { + "OffStreetParking": "https://ngsi-ld-test-suite/context#OffStreetParking", + "Vehicle": "https://ngsi-ld-test-suite/context#Vehicle", + "availableSpotsNumber": "https://ngsi-ld-test-suite/context#availableSpotsNumber", + "brandName": "https://ngsi-ld-test-suite/context#brandName", + "isParked": "https://ngsi-ld-test-suite/context#isParked", + "name": "https://ngsi-ld-test-suite/context#name", + "source": "https://ngsi-ld-test-suite/context#source", + "speed": "https://ngsi-ld-test-suite/context#speed", + "totalSpotsNumber": "https://ngsi-ld-test-suite/context#totalSpotsNumber" + }, + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/interoperability/offstreet-parking1-location-and-name.jsonld b/data/entities/interoperability/offstreet-parking1-location-and-name.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..6ec58ac64378fe8ea4dee22162772c9d9cca7d0a --- /dev/null +++ b/data/entities/interoperability/offstreet-parking1-location-and-name.jsonld @@ -0,0 +1,33 @@ +{ + "id": "urn:ngsi-ld:OffStreetParking:1", + "type": "OffStreetParking", + "name": { + "type": "Property", + "value": "Downtown One" + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.9, + 42.2 + ] , + "observedAt": "2021-04-04T11:45:00Z" + } + }, + "@context": [ + { + "OffStreetParking": "https://ngsi-ld-test-suite/context#OffStreetParking", + "Vehicle": "https://ngsi-ld-test-suite/context#Vehicle", + "availableSpotsNumber": "https://ngsi-ld-test-suite/context#availableSpotsNumber", + "brandName": "https://ngsi-ld-test-suite/context#brandName", + "isParked": "https://ngsi-ld-test-suite/context#isParked", + "name": "https://ngsi-ld-test-suite/context#name", + "source": "https://ngsi-ld-test-suite/context#source", + "speed": "https://ngsi-ld-test-suite/context#speed", + "totalSpotsNumber": "https://ngsi-ld-test-suite/context#totalSpotsNumber" + }, + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/interoperability/offstreet-parking1-no-location.jsonld b/data/entities/interoperability/offstreet-parking1-no-location.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b15ef9d7c944c4c50fd2d5aa07fbedc7d9f3c424 --- /dev/null +++ b/data/entities/interoperability/offstreet-parking1-no-location.jsonld @@ -0,0 +1,35 @@ +{ + "id": "urn:ngsi-ld:OffStreetParking:1", + "type": "OffStreetParking", + "name": { + "type": "Property", + "value": "Downtown One" + }, + "availableSpotsNumber": { + "type": "Property", + "value": 169, + "observedAt": "2017-07-29T12:10:02Z", + "reliability": { + "type": "Property", + "value": 0.3 + } + }, + "totalSpotsNumber": { + "type": "Property", + "value": 200 + }, + "@context": [ + { + "OffStreetParking": "https://ngsi-ld-test-suite/context#OffStreetParking", + "Vehicle": "https://ngsi-ld-test-suite/context#Vehicle", + "availableSpotsNumber": "https://ngsi-ld-test-suite/context#availableSpotsNumber", + "brandName": "https://ngsi-ld-test-suite/context#brandName", + "isParked": "https://ngsi-ld-test-suite/context#isParked", + "name": "https://ngsi-ld-test-suite/context#name", + "source": "https://ngsi-ld-test-suite/context#source", + "speed": "https://ngsi-ld-test-suite/context#speed", + "totalSpotsNumber": "https://ngsi-ld-test-suite/context#totalSpotsNumber" + }, + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/interoperability/offstreet-parking2-full.jsonld b/data/entities/interoperability/offstreet-parking2-full.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..0708f5e70c897995f7959a658cabf22e4c9039e3 --- /dev/null +++ b/data/entities/interoperability/offstreet-parking2-full.jsonld @@ -0,0 +1,45 @@ +{ + "id": "urn:ngsi-ld:OffStreetParking:2", + "type": "OffStreetParking", + "name": { + "type": "Property", + "value": "Downtown Two" + }, + "availableSpotsNumber": { + "type": "Property", + "value": 112, + "observedAt": "2017-07-29T12:05:02Z", + "reliability": { + "type": "Property", + "value": 0.4 + } + }, + "totalSpotsNumber": { + "type": "Property", + "value": 150 + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.45, + 41.2 + ] + } + }, + "@context": [ + { + "OffStreetParking": "https://ngsi-ld-test-suite/context#OffStreetParking", + "Vehicle": "https://ngsi-ld-test-suite/context#Vehicle", + "availableSpotsNumber": "https://ngsi-ld-test-suite/context#availableSpotsNumber", + "brandName": "https://ngsi-ld-test-suite/context#brandName", + "isParked": "https://ngsi-ld-test-suite/context#isParked", + "name": "https://ngsi-ld-test-suite/context#name", + "source": "https://ngsi-ld-test-suite/context#source", + "speed": "https://ngsi-ld-test-suite/context#speed", + "totalSpotsNumber": "https://ngsi-ld-test-suite/context#totalSpotsNumber" + }, + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/interoperability/offstreet-parking2-no-location.jsonld b/data/entities/interoperability/offstreet-parking2-no-location.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..ef528b814fbe661dd4a4db77807e7aaf2693c875 --- /dev/null +++ b/data/entities/interoperability/offstreet-parking2-no-location.jsonld @@ -0,0 +1,35 @@ +{ + "id": "urn:ngsi-ld:Vehicle:2", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Brand2" + }, + "speed": { + "type": "Property", + "value": 10, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:2", + "observedAt": "2017-07-28T12:00:04Z" + }, + "@context": [ + { + "OffStreetParking": "https://ngsi-ld-test-suite/context#OffStreetParking", + "Vehicle": "https://ngsi-ld-test-suite/context#Vehicle", + "availableSpotsNumber": "https://ngsi-ld-test-suite/context#availableSpotsNumber", + "brandName": "https://ngsi-ld-test-suite/context#brandName", + "isParked": "https://ngsi-ld-test-suite/context#isParked", + "name": "https://ngsi-ld-test-suite/context#name", + "source": "https://ngsi-ld-test-suite/context#source", + "speed": "https://ngsi-ld-test-suite/context#speed", + "totalSpotsNumber": "https://ngsi-ld-test-suite/context#totalSpotsNumber" + }, + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld" + ] +} \ No newline at end of file diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index a80e892a8099b19c168ae0a102ea68f1d9949e10..61630e71014089a2ffada44c742e0139206735be 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -142,7 +142,7 @@ Query Entities Via POST Output ${response} Query Entities Via POST RETURN ${response} -Query Entity +Retrieve Entity [Arguments] ... ${id} ... ${accept}=${EMPTY} @@ -154,11 +154,19 @@ Query Entity ... ${lang}=${EMPTY} ... ${join}=${EMPTY} ... ${joinLevel}=${EMPTY} + ... ${pick}=${EMPTY} + ... ${omit}=${EMPTY} + ... ${local}=${EMPTY} + ... ${broker_url}=${EMPTY} + ${attrs_length}= Get Length ${attrs} ${accept_length}= Get Length ${accept} ${options_length}= Get Length ${options} ${format_length}= Get Length ${format} ${lang_length}= Get Length ${lang} + ${pick_length}= Get Length ${pick} + ${omit_length}= Get Length ${omit} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} &{headers}= Create Dictionary &{params}= Create Dictionary IF ${accept_length}>0 @@ -185,9 +193,20 @@ Query Entity IF '${join_level}'!='' Set To Dictionary ${params} joinLevel=${joinLevel} END + IF ${pick_length}>0 Set To Dictionary ${params} pick=${pick} + IF ${omit_length}>0 Set To Dictionary ${params} omit=${omit} + IF '${local}'!='' Set To Dictionary ${params} local=${local} + + ${response}= GET + ... url=${final_url}/${ENTITIES_ENDPOINT_PATH}${id} + ... headers=${headers} + ... params=${params} + ... expected_status=any + Output ${response} Retrieve Entity + RETURN ${response} ${response}= GET - ... url=${url}/${ENTITIES_ENDPOINT_PATH}${id} + ... url=${final_url}/${ENTITIES_ENDPOINT_PATH}${id} ... headers=${headers} ... params=${params} ... expected_status=any @@ -237,35 +256,6 @@ Retrieve Attributes Output ${response} Retrieve Attributes RETURN ${response} -Retrieve Entity by Id - [Arguments] - ... ${id} - ... ${accept}=${CONTENT_TYPE_LD_JSON} - ... ${context}=${EMPTY} - ... ${local}=${EMPTY} - ... ${options}=${EMPTY} - ${headers}= Create Dictionary - &{params}= Create Dictionary - ${options_length}= Get Length ${options} - Set To Dictionary ${headers} Accept ${accept} - IF '${context}'!='' - ${context_link}= Build Context Link ${context} - Set To Dictionary - ... ${headers} - ... Link=${context_link} - END - IF '${local}'!='' Set To Dictionary ${params} local=${local} - IF ${options_length}>0 - Set To Dictionary ${params} options=${options} - END - ${response}= GET - ... url=${url}/${ENTITIES_ENDPOINT_PATH}${id} - ... headers=${headers} - ... params=${params} - ... expected_status=any - Output ${response} Retrieve Entity by Id - RETURN ${response} - Retrieve Entity Type [Arguments] ${type} ${context}=${EMPTY} ${accept}=${EMPTY} diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index a38e9d8bbf3c95c83c652f2e5ee46491a71508ff..6c259c5002dfe36295e9a7fd8074527e2008c759 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -151,14 +151,15 @@ Batch Upsert Entities RETURN ${response} Create Entity - [Arguments] ${filename} ${entity_id} ${local}=${EMPTY} + [Arguments] ${filename} ${entity_id} ${local}=${EMPTY} ${broker_url}=${EMPTY} &{params}= Create Dictionary IF '${local}'!='' Set To Dictionary ${params} local=${local} ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/${filename} ${entity}= Update Value To JSON ${entity_payload} $.id ${entity_id} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST - ... url=${url}/${ENTITIES_ENDPOINT_PATH} + ... url=${final_url}/${ENTITIES_ENDPOINT_PATH} ... json=${entity} ... params=${params} ... headers=${headers} @@ -207,11 +208,12 @@ Create Entity Selecting Content Type RETURN ${response} Create Entity From File - [Arguments] ${filename} + [Arguments] ${filename} ${broker_url}=${EMPTY} ${file_content}= Get File ${EXECDIR}/data/entities/${filename} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} &{headers}= Create Dictionary Content-Type=application/ld+json ${response}= POST - ... url=${url}/${ENTITIES_ENDPOINT_PATH} + ... url=${final_url}/${ENTITIES_ENDPOINT_PATH} ... data=${file_content} ... headers=${headers} ... expected_status=any diff --git a/resources/ApiUtils/ContextSourceRegistration.resource b/resources/ApiUtils/ContextSourceRegistration.resource index e4d2d98e3028518b3397a458a551a3f0a9d728f0..cdf9179305ad1f4b761f8fda92ff6e3876724c7c 100755 --- a/resources/ApiUtils/ContextSourceRegistration.resource +++ b/resources/ApiUtils/ContextSourceRegistration.resource @@ -31,9 +31,11 @@ Prepare Context Source Registration From File ... ${entity_id_pattern}=${EMPTY} ... ${mode}=${EMPTY} ... ${endpoint}=${EMPTY} + ... ${broker_url}=${EMPTY} ... ${operations}=[] ${payload}= Load JSON From File ${EXECDIR}/data/${registration_file} + ${final_context_source_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${context_source_url} ${registration_payload}= Update Value To JSON ... ${payload} ... $.id @@ -41,7 +43,7 @@ Prepare Context Source Registration From File ${registration_payload}= Update Value To JSON ... ${registration_payload} ... $..endpoint - ... ${context_source_url}${endpoint} + ... ${final_context_source_url}${endpoint} IF '${entity_id}' != '' ${dict}= Create Dictionary id=${entity_id} ${registration_payload}= Add Object To JSON @@ -85,8 +87,9 @@ Create Context Source Registration RETURN ${response} Create Context Source Registration With Return - [Arguments] ${payload} ${content_type}=${CONTENT_TYPE_LD_JSON} ${context}=${EMPTY} ${accept}=${EMPTY} + [Arguments] ${payload} ${content_type}=${CONTENT_TYPE_LD_JSON} ${context}=${EMPTY} ${accept}=${EMPTY} ${broker_url}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} IF '${accept}'!='' Set To Dictionary ${headers} Accept=${context} END @@ -97,7 +100,7 @@ Create Context Source Registration With Return ... Link=${context_link} END ${response}= POST - ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH} + ... url=${final_url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH} ... json=${payload} ... headers=${headers} ... expected_status=any @@ -105,16 +108,18 @@ Create Context Source Registration With Return RETURN ${response} Delete Context Source Registration - [Arguments] ${context_source_registration_id} + [Arguments] ${context_source_registration_id} ${broker_url}=${EMPTY} - ${response}= DELETE url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} + ${response}= DELETE url=${final_url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${context_source_registration_id} Output ${response} Delete Context Source Registration RETURN ${response} Delete Context Source Registration With Return - [Arguments] ${registration_id} + [Arguments] ${registration_id} ${broker_url}=${EMPTY} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} ${response}= DELETE - ... url=${url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${registration_id} + ... url=${final_url}/${CONTEXT_SOURCE_REGISTRATION_ENDPOINT_PATH}/${registration_id} ... expected_status=any Output ${response} Delete Context Source Registration RETURN ${response} diff --git a/scripts/run_tests.ps1 b/scripts/run_tests.ps1 index 662e503987f4ce2a7160e98110c2ac7debde5e68..7eb53eef6bd1125c43fa02901e3b3c2478b10640 100644 --- a/scripts/run_tests.ps1 +++ b/scripts/run_tests.ps1 @@ -23,3 +23,19 @@ robot --rerunfailedsuites .\results\output.xml --outputdir .\results . # stop the suite after a failed test robot --exitonfailure --outputdir .\results . + +# run interoperability tests suite with multiple brokers +robot --variable b1_url: ` + --variable b2_url: ` + --variable b3_url: ` + --variable b4_url: ` + --variable b5_url: ` + --outputdir .\results .\TP\NGSI-LD\Interoperability\ + +# run specific interoperability tests suite with multiple brokers +robot --variable b1_url: ` + --variable b2_url: ` + --variable b3_url: ` + --variable b4_url: ` + --variable b5_url: ` + --outputdir .\results .\TP\NGSI-LD\Interoperability\Provision\Entities\CreateEntity\IOP_CNF_01_01.robot diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 29040e13e3a05eb2626f05ccd2842d327a083897..48d6d93e64d2e8d8872036eda86d12b939314df5 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -30,3 +30,19 @@ robot --listener libraries/ErrorListener.py --outputdir ./results ./TP/NGSI-LD/ # run all test suites and generate errors.log file with the output only of the failed test cases robot --listener libraries/ErrorListener.py --outputdir ./results . + +#run interoperability test suite with multiple brokers +robot --variable b1_url: \ + --variable b2_url: \ + --variable b3_url: \ + --variable b4_url: \ + --variable b5_url: \ + --outputdir ./results ./TP/NGSI-LD/Interoperability + +#run specific interoperability test suite with multiple brokers +robot --variable b1_url: \ + --variable b2_url: \ + --variable b3_url: \ + --variable b4_url: \ + --variable b5_url: \ + --outputdir ./results ./TP/NGSI-LD/Interoperability/Provision/Entities/CreateEntity/IOP_CNF_01_01.robot