From a337515ea418beb0e1dc6bb4ed40c7374a277dd7 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 5 Feb 2026 17:33:56 +0100 Subject: [PATCH 01/10] feat: add new test cases and resources --- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 80 +++++++++++++++++++ ...ext-source-registration-exclusive-2.jsonld | 22 +++++ ...ext-source-registration-inclusive-2.jsonld | 22 +++++ .../offstreet-parking1-full.jsonld | 45 +++++++++++ .../offstreet-parking2-full.jsonld | 45 +++++++++++ .../ContextInformationConsumption.resource | 4 +- .../ContextInformationProvision.resource | 10 ++- .../ContextSourceRegistration.resource | 19 +++-- 8 files changed, 235 insertions(+), 12 deletions(-) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_01.robot create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld create mode 100644 data/entities/interoperability/offstreet-parking1-full.jsonld create mode 100644 data/entities/interoperability/offstreet-parking2-full.jsonld 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 00000000..71ab2fa6 --- /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 The 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 by Id ${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 by Id ${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/data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-2.jsonld new file mode 100644 index 00000000..fdc4730a --- /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-inclusive-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-2.jsonld new file mode 100644 index 00000000..4f835c57 --- /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/entities/interoperability/offstreet-parking1-full.jsonld b/data/entities/interoperability/offstreet-parking1-full.jsonld new file mode 100644 index 00000000..c35bf599 --- /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-parking2-full.jsonld b/data/entities/interoperability/offstreet-parking2-full.jsonld new file mode 100644 index 00000000..0708f5e7 --- /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/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index a80e892a..1036917b 100755 --- a/resources/ApiUtils/ContextInformationConsumption.resource +++ b/resources/ApiUtils/ContextInformationConsumption.resource @@ -244,9 +244,11 @@ Retrieve Entity by Id ... ${context}=${EMPTY} ... ${local}=${EMPTY} ... ${options}=${EMPTY} + ... ${broker_url}=${EMPTY} ${headers}= Create Dictionary &{params}= Create Dictionary ${options_length}= Get Length ${options} + ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} Set To Dictionary ${headers} Accept ${accept} IF '${context}'!='' ${context_link}= Build Context Link ${context} @@ -259,7 +261,7 @@ Retrieve Entity by Id Set To Dictionary ${params} options=${options} END ${response}= GET - ... url=${url}/${ENTITIES_ENDPOINT_PATH}${id} + ... url=${final_url}/${ENTITIES_ENDPOINT_PATH}${id} ... headers=${headers} ... params=${params} ... expected_status=any diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index a38e9d8b..6c259c50 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 e4d2d98e..cdf91793 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} -- GitLab From f90bcb79878167070c00aa4778abaf58baf00e25 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 15:24:30 +0100 Subject: [PATCH 02/10] feat: add new interoperability test --- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 78 +++++++++++++++++++ .../offstreet-parking2-no-location.jsonld | 35 +++++++++ 2 files changed, 113 insertions(+) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_01_02.robot create mode 100644 data/entities/interoperability/offstreet-parking2-no-location.jsonld 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 00000000..15116f0d --- /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 The 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 by Id ${entity_id} broker_url=${b1_url} + Check Response Status Code 200 ${response.status_code} + + ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b2_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} + ${second_expected_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity by Id ${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/data/entities/interoperability/offstreet-parking2-no-location.jsonld b/data/entities/interoperability/offstreet-parking2-no-location.jsonld new file mode 100644 index 00000000..ef528b81 --- /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 -- GitLab From 67aa3673e46bcb90c18f4809de6ac235aabfb22f Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 16:06:29 +0100 Subject: [PATCH 03/10] feat: add new test and data for interoperability operation --- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 2 +- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 2 +- .../Entity/RetrieveEntity/IOP_CNF_02_01.robot | 96 +++++++++++++++++++ ...text-source-registration-redirect-2.jsonld | 21 ++++ .../offstreet-parking1-no-location.jsonld | 35 +++++++ 5 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_01.robot create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld create mode 100644 data/entities/interoperability/offstreet-parking1-no-location.jsonld 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 index 71ab2fa6..619fa8da 100644 --- 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 @@ -21,7 +21,7 @@ ${b2_url} ${b3_url} *** Test Cases *** -IOP_CNF_01_01 Retrieve Entities In The Different Brokers +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 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 index 15116f0d..39f98357 100644 --- 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 @@ -21,7 +21,7 @@ ${b2_url} ${b3_url} *** Test Cases *** -IOP_CNF_01_02 Retrieve Entities In The Different Brokers +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 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 00000000..23c433fb --- /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 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-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 by Id ${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 by Id ${entity_id} broker_url=${b2_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity by Id ${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/data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-2.jsonld new file mode 100644 index 00000000..2cc6e981 --- /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/entities/interoperability/offstreet-parking1-no-location.jsonld b/data/entities/interoperability/offstreet-parking1-no-location.jsonld new file mode 100644 index 00000000..b15ef9d7 --- /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 -- GitLab From 728e7620067034ca09e80e252dfda71ff8a7b6d0 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 16:51:27 +0100 Subject: [PATCH 04/10] feat: new test for interoperability with four brokers --- .../Entity/RetrieveEntity/IOP_CNF_02_01.robot | 2 +- .../Entity/RetrieveEntity/IOP_CNF_02_02.robot | 91 +++++++++++++++++++ ...ffstreet-parking1-location-and-name.jsonld | 33 +++++++ 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_02_02.robot create mode 100644 data/entities/interoperability/offstreet-parking1-location-and-name.jsonld 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 index 23c433fb..cd2259c4 100644 --- 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 @@ -1,5 +1,5 @@ *** Settings *** -Documentation Verify that the b1 broker can retrieve some attribute of an entity and that the b2 broker can retrieve the full entity. +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 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 00000000..cfc6389e --- /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 by Id ${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 by Id ${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/data/entities/interoperability/offstreet-parking1-location-and-name.jsonld b/data/entities/interoperability/offstreet-parking1-location-and-name.jsonld new file mode 100644 index 00000000..6ec58ac6 --- /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 -- GitLab From 75f4830d7ebd97f1e0898b8e659bfcc9d38721d9 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 17:24:34 +0100 Subject: [PATCH 05/10] feat: new interoperability test and data --- .../Entity/RetrieveEntity/IOP_CNF_03_01.robot | 99 +++++++++++++++++++ ...ext-source-registration-auxiliary-2.jsonld | 22 +++++ ...ext-source-registration-inclusive-1.jsonld | 18 ++++ 3 files changed, 139 insertions(+) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_01.robot create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld 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 00000000..eaf13d2a --- /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 by Id ${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 by Id ${entity_id} broker_url=${b1_url} local=true + ${first_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b2_url} local=true + ${second_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${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/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-auxiliary-2.jsonld new file mode 100644 index 00000000..1d037309 --- /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-inclusive-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-inclusive-1.jsonld new file mode 100644 index 00000000..42145ec1 --- /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 -- GitLab From 021aeebeb509aab68cfdbee9595b331099a6106b Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 17:38:03 +0100 Subject: [PATCH 06/10] feat: add new test for interoperability tcs --- .../Entity/RetrieveEntity/IOP_CNF_03_02.robot | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_03_02.robot 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 00000000..b150d970 --- /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 by Id ${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 by Id ${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 -- GitLab From 685bd23845b180edad89573723e40cefaa5658ff Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 10 Feb 2026 17:58:54 +0100 Subject: [PATCH 07/10] feat: add new interoperability test with five brokers --- .../Entity/RetrieveEntity/IOP_CNF_04_01.robot | 118 ++++++++++++++++++ ...ext-source-registration-exclusive-1.jsonld | 21 ++++ ...text-source-registration-redirect-1.jsonld | 18 +++ 3 files changed, 157 insertions(+) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_01.robot create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld 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 00000000..c712e900 --- /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 by Id ${entity_id} broker_url=${b1_url} + Check Response Status Code 200 ${response.status_code} + ${actual_payload}= Set To Dictionary ${response.json()} + + ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b4_url} + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${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/data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-1.jsonld new file mode 100644 index 00000000..f11d58de --- /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-redirect-1.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-1.jsonld new file mode 100644 index 00000000..754d1c63 --- /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 -- GitLab From 2dcc7662f1b74862ea426e0728259a85d7f89e40 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Thu, 12 Feb 2026 11:30:34 +0100 Subject: [PATCH 08/10] feat: implement new interoperabilty test and relative files --- .../Entity/RetrieveEntity/IOP_CNF_04_02.robot | 132 ++++++++++++++++++ ...ext-source-registration-auxiliary-1.jsonld | 18 +++ ...ext-source-registration-exclusive-3.jsonld | 23 +++ ...text-source-registration-redirect-3.jsonld | 23 +++ 4 files changed, 196 insertions(+) create mode 100644 TP/NGSI-LD/Interoperability/Consumption/Entity/RetrieveEntity/IOP_CNF_04_02.robot create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-auxiliary-1.jsonld create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld create mode 100644 data/csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld 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 00000000..5cacf6e7 --- /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 by Id ${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 by Id ${entity_id} broker_url=${b2_url} local=true + ${first_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} local=true + ${second_expected_payload}= Set To Dictionary ${response.json()} + ${response}= Retrieve Entity by Id ${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 00000000..d5dabec6 --- /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-exclusive-3.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-exclusive-3.jsonld new file mode 100644 index 00000000..d137f7b4 --- /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-redirect-3.jsonld b/data/csourceRegistrations/interoperability/context-source-registration-redirect-3.jsonld new file mode 100644 index 00000000..44e537ca --- /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 -- GitLab From dc8443441df19666434ca6608d7d3a0748933168 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 17 Feb 2026 10:39:02 +0100 Subject: [PATCH 09/10] fix: remove retrieve entity by id --- .../Entity/RetrieveEntity/IOP_CNF_01_01.robot | 4 +- .../Entity/RetrieveEntity/IOP_CNF_01_02.robot | 8 +-- .../Entity/RetrieveEntity/IOP_CNF_02_01.robot | 6 +-- .../Entity/RetrieveEntity/IOP_CNF_02_02.robot | 4 +- .../Entity/RetrieveEntity/IOP_CNF_03_01.robot | 8 +-- .../Entity/RetrieveEntity/IOP_CNF_03_02.robot | 4 +- .../Entity/RetrieveEntity/IOP_CNF_04_01.robot | 6 +-- .../Entity/RetrieveEntity/IOP_CNF_04_02.robot | 8 +-- .../ContextInformationConsumption.resource | 54 ++++++++----------- 9 files changed, 45 insertions(+), 57 deletions(-) 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 index 619fa8da..0a39d979 100644 --- 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 @@ -25,13 +25,13 @@ 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 by Id ${entity_id1} broker_url=${b1_url} context=${ngsild_test_suite_context} + ${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 by Id ${entity_id1} broker_url=${b2_url} context=${ngsild_test_suite_context} + ${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} 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 index 39f98357..db6c5078 100644 --- 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 @@ -25,15 +25,15 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} Check Response Status Code 200 ${response.status_code} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} ${second_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b2_url} + ${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] 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 index cd2259c4..8ba81698 100644 --- 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 @@ -27,15 +27,15 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b2_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} + ${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] 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 index cfc6389e..67245c69 100644 --- 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 @@ -27,12 +27,12 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b3_url} local=true + ${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] 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 index eaf13d2a..658da587 100644 --- 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 @@ -28,16 +28,16 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b1_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${b1_url} local=true ${first_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b2_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true ${second_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} local=true + ${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} 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 index b150d970..43853ddc 100644 --- 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 @@ -28,12 +28,12 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b3_url} local=true + ${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] 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 index c712e900..48b11e73 100644 --- 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 @@ -30,13 +30,13 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b4_url} + ${response}= Retrieve Entity ${entity_id} broker_url=${b4_url} ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b5_url} + ${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] 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 index 5cacf6e7..26ae7ec5 100644 --- 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 @@ -31,16 +31,16 @@ 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 by Id ${entity_id} broker_url=${b1_url} + ${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 by Id ${entity_id} broker_url=${b2_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${b2_url} local=true ${first_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b3_url} local=true + ${response}= Retrieve Entity ${entity_id} broker_url=${b3_url} local=true ${second_expected_payload}= Set To Dictionary ${response.json()} - ${response}= Retrieve Entity by Id ${entity_id} broker_url=${b5_url} local=true + ${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] diff --git a/resources/ApiUtils/ContextInformationConsumption.resource b/resources/ApiUtils/ContextInformationConsumption.resource index 1036917b..61630e71 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,37 +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} - ... ${broker_url}=${EMPTY} - ${headers}= Create Dictionary - &{params}= Create Dictionary - ${options_length}= Get Length ${options} - ${final_url}= Set Variable If '${broker_url}' != '' ${broker_url} ${url} - 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=${final_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} -- GitLab From 596c570cbc03022636938b38524dc8e2612b6208 Mon Sep 17 00:00:00 2001 From: Benedetta Arena Date: Tue, 17 Feb 2026 14:50:01 +0100 Subject: [PATCH 10/10] feat: update readme and run_tests --- README.md | 16 ++++++++++++++++ scripts/run_tests.ps1 | 16 ++++++++++++++++ scripts/run_tests.sh | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/README.md b/README.md index 354d82c9..c7e260d8 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/scripts/run_tests.ps1 b/scripts/run_tests.ps1 index 662e5039..7eb53eef 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 29040e13..48d6d93e 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 -- GitLab