From e483886f7362aba3fc94c35b58089dee9ad4da84 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 10 Jul 2024 11:13:46 +0200 Subject: [PATCH 1/8] feat: temporal pagination test --- README.md | 8 +- .../021_03.robot | 2 +- .../021_15.robot | 176 +++++ .../021_16.robot | 62 ++ .../020_05.robot | 4 +- .../020_15.robot | 52 ++ ...sentation-multiple-instances-sample.jsonld | 115 ---- ...epresentation-020-05-01-expectation.jsonld | 60 -- ...epresentation-020-05-02-expectation.jsonld | 115 ---- ...l-representation-021-03-expectation.jsonld | 100 --- ...oral-representation-sixty-instances.jsonld | 601 ++++++++++++++++++ ...ral-representation-twenty-instances.jsonld | 211 ++++++ doc/analysis/checks.py | 37 +- doc/analysis/requests.py | 8 +- .../Consumption/020_15.json | 62 ++ .../Consumption/021_15.json | 180 ++++++ .../Consumption/021_16.json | 43 ++ ...oralContextInformationConsumption.resource | 4 + resources/AssertionUtils.resource | 8 + 19 files changed, 1447 insertions(+), 401 deletions(-) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot create mode 100644 data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld create mode 100644 data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld create mode 100644 doc/files/ContextInformation/Consumption/020_15.json create mode 100644 doc/files/ContextInformation/Consumption/021_15.json create mode 100644 doc/files/ContextInformation/Consumption/021_16.json diff --git a/README.md b/README.md index e471a856..3472153e 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,13 @@ to maintain and run the selected Test Cases from the pickle file. The list of co * Switch OFF Test Collections tsm collections off [collections] - +### Specific test requirements +- Temporal pagination : + - The pagination tests assumes that it will be triggered by 1 or 2 entities with 2 attributes with 20 instances each + (40 instances) + - Non pagination tests assumes that it will **not** be triggered by 2 entities with 2 attributes with 5 instances each + (20 instances) + - You should configure your broker accordingly ## Contribute to the Test Suite In order to contribute to the ETSI NGSI-LD Test Suite, it is recommended to install an IDE with the corresponding diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot index 4d8e3885..eb3e0a5f 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -26,7 +26,7 @@ ${expectation_file}= vehicles-temporal-representation-021-03-expe ... entity_types=${entity_types_to_be_retrieved} ... timerel=after ... timeAt=2020-07-01T12:05:00Z - ... lastN=${14} + ... lastN=${4} ... context=${ngsild_test_suite_context} @{temporal_entities_representation_ids}= Create List ... ${first_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot new file mode 100644 index 00000000..059c566d --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -0,0 +1,176 @@ +*** Settings *** +Documentation Check temporal pagination behavior on multiple entity endpoint + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Retrieve Temporal Entities + + +*** Variables *** +${vehicule_id_prefix} urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${timeBefore} 2019-01-01T01:01:00Z +${timeAfter} 2021-01-01T01:01:00Z +${lrt} least recent timestamp +${mrt} most recent timestamp + + +*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +021_15_01 retrieve the entity with lastN and timerel before + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} expectedSize=20 timerel=before timeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} +021_15_02 retrieve the entity with lastN and timerel between + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} +021_15_03 retrieve the entity with lastN and timerel after + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} expectedSize=20 timerel=after timeAt=${timeBefore} expectedRangeStart=${mrt} expectedRangeEnd=${lrt} +021_15_04 retrieve the entity with timerel before + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + timerel=before expectedSize=* timeAt=${timeAfter} expectedRangeEnd=${mrt} +021_15_05 retrieve the entity with timerel between + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +021_15_06 retrieve the entity with timerel after + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +021_15_07 retrieve the entity with temporalValues and timerel after + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + representation=temporalValues timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +021_15_08 retrieve the entity with temporalValues, lastN and timerel between + [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + representation=temporalValues lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} + + +*** Keywords *** +Retrieve Temporal Entities + [Documentation] Check temporal pagination behavior on multiple entity endpoint + [Arguments] + ... ${representation}=${EMPTY} + ... ${timerel}=${EMPTY} + ... ${timeAt}=${EMPTY} + ... ${endTimeAt}=${EMPTY} + ... ${lastN}=${EMPTY} + ... ${expectedRangeStart}=${EMPTY} + ... ${expectedRangeEnd}=${EMPTY} + ... ${expectedSize}=${EMPTY} + ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle + + ${response}= Query Temporal Representation Of Entities + ... entity_types=${entity_types_to_be_retrieved} + ... options=${representation} + ... context=${ngsild_test_suite_context} + ... timerel=${timerel} + ... timeAt=${timeAt} + ... endTimeAt=${endTimeAt} + ... lastN=${lastN} + Check Response Status Code 206 ${response.status_code} + + ${contentRange}= Get Regexp Matches + ... ${response.headers}[Content-Range] + ... ([a-zA-Z\-]+) (.*-.*-.*)-(.*-.*-.*)\/(.*) + ... 1 + ... 2 + ... 3 + ... 4 + ${unit}= Set Variable ${contentRange}[0][0] + ${rangeStart}= Convert Date ${contentRange}[0][1] + ${rangeEnd}= Convert Date ${contentRange}[0][2] + ${size}= Set Variable ${contentRange}[0][3] + + Check Content Range Part Equal ${unit} date-time + + IF $expectedRangeStart != '' + IF $expectedRangeStart == $lrt + ${expectedRangeStart}= Get Least Recent Timestamp From Vehicles ${response.json()} + ELSE IF $expectedRangeStart == $mrt + ${expectedRangeStart}= Get Most Recent Timestamp From Vehicles ${response.json()} + ELSE + ${expectedRangeStart}= Convert Date ${expectedRangeStart} + END + Check Content Range Part Equal ${expectedRangeStart} ${rangeStart} + END + + IF $expectedRangeEnd != '' + IF $expectedRangeEnd == $lrt + ${expectedRangeEnd}= Get Least Recent Timestamp From Vehicles + ... ${response.json()} + ... ${representation} + ELSE IF $expectedRangeEnd == $mrt + ${expectedRangeEnd}= Get Most Recent Timestamp From Vehicles + ... ${response.json()} + ... ${representation} + ELSE + ${expectedRangeEnd}= Convert Date ${expectedRangeEnd} + END + Check Content Range Part Equal ${expectedRangeEnd} ${rangeEnd} + END + + IF $expectedSize != '' + Check Content Range Part Equal ${expectedSize} ${size} + END + +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity + ... ${first_vehicle_payload_file} + ... ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity + ... ${second_vehicle_payload_file} + ... ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} + +Get Least Recent Timestamp From Vehicles + [Arguments] ${body} ${representation}=${EMPTY} + + ${attributeList}= Combine Lists + ... ${body}[0][speed] + ... ${body}[0][fuelLevel] + ... ${body}[1][speed] + ... ${body}[1][fuelLevel] + ${leastRecentTimestamp}= Convert Date ${timeAfter} + FOR ${attribute} IN @{attributeList} + IF $representation == 'temporalValues' + ${attributeTime}= Convert Date ${attribute}[1] + ELSE + ${attributeTime}= Convert Date ${attribute}[observedAt] + END + + IF $leastRecentTimestamp >= $attributeTime + ${leastRecentTimestamp}= Set Variable ${attributeTime} + END + END + RETURN ${leastRecentTimestamp} + +Get Most Recent Timestamp From Vehicles + [Arguments] ${body} ${representation}=${EMPTY} + ${attributeList}= Combine Lists + ... ${body}[0][speed] + ... ${body}[0][fuelLevel] + ... ${body}[1][speed] + ... ${body}[1][fuelLevel] + + ${mostRecentTimestamp}= Convert Date ${timeBefore} + FOR ${attribute} IN @{attributeList} + IF $representation == 'temporalValues' + ${attributeTime}= Convert Date ${attribute}[1] + ELSE + ${attributeTime}= Convert Date ${attribute}[observedAt] + END + IF $mostRecentTimestamp <= $attributeTime + ${mostRecentTimestamp}= Set Variable ${attributeTime} + END + END + RETURN ${mostRecentTimestamp} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot new file mode 100644 index 00000000..1cb80e0e --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -0,0 +1,62 @@ +*** Settings *** +Documentation Check that temporal pagination is triggered on the post temporal query + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Retrieve Temporal Entities Via Post + + +*** Variables *** +${vehicule_id_prefix} urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld + + +*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +021_16_01 retrieve the entities via post + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + entity-operations-before-query.jsonld + + +*** Keywords *** +Retrieve Temporal Entities Via Post + [Documentation] Check that temporal pagination is triggered on the post temporal query + [Arguments] ${payload_file} + + ${response}= Query Temporal Representation Of Entities Via Post + ... query_file_name=${payload_file} + ... context=${ngsild_test_suite_context} + + Check Response Status Code 206 ${response.status_code} + + ${contentRange}= Get Regexp Matches + ... ${response.headers}[Content-Range] + ... ([a-zA-Z\-]+) (.*-.*-.*)-(.*-.*-.*)\/(.*) + ... 1 + ... 2 + ... 3 + ... 4 + ${unit}= Set Variable ${contentRange}[0][0] + + Check Content Range Part Equal ${unit} date-time + +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity + ... ${first_vehicle_payload_file} + ... ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity + ... ${second_vehicle_payload_file} + ... ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot index 9375ae08..086647d7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -19,10 +19,10 @@ ${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-multiple-in *** Test Cases *** LASTN VEHICLE_EXPECTATION_FILE 020_05_01 Retrieve Some Instances [Tags] te-retrieve 5_7_3 - ${10} vehicle-temporal-representation-020-05-01-expectation.jsonld + ${4} vehicle-temporal-representation-020-05-01-expectation.jsonld 020_05_02 Retrieve All Instances [Tags] te-retrieve 5_7_3 - ${20} vehicle-temporal-representation-020-05-02-expectation.jsonld + ${7} vehicle-temporal-representation-020-05-02-expectation.jsonld *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot new file mode 100644 index 00000000..dedeb61d --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that the time range cut before the second attribute to avoid missing data in content-range + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Create Temporal Entity +Suite Teardown Delete Initial Temporal Entity +Test Template Retrieve Temporal Entity + + +*** Variables *** +${vehicule_id_prefix} urn:ngsi-ld:Vehicle: +${vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld +${timeBefore} 2019-01-01T01:01:00Z +${timeAfter} 2021-01-01T01:01:00Z + + +*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +020_15_01 retrieve an entity with 60 instances of unsynchronized attributes + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + timerel=after timeAt=${timeBefore} emptyAttr=fuelLevel +020_15_02 retrieve the entity with lastN + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + lastN=${100} timerel=before timeAt=${timeAfter} emptyAttr=speed + + +*** Keywords *** +Retrieve Temporal Entity + [Documentation] Check that the time range cut before the second attribute + [Arguments] + ... ${timerel} + ... ${timeAt} + ... ${emptyAttr} + ... ${lastN}=${EMPTY} + ${response}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... context=${ngsild_test_suite_context} + ... timerel=${timerel} + ... timeAt=${timeAt} + ... lastN=${lastN} + Check Data Is Empty ${response.json()}[${emptyAttr}] + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld b/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld index b25b175d..93a5a0fc 100644 --- a/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld +++ b/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld @@ -2,61 +2,6 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "speed":[ - { - "type":"Property", - "value":120, - "observedAt":"2020-08-01T12:03:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:05:00Z" - }, - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:07:00Z" - }, - { - "type":"Property", - "value":110, - "observedAt":"2020-08-01T12:09:00Z" - }, - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:11:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:13:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:15:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T12:17:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:19:00Z" - }, - { - "type":"Property", - "value":60, - "observedAt":"2020-08-01T12:21:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:23:00Z" - }, { "type":"Property", "value":85, @@ -84,66 +29,6 @@ } ], "fuelLevel":[ - { - "type":"Property", - "value":67, - "observedAt":"2020-08-01T12:03:00Z" - }, - { - "type":"Property", - "value":53, - "observedAt":"2020-08-01T13:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T14:07:00Z" - }, - { - "type":"Property", - "value":35, - "observedAt":"2020-08-01T14:20:00Z" - }, - { - "type":"Property", - "value":30, - "observedAt":"2020-08-01T15:05:00Z" - }, - { - "type":"Property", - "value":85, - "observedAt":"2020-08-01T15:07:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T15:20:00Z" - }, - { - "type":"Property", - "value":76, - "observedAt":"2020-08-01T16:05:00Z" - }, - { - "type":"Property", - "value":70, - "observedAt":"2020-08-01T17:07:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T18:03:00Z" - }, - { - "type":"Property", - "value":48, - "observedAt":"2020-08-01T19:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T19:07:00Z" - }, { "type":"Property", "value":35, diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld index 0c5cf14a..e00fcbf6 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld @@ -2,36 +2,6 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "fuelLevel":[ - { - "type":"Property", - "value":76, - "observedAt":"2020-08-01T16:05:00Z" - }, - { - "type":"Property", - "value":70, - "observedAt":"2020-08-01T17:07:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T18:03:00Z" - }, - { - "type":"Property", - "value":48, - "observedAt":"2020-08-01T19:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T19:07:00Z" - }, - { - "type":"Property", - "value":35, - "observedAt":"2020-08-01T20:05:00Z" - }, { "type":"Property", "value":31, @@ -54,36 +24,6 @@ } ], "speed":[ - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:15:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T12:17:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:19:00Z" - }, - { - "type":"Property", - "value":60, - "observedAt":"2020-08-01T12:21:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:23:00Z" - }, - { - "type":"Property", - "value":85, - "observedAt":"2020-08-01T12:25:00Z" - }, { "type":"Property", "value":105, diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld index 421a6ae7..cf5c87e5 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld @@ -2,66 +2,6 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "fuelLevel":[ - { - "type":"Property", - "value":67, - "observedAt":"2020-08-01T12:03:00Z" - }, - { - "type":"Property", - "value":53, - "observedAt":"2020-08-01T13:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T14:07:00Z" - }, - { - "type":"Property", - "value":35, - "observedAt":"2020-08-01T14:20:00Z" - }, - { - "type":"Property", - "value":30, - "observedAt":"2020-08-01T15:05:00Z" - }, - { - "type":"Property", - "value":85, - "observedAt":"2020-08-01T15:07:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T15:20:00Z" - }, - { - "type":"Property", - "value":76, - "observedAt":"2020-08-01T16:05:00Z" - }, - { - "type":"Property", - "value":70, - "observedAt":"2020-08-01T17:07:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T18:03:00Z" - }, - { - "type":"Property", - "value":48, - "observedAt":"2020-08-01T19:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T19:07:00Z" - }, { "type":"Property", "value":35, @@ -89,61 +29,6 @@ } ], "speed":[ - { - "type":"Property", - "value":120, - "observedAt":"2020-08-01T12:03:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:05:00Z" - }, - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:07:00Z" - }, - { - "type":"Property", - "value":110, - "observedAt":"2020-08-01T12:09:00Z" - }, - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:11:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:13:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:15:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T12:17:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:19:00Z" - }, - { - "type":"Property", - "value":60, - "observedAt":"2020-08-01T12:21:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:23:00Z" - }, { "type":"Property", "value":85, diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld index a864acbf..d7af771b 100644 --- a/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld @@ -3,56 +3,6 @@ "id":"urn:ngsi-ld:Vehicle:randomUUID", "type":"Vehicle", "speed":[ - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:07:00Z" - }, - { - "type":"Property", - "value":110, - "observedAt":"2020-08-01T12:09:00Z" - }, - { - "type":"Property", - "value":100, - "observedAt":"2020-08-01T12:11:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:13:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:15:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T12:17:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T12:19:00Z" - }, - { - "type":"Property", - "value":60, - "observedAt":"2020-08-01T12:21:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T12:23:00Z" - }, - { - "type":"Property", - "value":85, - "observedAt":"2020-08-01T12:25:00Z" - }, { "type":"Property", "value":105, @@ -75,56 +25,6 @@ } ], "fuelLevel":[ - { - "type":"Property", - "value":35, - "observedAt":"2020-08-01T14:20:00Z" - }, - { - "type":"Property", - "value":30, - "observedAt":"2020-08-01T15:05:00Z" - }, - { - "type":"Property", - "value":85, - "observedAt":"2020-08-01T15:07:00Z" - }, - { - "type":"Property", - "value":80, - "observedAt":"2020-08-01T15:20:00Z" - }, - { - "type":"Property", - "value":76, - "observedAt":"2020-08-01T16:05:00Z" - }, - { - "type":"Property", - "value":70, - "observedAt":"2020-08-01T17:07:00Z" - }, - { - "type":"Property", - "value":50, - "observedAt":"2020-08-01T18:03:00Z" - }, - { - "type":"Property", - "value":48, - "observedAt":"2020-08-01T19:05:00Z" - }, - { - "type":"Property", - "value":40, - "observedAt":"2020-08-01T19:07:00Z" - }, - { - "type":"Property", - "value":35, - "observedAt":"2020-08-01T20:05:00Z" - }, { "type":"Property", "value":31, diff --git a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld new file mode 100644 index 00000000..478db69c --- /dev/null +++ b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld @@ -0,0 +1,601 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "speed":[ + { + "type":"Property", + "value":1, + "observedAt":"2020-01-01T01:01:00Z" + }, + { + "type":"Property", + "value":2, + "observedAt":"2020-01-01T01:02:00Z" + }, + { + "type":"Property", + "value":3, + "observedAt":"2020-01-01T01:03:00Z" + }, + { + "type":"Property", + "value":4, + "observedAt":"2020-01-01T01:04:00Z" + }, + { + "type":"Property", + "value":5, + "observedAt":"2020-01-01T01:05:00Z" + }, + { + "type":"Property", + "value":6, + "observedAt":"2020-01-01T01:06:00Z" + }, + { + "type":"Property", + "value":7, + "observedAt":"2020-01-01T01:07:00Z" + }, + { + "type":"Property", + "value":8, + "observedAt":"2020-01-01T01:08:00Z" + }, + { + "type":"Property", + "value":9, + "observedAt":"2020-01-01T01:09:00Z" + }, + { + "type":"Property", + "value":10, + "observedAt":"2020-01-01T01:10:00Z" + }, + { + "type":"Property", + "value":11, + "observedAt":"2020-01-01T01:11:00Z" + }, + { + "type":"Property", + "value":12, + "observedAt":"2020-01-01T01:12:00Z" + }, + { + "type":"Property", + "value":13, + "observedAt":"2020-01-01T01:13:00Z" + }, + { + "type":"Property", + "value":14, + "observedAt":"2020-01-01T01:14:00Z" + }, + { + "type":"Property", + "value":15, + "observedAt":"2020-01-01T01:15:00Z" + }, + { + "type":"Property", + "value":16, + "observedAt":"2020-01-01T01:16:00Z" + }, + { + "type":"Property", + "value":17, + "observedAt":"2020-01-01T01:17:00Z" + }, + { + "type":"Property", + "value":18, + "observedAt":"2020-01-01T01:18:00Z" + }, + { + "type":"Property", + "value":19, + "observedAt":"2020-01-01T01:19:00Z" + }, + { + "type":"Property", + "value":20, + "observedAt":"2020-01-01T01:20:00Z" + }, + { + "type":"Property", + "value":21, + "observedAt":"2020-01-01T01:21:00Z" + }, + { + "type":"Property", + "value":22, + "observedAt":"2020-01-01T01:22:00Z" + }, + { + "type":"Property", + "value":23, + "observedAt":"2020-01-01T01:23:00Z" + }, + { + "type":"Property", + "value":24, + "observedAt":"2020-01-01T01:24:00Z" + }, + { + "type":"Property", + "value":25, + "observedAt":"2020-01-01T01:25:00Z" + }, + { + "type":"Property", + "value":26, + "observedAt":"2020-01-01T01:26:00Z" + }, + { + "type":"Property", + "value":27, + "observedAt":"2020-01-01T01:27:00Z" + }, + { + "type":"Property", + "value":28, + "observedAt":"2020-01-01T01:28:00Z" + }, + { + "type":"Property", + "value":29, + "observedAt":"2020-01-01T01:29:00Z" + }, + { + "type":"Property", + "value":30, + "observedAt":"2020-01-01T01:30:00Z" + }, + { + "type":"Property", + "value":31, + "observedAt":"2020-01-01T01:31:00Z" + }, + { + "type":"Property", + "value":32, + "observedAt":"2020-01-01T01:32:00Z" + }, + { + "type":"Property", + "value":33, + "observedAt":"2020-01-01T01:33:00Z" + }, + { + "type":"Property", + "value":34, + "observedAt":"2020-01-01T01:34:00Z" + }, + { + "type":"Property", + "value":35, + "observedAt":"2020-01-01T01:35:00Z" + }, + { + "type":"Property", + "value":36, + "observedAt":"2020-01-01T01:36:00Z" + }, + { + "type":"Property", + "value":37, + "observedAt":"2020-01-01T01:37:00Z" + }, + { + "type":"Property", + "value":38, + "observedAt":"2020-01-01T01:38:00Z" + }, + { + "type":"Property", + "value":39, + "observedAt":"2020-01-01T01:39:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-01-01T01:40:00Z" + }, + { + "type":"Property", + "value":41, + "observedAt":"2020-01-01T01:41:00Z" + }, + { + "type":"Property", + "value":42, + "observedAt":"2020-01-01T01:42:00Z" + }, + { + "type":"Property", + "value":43, + "observedAt":"2020-01-01T01:43:00Z" + }, + { + "type":"Property", + "value":44, + "observedAt":"2020-01-01T01:44:00Z" + }, + { + "type":"Property", + "value":45, + "observedAt":"2020-01-01T01:45:00Z" + }, + { + "type":"Property", + "value":46, + "observedAt":"2020-01-01T01:46:00Z" + }, + { + "type":"Property", + "value":47, + "observedAt":"2020-01-01T01:47:00Z" + }, + { + "type":"Property", + "value":48, + "observedAt":"2020-01-01T01:48:00Z" + }, + { + "type":"Property", + "value":49, + "observedAt":"2020-01-01T01:49:00Z" + }, + { + "type":"Property", + "value":50, + "observedAt":"2020-01-01T01:50:00Z" + }, + { + "type":"Property", + "value":51, + "observedAt":"2020-01-01T01:51:00Z" + }, + { + "type":"Property", + "value":52, + "observedAt":"2020-01-01T01:52:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-01-01T01:53:00Z" + }, + { + "type":"Property", + "value":54, + "observedAt":"2020-01-01T01:54:00Z" + }, + { + "type":"Property", + "value":55, + "observedAt":"2020-01-01T01:55:00Z" + }, + { + "type":"Property", + "value":56, + "observedAt":"2020-01-01T01:56:00Z" + }, + { + "type":"Property", + "value":57, + "observedAt":"2020-01-01T01:57:00Z" + }, + { + "type":"Property", + "value":58, + "observedAt":"2020-01-01T01:58:00Z" + }, + { + "type":"Property", + "value":59, + "observedAt":"2020-01-01T01:59:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":1, + "observedAt":"2020-01-02T01:01:00Z" + }, + { + "type":"Property", + "value":2, + "observedAt":"2020-01-02T01:02:00Z" + }, + { + "type":"Property", + "value":3, + "observedAt":"2020-01-02T01:03:00Z" + }, + { + "type":"Property", + "value":4, + "observedAt":"2020-01-02T01:04:00Z" + }, + { + "type":"Property", + "value":5, + "observedAt":"2020-01-02T01:05:00Z" + }, + { + "type":"Property", + "value":6, + "observedAt":"2020-01-02T01:06:00Z" + }, + { + "type":"Property", + "value":7, + "observedAt":"2020-01-02T01:07:00Z" + }, + { + "type":"Property", + "value":8, + "observedAt":"2020-01-02T01:08:00Z" + }, + { + "type":"Property", + "value":9, + "observedAt":"2020-01-02T01:09:00Z" + }, + { + "type":"Property", + "value":10, + "observedAt":"2020-01-02T01:10:00Z" + }, + { + "type":"Property", + "value":11, + "observedAt":"2020-01-02T01:11:00Z" + }, + { + "type":"Property", + "value":12, + "observedAt":"2020-01-02T01:12:00Z" + }, + { + "type":"Property", + "value":13, + "observedAt":"2020-01-02T01:13:00Z" + }, + { + "type":"Property", + "value":14, + "observedAt":"2020-01-02T01:14:00Z" + }, + { + "type":"Property", + "value":15, + "observedAt":"2020-01-02T01:15:00Z" + }, + { + "type":"Property", + "value":16, + "observedAt":"2020-01-02T01:16:00Z" + }, + { + "type":"Property", + "value":17, + "observedAt":"2020-01-02T01:17:00Z" + }, + { + "type":"Property", + "value":18, + "observedAt":"2020-01-02T01:18:00Z" + }, + { + "type":"Property", + "value":19, + "observedAt":"2020-01-02T01:19:00Z" + }, + { + "type":"Property", + "value":20, + "observedAt":"2020-01-02T01:20:00Z" + }, + { + "type":"Property", + "value":21, + "observedAt":"2020-01-02T01:21:00Z" + }, + { + "type":"Property", + "value":22, + "observedAt":"2020-01-02T01:22:00Z" + }, + { + "type":"Property", + "value":23, + "observedAt":"2020-01-02T01:23:00Z" + }, + { + "type":"Property", + "value":24, + "observedAt":"2020-01-02T01:24:00Z" + }, + { + "type":"Property", + "value":25, + "observedAt":"2020-01-02T01:25:00Z" + }, + { + "type":"Property", + "value":26, + "observedAt":"2020-01-02T01:26:00Z" + }, + { + "type":"Property", + "value":27, + "observedAt":"2020-01-02T01:27:00Z" + }, + { + "type":"Property", + "value":28, + "observedAt":"2020-01-02T01:28:00Z" + }, + { + "type":"Property", + "value":29, + "observedAt":"2020-01-02T01:29:00Z" + }, + { + "type":"Property", + "value":30, + "observedAt":"2020-01-02T01:30:00Z" + }, + { + "type":"Property", + "value":31, + "observedAt":"2020-01-02T01:31:00Z" + }, + { + "type":"Property", + "value":32, + "observedAt":"2020-01-02T01:32:00Z" + }, + { + "type":"Property", + "value":33, + "observedAt":"2020-01-02T01:33:00Z" + }, + { + "type":"Property", + "value":34, + "observedAt":"2020-01-02T01:34:00Z" + }, + { + "type":"Property", + "value":35, + "observedAt":"2020-01-02T01:35:00Z" + }, + { + "type":"Property", + "value":36, + "observedAt":"2020-01-02T01:36:00Z" + }, + { + "type":"Property", + "value":37, + "observedAt":"2020-01-02T01:37:00Z" + }, + { + "type":"Property", + "value":38, + "observedAt":"2020-01-02T01:38:00Z" + }, + { + "type":"Property", + "value":39, + "observedAt":"2020-01-02T01:39:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-01-02T01:40:00Z" + }, + { + "type":"Property", + "value":41, + "observedAt":"2020-01-02T01:41:00Z" + }, + { + "type":"Property", + "value":42, + "observedAt":"2020-01-02T01:42:00Z" + }, + { + "type":"Property", + "value":43, + "observedAt":"2020-01-02T01:43:00Z" + }, + { + "type":"Property", + "value":44, + "observedAt":"2020-01-02T01:44:00Z" + }, + { + "type":"Property", + "value":45, + "observedAt":"2020-01-02T01:45:00Z" + }, + { + "type":"Property", + "value":46, + "observedAt":"2020-01-02T01:46:00Z" + }, + { + "type":"Property", + "value":47, + "observedAt":"2020-01-02T01:47:00Z" + }, + { + "type":"Property", + "value":48, + "observedAt":"2020-01-02T01:48:00Z" + }, + { + "type":"Property", + "value":49, + "observedAt":"2020-01-02T01:49:00Z" + }, + { + "type":"Property", + "value":50, + "observedAt":"2020-01-02T01:50:00Z" + }, + { + "type":"Property", + "value":51, + "observedAt":"2020-01-02T01:51:00Z" + }, + { + "type":"Property", + "value":52, + "observedAt":"2020-01-02T01:52:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-01-02T01:53:00Z" + }, + { + "type":"Property", + "value":54, + "observedAt":"2020-01-02T01:54:00Z" + }, + { + "type":"Property", + "value":55, + "observedAt":"2020-01-02T01:55:00Z" + }, + { + "type":"Property", + "value":56, + "observedAt":"2020-01-02T01:56:00Z" + }, + { + "type":"Property", + "value":57, + "observedAt":"2020-01-02T01:57:00Z" + }, + { + "type":"Property", + "value":58, + "observedAt":"2020-01-02T01:58:00Z" + }, + { + "type":"Property", + "value":59, + "observedAt":"2020-01-02T01:59:00Z" + } + ], + "@context":[ + "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld new file mode 100644 index 00000000..f1b24572 --- /dev/null +++ b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld @@ -0,0 +1,211 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "speed":[ + { + "type":"Property", + "value":1, + "observedAt":"2020-01-01T01:01:00Z" + }, + { + "type":"Property", + "value":2, + "observedAt":"2020-01-01T01:02:00Z" + }, + { + "type":"Property", + "value":3, + "observedAt":"2020-01-01T01:03:00Z" + }, + { + "type":"Property", + "value":4, + "observedAt":"2020-01-01T01:04:00Z" + }, + { + "type":"Property", + "value":5, + "observedAt":"2020-01-01T01:05:00Z" + }, + { + "type":"Property", + "value":6, + "observedAt":"2020-01-01T01:06:00Z" + }, + { + "type":"Property", + "value":7, + "observedAt":"2020-01-01T01:07:00Z" + }, + { + "type":"Property", + "value":8, + "observedAt":"2020-01-01T01:08:00Z" + }, + { + "type":"Property", + "value":9, + "observedAt":"2020-01-01T01:09:00Z" + }, + { + "type":"Property", + "value":10, + "observedAt":"2020-01-01T01:10:00Z" + }, + { + "type":"Property", + "value":11, + "observedAt":"2020-01-01T01:11:00Z" + }, + { + "type":"Property", + "value":12, + "observedAt":"2020-01-01T01:12:00Z" + }, + { + "type":"Property", + "value":13, + "observedAt":"2020-01-01T01:13:00Z" + }, + { + "type":"Property", + "value":14, + "observedAt":"2020-01-01T01:14:00Z" + }, + { + "type":"Property", + "value":15, + "observedAt":"2020-01-01T01:15:00Z" + }, + { + "type":"Property", + "value":16, + "observedAt":"2020-01-01T01:16:00Z" + }, + { + "type":"Property", + "value":17, + "observedAt":"2020-01-01T01:17:00Z" + }, + { + "type":"Property", + "value":18, + "observedAt":"2020-01-01T01:18:00Z" + }, + { + "type":"Property", + "value":19, + "observedAt":"2020-01-01T01:19:00Z" + }, + { + "type":"Property", + "value":20, + "observedAt":"2020-01-01T01:20:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":1, + "observedAt":"2020-01-01T02:01:00Z" + }, + { + "type":"Property", + "value":2, + "observedAt":"2020-01-01T02:02:00Z" + }, + { + "type":"Property", + "value":3, + "observedAt":"2020-01-01T02:03:00Z" + }, + { + "type":"Property", + "value":4, + "observedAt":"2020-01-01T02:04:00Z" + }, + { + "type":"Property", + "value":5, + "observedAt":"2020-01-01T02:05:00Z" + }, + { + "type":"Property", + "value":6, + "observedAt":"2020-01-01T02:06:00Z" + }, + { + "type":"Property", + "value":7, + "observedAt":"2020-01-01T02:07:00Z" + }, + { + "type":"Property", + "value":8, + "observedAt":"2020-01-01T02:08:00Z" + }, + { + "type":"Property", + "value":9, + "observedAt":"2020-01-01T02:09:00Z" + }, + { + "type":"Property", + "value":10, + "observedAt":"2020-01-01T02:10:00Z" + }, + { + "type":"Property", + "value":11, + "observedAt":"2020-01-01T02:11:00Z" + }, + { + "type":"Property", + "value":12, + "observedAt":"2020-01-01T02:12:00Z" + }, + { + "type":"Property", + "value":13, + "observedAt":"2020-01-01T02:13:00Z" + }, + { + "type":"Property", + "value":14, + "observedAt":"2020-01-01T02:14:00Z" + }, + { + "type":"Property", + "value":15, + "observedAt":"2020-01-01T02:15:00Z" + }, + { + "type":"Property", + "value":16, + "observedAt":"2020-01-01T02:16:00Z" + }, + { + "type":"Property", + "value":17, + "observedAt":"2020-01-01T02:17:00Z" + }, + { + "type":"Property", + "value":18, + "observedAt":"2020-01-01T02:18:00Z" + }, + { + "type":"Property", + "value":19, + "observedAt":"2020-01-01T02:19:00Z" + }, + { + "type":"Property", + "value":20, + "observedAt":"2020-01-01T02:20:00Z" + } + ], + "@context":[ + "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + ] +} \ No newline at end of file diff --git a/doc/analysis/checks.py b/doc/analysis/checks.py index d0b4f7ce..cda630ac 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -143,8 +143,12 @@ class Checks: 'Check Message Contain Key': Checks.check_message_contain_key, 'Check Message Field Equal': - Checks.check_message_field_equal - } + Checks.check_message_field_equal, + 'Check Content Range Part Equal': + Checks.check_content_range_part_equal, + 'Check Data Is Empty': + Checks.check_data_is_empty + } self.args = { 'Check Response Status Code': { @@ -417,7 +421,15 @@ class Checks: 'Check Message Field Equal': { 'params': ['expected_field', 'field'], 'position': [0,1] - } + }, + 'Check Content Range Part Equal': { + 'params': ['expected_part' , 'part'], + 'position': [0, 1] + }, + 'Check Data Is Empty':{ + 'params': ['data'], + 'position': [0] + }, } @staticmethod @@ -1150,6 +1162,25 @@ class Checks: else: raise Exception(f"ERROR, Expected the field to be equal 'expected_field' but received: '{kwargs}'") + @staticmethod + def check_content_range_part_equal(kwargs: list) -> str: + if 'expected_part' in kwargs and 'part' in kwargs: + expected_part = kwargs['expected_part'] + part = kwargs['part'] + return f'Content range part {part} equals {expected_part}' + else: + raise Exception(f"ERROR, Expected 'expected_part' but received: '{kwargs}'") + + @staticmethod + def check_data_is_empty(kwargs: list) -> str: + if 'data' in kwargs : + data = kwargs['data'] + return f'data is empty : {data}' + else: + raise Exception(f"ERROR, Expected empty data but received: '{kwargs}'") + + + def get_checks(self, **kwargs) -> str: checking = None diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index 1e93fb0b..a8a6b5f7 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -61,7 +61,7 @@ class Requests: 'positions': [], 'params': ['context', 'entity_types', 'entity_ids', 'entity_id_pattern', 'ngsild_query', 'csf', 'georel', 'geometry', - 'coordinates', 'geoproperty', 'timerel', 'timeAt', + 'coordinates', 'geoproperty', 'timerel', 'timeAt', 'endTimeAt', 'attrs', 'limit', 'lastN', 'accept', 'options'] }, 'Query Temporal Representation Of Entities Via Post': { @@ -1088,7 +1088,7 @@ class Requests: # in the same position, so we make a different analysis to extract the values expected_parameters = ['context', 'entity_types', 'entity_ids', 'entity_id_pattern', 'ngsild_query', 'csf', 'georel', 'geometry', - 'coordinates', 'geoproperty', 'timerel', 'timeAt', + 'coordinates', 'geoproperty', 'timerel', 'timeAt','endTimeAt', 'attrs', 'limit', 'lastN', 'accept', 'options'] result = [x for x in kwargs if x not in expected_parameters] @@ -1124,12 +1124,13 @@ class Requests: case 'limit': response = f"{response} and\n Query Parameter: limit set to '{value}'" case 'lastN': - value = re.search(pattern=r'\d+', string=value).group() response = f"{response} and\n Query Parameter: lastN set to '{value}'" case 'accept': response = f"{response} and\n Query Parameter: accept set to '{value}'" case 'options': response = f"{response} and\n Query Parameter: options set to '{value}'" + case 'endTimeAt': + response = f"{response} and\n Query Parameter: options set to '{value}'" # If an exact match is not confirmed, this last case will be used if provided case _: @@ -1162,7 +1163,6 @@ class Requests: case 'endTimeAt': response = f"{response} and\n Query Parameter: endTimeAt set to '{value}'" case 'lastN': - value = re.search(pattern=r'\d+', string=value).group() response = f"{response} and\n Query Parameter: lastN set to '{value}'" case 'accept': response = f"{response} and\n Query Parameter: accept set to '{value}'" diff --git a/doc/files/ContextInformation/Consumption/020_15.json b/doc/files/ContextInformation/Consumption/020_15.json new file mode 100644 index 00000000..da06e131 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_15.json @@ -0,0 +1,62 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15", + "test_objective": "Check that the time range cut before the second attribute to avoid missing data in content-range", + "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", + "config_id": "", + "parent_release": "v1.5.1", + "clauses": [ + "5.7.3", + "6.3.10" + ], + "pics_selection": "", + "keywords": [ + "Retrieve Temporal Entity", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], + "teardown": "Delete Initial Temporal Entity", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "020_15_01 retrieve an entity with 60 instances of unsynchronized attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15_01", + "doc": "Check that the time range cut before the second attribute", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Temporal Representation Of Entity with data is empty : ${response.json()}[${emptyAttr}]\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_15_02 retrieve the entity with lastN", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15_02", + "doc": "Check that the time range cut before the second attribute", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Temporal Representation Of Entity with data is empty : ${response.json()}[${emptyAttr}]\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + } + ], + "permutations": [], + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_15" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_15.json b/doc/files/ContextInformation/Consumption/021_15.json new file mode 100644 index 00000000..ce0b932d --- /dev/null +++ b/doc/files/ContextInformation/Consumption/021_15.json @@ -0,0 +1,180 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15", + "test_objective": "Check temporal pagination behavior on multiple entity endpoint", + "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.4, 6.3.10", + "config_id": "", + "parent_release": "v1.5.1", + "clauses": [ + "5.7.4", + "6.3.10" + ], + "pics_selection": "", + "keywords": [ + "Retrieve Temporal Entities", + "Setup Initial Entities", + "Delete Initial Entities", + "Get Least Recent Timestamp From Vehicles", + "Get Most Recent Timestamp From Vehicles" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "021_15_01 retrieve the entity with lastN and timerel before", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_01", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_02 retrieve the entity with lastN and timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_02", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_03 retrieve the entity with lastN and timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_03", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_04 retrieve the entity with timerel before", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_04", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=before' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_05 retrieve the entity with timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_05", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=between' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_06 retrieve the entity with timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_06", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=after' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_07 retrieve the entity with temporalValues and timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_07", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_15_08 retrieve the entity with temporalValues, lastN and timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_08", + "doc": "Check temporal pagination behavior on multiple entity endpoint", + "tags": [ + "5_7_4", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + } + ], + "permutations": [ + "when" + ], + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotfile": "021_15" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_16.json b/doc/files/ContextInformation/Consumption/021_16.json new file mode 100644 index 00000000..77826141 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/021_16.json @@ -0,0 +1,43 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16", + "test_objective": "Check that temporal pagination is triggered on the post temporal query", + "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", + "config_id": "", + "parent_release": "v1.5.1", + "clauses": [ + "5.7.3", + "6.3.10" + ], + "pics_selection": "", + "keywords": [ + "Retrieve Temporal Entities Via Post", + "Setup Initial Entities", + "Delete Initial Entities" + ], + "teardown": "Delete Initial Entities", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "021_16_01 retrieve the entities via post", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16_01", + "doc": "Check that temporal pagination is triggered on the post temporal query", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entities Via Post", + "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities Via Post with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entityOperations/query'\n method set to 'POST'\n Query Temporal Representation of Entities Via POST Request: and\n Query Parameter: query_file_name set to '${payload_file}' and\n Query Parameter: Link set to '<$https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: content_type set to 'application/json'\n}", + "http_verb": "POST", + "endpoint": "temporal/entityOperations/query" + } + ], + "permutations": [], + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotfile": "021_16" +} \ No newline at end of file diff --git a/resources/ApiUtils/TemporalContextInformationConsumption.resource b/resources/ApiUtils/TemporalContextInformationConsumption.resource index 4da46170..cb32d18a 100755 --- a/resources/ApiUtils/TemporalContextInformationConsumption.resource +++ b/resources/ApiUtils/TemporalContextInformationConsumption.resource @@ -33,6 +33,7 @@ Query Temporal Representation Of Entities ... ${geoproperty}=${EMPTY} ... ${timerel}=${EMPTY} ... ${timeAt}=${EMPTY} + ... ${endTimeAt}=${EMPTY} ... ${attrs}=${EMPTY} ... ${limit}=${EMPTY} ... ${lastN}=${EMPTY} @@ -59,6 +60,9 @@ Query Temporal Representation Of Entities Set To Dictionary ${params} timerel=${timerel} END IF '${timeAt}'!='' Set To Dictionary ${params} timeAt=${timeAt} + IF '${endTimeAt}'!='' + Set To Dictionary ${params} endTimeAt=${endTimeAt} + END IF ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} IF '${lastN}'!='' Set To Dictionary ${params} lastN=${lastN} IF '${entity_id_pattern}'!='' diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 63181b6d..6bac6741 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -760,6 +760,14 @@ Check Context Response Body Containing a JSONObject with details of a Implicitly # Check that there is no other keys Check Context Detailed Information Keys ${response}[0] +Check Content Range Part Equal + [Arguments] ${expectedPart} ${part} + Should Be Equal As Strings ${expectedPart} ${part} + +Check Data Is Empty + [Arguments] ${data} + Should Be Empty ${data} + Check Messages Contain One Instance [Arguments] ${messages} Length Should Be ${messages} 1 -- GitLab From b4824f1a40b59138a516c1769972f92e1fcb9347 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 17 Jul 2024 15:47:51 +0200 Subject: [PATCH 2/8] fix: add missing file and good file numbering --- .../020_13.robot | 162 +++++++++++++ .../{020_15.robot => 020_14.robot} | 4 +- .../Consumption/020_05.json | 18 +- .../Consumption/020_13.json | 218 ++++++++++++++++++ .../Consumption/{020_15.json => 020_14.json} | 16 +- .../Consumption/021_03.json | 12 +- 6 files changed, 405 insertions(+), 25 deletions(-) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot rename TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/{020_15.robot => 020_14.robot} (95%) create mode 100644 doc/files/ContextInformation/Consumption/020_13.json rename doc/files/ContextInformation/Consumption/{020_15.json => 020_14.json} (74%) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot new file mode 100644 index 00000000..fc8c03cf --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -0,0 +1,162 @@ +*** Settings *** +Documentation Check temporal pagination behavior + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Create Temporal Entity +Suite Teardown Delete Initial Temporal Entity +Test Template Retrieve Temporal Entity + + +*** Variables *** +${vehicule_id_prefix} urn:ngsi-ld:Vehicle: +${vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${timeBefore} 2019-01-01T01:01:00Z +${timeAfter} 2021-01-01T01:01:00Z +${lrt} least recent timestamp +${mrt} most recent timestamp + + +*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +020_13_01 retrieve an entity with 20 instances on two attributes + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + ${EMPTY} expectedSize=* expectedRangeStart=${lrt} expectedRangeEnd=${mrt} +020_13_02 retrieve the entity with lastN + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} expectedSize=20 expectedRangeStart=${mrt} expectedRangeEnd=${lrt} +020_13_03 retrieve the entity with lastN and timerel before + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} expectedSize=20 timerel=before timeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} +020_13_04 retrieve the entity with lastN and timerel between + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} +020_13_05 retrieve the entity with lastN and timerel after + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + lastN=${20} expectedSize=20 timerel=after timeAt=${timeBefore} expectedRangeStart=${mrt} expectedRangeEnd=${lrt} +020_13_06 retrieve the entity with timerel before + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + timerel=before expectedSize=* timeAt=${timeAfter} expectedRangeEnd=${mrt} +020_13_07 retrieve the entity with timerel between + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +020_13_08 retrieve the entity with timerel after + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +020_13_09 retrieve the entity with temporalValues and timerel after + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + representation=temporalValues timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} +020_13_10 retrieve the entity with temporalValues, lastN and timerel between + [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + representation=temporalValues lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} + + +*** Keywords *** +Retrieve Temporal Entity + [Documentation] Check temporal pagination behavior + [Arguments] + ... ${representation}=${EMPTY} + ... ${timerel}=${EMPTY} + ... ${timeAt}=${EMPTY} + ... ${endTimeAt}=${EMPTY} + ... ${lastN}=${EMPTY} + ... ${expectedRangeStart}=${EMPTY} + ... ${expectedRangeEnd}=${EMPTY} + ... ${expectedSize}=${EMPTY} + ${response}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... options=${representation} + ... context=${ngsild_test_suite_context} + ... timerel=${timerel} + ... timeAt=${timeAt} + ... endTimeAt=${endTimeAt} + ... lastN=${lastN} + Check Response Status Code 206 ${response.status_code} + + ${contentRange}= Get Regexp Matches + ... ${response.headers}[Content-Range] + ... ([a-zA-Z\-]+) (.*-.*-.*)-(.*-.*-.*)\/(.*) + ... 1 + ... 2 + ... 3 + ... 4 + ${unit}= Set Variable ${contentRange}[0][0] + ${rangeStart}= Convert Date ${contentRange}[0][1] + ${rangeEnd}= Convert Date ${contentRange}[0][2] + ${size}= Set Variable ${contentRange}[0][3] + + Check Content Range Part Equal ${unit} date-time + + IF $expectedRangeStart != '' + IF $expectedRangeStart == $lrt + ${expectedRangeStart}= Get Least Recent Timestamp From Vehicle Body ${response.json()} + ELSE IF $expectedRangeStart == $mrt + ${expectedRangeStart}= Get Most Recent Timestamp From Vehicle Body ${response.json()} + ELSE + ${expectedRangeStart}= Convert Date ${expectedRangeStart} + END + Check Content Range Part Equal ${expectedRangeStart} ${rangeStart} + END + + IF $expectedRangeEnd != '' + IF $expectedRangeEnd == $lrt + ${expectedRangeEnd}= Get Least Recent Timestamp From Vehicle Body + ... ${response.json()} + ... ${representation} + ELSE IF $expectedRangeEnd == $mrt + ${expectedRangeEnd}= Get Most Recent Timestamp From Vehicle Body + ... ${response.json()} + ... ${representation} + ELSE + ${expectedRangeEnd}= Convert Date ${expectedRangeEnd} + END + Check Content Range Part Equal ${expectedRangeEnd} ${rangeEnd} + END + + IF $expectedSize != '' + Check Content Range Part Equal ${expectedSize} ${size} + END + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${vehicle_payload_file} ${temporal_entity_representation_id} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} + +Get Least Recent Timestamp From Vehicle Body + [Arguments] ${body} ${representation}=${EMPTY} + ${attributeList}= Combine Lists ${body}[speed] ${body}[fuelLevel] + ${leastRecentTimestamp}= Convert Date ${timeAfter} + FOR ${attribute} IN @{attributeList} + IF $representation == 'temporalValues' + ${attributeTime}= Convert Date ${attribute}[1] + ELSE + ${attributeTime}= Convert Date ${attribute}[observedAt] + END + + IF $leastRecentTimestamp >= $attributeTime + ${leastRecentTimestamp}= Set Variable ${attributeTime} + END + END + RETURN ${leastRecentTimestamp} + +Get Most Recent Timestamp From Vehicle Body + [Arguments] ${body} ${representation}=${EMPTY} + ${attributeList}= Combine Lists ${body}[speed] ${body}[fuelLevel] + + ${mostRecentTimestamp}= Convert Date ${timeBefore} + FOR ${attribute} IN @{attributeList} + IF $representation == 'temporalValues' + ${attributeTime}= Convert Date ${attribute}[1] + ELSE + ${attributeTime}= Convert Date ${attribute}[observedAt] + END + IF $mostRecentTimestamp <= $attributeTime + ${mostRecentTimestamp}= Set Variable ${attributeTime} + END + END + RETURN ${mostRecentTimestamp} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot similarity index 95% rename from TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot rename to TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot index dedeb61d..7c815779 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot @@ -19,10 +19,10 @@ ${timeAfter} 2021-01-01T01:01:00Z *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME -020_15_01 retrieve an entity with 60 instances of unsynchronized attributes +020_14_01 retrieve an entity with 60 instances of unsynchronized attributes [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 timerel=after timeAt=${timeBefore} emptyAttr=fuelLevel -020_15_02 retrieve the entity with lastN +020_14_02 retrieve the entity with lastN [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 lastN=${100} timerel=before timeAt=${timeAfter} emptyAttr=speed diff --git a/doc/files/ContextInformation/Consumption/020_05.json b/doc/files/ContextInformation/Consumption/020_05.json index b47b4651..fe907dc1 100644 --- a/doc/files/ContextInformation/Consumption/020_05.json +++ b/doc/files/ContextInformation/Consumption/020_05.json @@ -1,6 +1,6 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05", - "test_objective": "Check that you can retrieve the temporal evolution of the last N instances of entity attributes", + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05", + "test_objective": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.3", "config_id": "", "parent_release": "v1.3.1", @@ -18,8 +18,8 @@ "test_cases": [ { "name": "020_05_01 Retrieve Some Instances", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05_01", - "doc": "Check that you can retrieve the temporal evolution of the last N instances of entity attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05_01", + "doc": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "tags": [ "5_7_3", "te-retrieve" @@ -28,14 +28,14 @@ "teardown": "Delete Initial Temporal Entity", "template": "Retrieve the temporal evolution of the last N instances of entity attributes", "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-020-05-01-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '10' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '${4}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" }, { "name": "020_05_02 Retrieve All Instances", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05_02", - "doc": "Check that you can retrieve the temporal evolution of the last N instances of entity attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05_02", + "doc": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "tags": [ "5_7_3", "te-retrieve" @@ -44,7 +44,7 @@ "teardown": "Delete Initial Temporal Entity", "template": "Retrieve the temporal evolution of the last N instances of entity attributes", "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-020-05-02-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '20' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '${7}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" } @@ -53,6 +53,6 @@ "then", "when" ], - "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", "robotfile": "020_05" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_13.json b/doc/files/ContextInformation/Consumption/020_13.json new file mode 100644 index 00000000..51f0024d --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_13.json @@ -0,0 +1,218 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13", + "test_objective": "Check temporal pagination behavior", + "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", + "config_id": "", + "parent_release": "v1.5.1", + "clauses": [ + "5.7.3", + "6.3.10" + ], + "pics_selection": "", + "keywords": [ + "Retrieve Temporal Entity", + "Create Temporal Entity", + "Delete Initial Temporal Entity", + "Get Least Recent Timestamp From Vehicle Body", + "Get Most Recent Timestamp From Vehicle Body" + ], + "teardown": "Delete Initial Temporal Entity", + "initial_condition": "with {\n the SUT containing an initial state\n}", + "test_cases": [ + { + "name": "020_13_01 retrieve an entity with 20 instances on two attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_01", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_02 retrieve the entity with lastN", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_02", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_03 retrieve the entity with lastN and timerel before", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_03", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_04 retrieve the entity with lastN and timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_04", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_05 retrieve the entity with lastN and timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_05", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_06 retrieve the entity with timerel before", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_06", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'timerel=before' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_07 retrieve the entity with timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_07", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'timerel=between' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_08 retrieve the entity with timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_08", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'timerel=after' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_09 retrieve the entity with temporalValues and timerel after", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_09", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + }, + { + "name": "020_13_10 retrieve the entity with temporalValues, lastN and timerel between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_10", + "doc": "Check temporal pagination behavior", + "tags": [ + "5_7_3", + "6_3_10", + "since_v1.5.1", + "te-retrieve", + "te_pagination" + ], + "setup": null, + "teardown": null, + "template": "Retrieve Temporal Entity", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities/{temporal_entity_representation_id}" + } + ], + "permutations": [ + "when" + ], + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_13" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_15.json b/doc/files/ContextInformation/Consumption/020_14.json similarity index 74% rename from doc/files/ContextInformation/Consumption/020_15.json rename to doc/files/ContextInformation/Consumption/020_14.json index da06e131..6ddbba55 100644 --- a/doc/files/ContextInformation/Consumption/020_15.json +++ b/doc/files/ContextInformation/Consumption/020_14.json @@ -1,5 +1,5 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15", + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14", "test_objective": "Check that the time range cut before the second attribute to avoid missing data in content-range", "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", "config_id": "", @@ -18,8 +18,8 @@ "initial_condition": "with {\n the SUT containing an initial state\n}", "test_cases": [ { - "name": "020_15_01 retrieve an entity with 60 instances of unsynchronized attributes", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15_01", + "name": "020_14_01 retrieve an entity with 60 instances of unsynchronized attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14_01", "doc": "Check that the time range cut before the second attribute", "tags": [ "5_7_3", @@ -32,13 +32,13 @@ "teardown": null, "template": "Retrieve Temporal Entity", "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Temporal Representation Of Entity with data is empty : ${response.json()}[${emptyAttr}]\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" }, { - "name": "020_15_02 retrieve the entity with lastN", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_15_02", + "name": "020_14_02 retrieve the entity with lastN", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14_02", "doc": "Check that the time range cut before the second attribute", "tags": [ "5_7_3", @@ -51,12 +51,12 @@ "teardown": null, "template": "Retrieve Temporal Entity", "then": "then {\n the SUT sends a valid Response for the operation:\n Retrieve Temporal Representation Of Entity with data is empty : ${response.json()}[${emptyAttr}]\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" } ], "permutations": [], "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", - "robotfile": "020_15" + "robotfile": "020_14" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_03.json b/doc/files/ContextInformation/Consumption/021_03.json index 21060d4e..107f6bf4 100644 --- a/doc/files/ContextInformation/Consumption/021_03.json +++ b/doc/files/ContextInformation/Consumption/021_03.json @@ -1,6 +1,6 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_03", - "test_objective": "Check that you can query the temporal evolution of the last N instances of entities attributes", + "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03", + "test_objective": "Check that one can query the temporal evolution of the last N instances of entities attributes", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", "config_id": "", "parent_release": "v1.3.1", @@ -17,8 +17,8 @@ "test_cases": [ { "name": "021_03_01 Query the temporal evolution of the last N instances of entities attributes", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_03_01", - "doc": "Check that you can query the temporal evolution of the last N instances of entities attributes", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03_01", + "doc": "Check that one can query the temporal evolution of the last N instances of entities attributes", "tags": [ "5_7_4", "te-query" @@ -27,12 +27,12 @@ "teardown": null, "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-03-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' and\n Query Parameter: lastN set to '14' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' and\n Query Parameter: lastN set to '${4}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities" } ], "permutations": [], - "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", "robotfile": "021_03" } \ No newline at end of file -- GitLab From 46740afafb309edaa7d4a4722e88621e73e1625b Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 23 Jul 2024 07:19:35 +0000 Subject: [PATCH 3/8] refacto documentation text --- .../QueryTemporalEvolutionOfEntities/021_15.robot | 2 +- .../QueryTemporalEvolutionOfEntities/021_16.robot | 2 +- .../RetrieveTemporalEvolutionOfEntity/020_13.robot | 2 +- doc/analysis/requests.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot index 059c566d..4987b911 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check temporal pagination behavior on multiple entity endpoint +Documentation Check temporal pagination is applied when querying the temporal evolution of entities Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot index 1cb80e0e..dec50e75 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that temporal pagination is triggered on the post temporal query +Documentation Check temporal pagination is applied when querying the temporal evolution of entities via POST Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot index fc8c03cf..a8e56ae7 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check temporal pagination behavior +Documentation Check temporal pagination is applied when retrieving the temporal evolution of an entity Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index a8a6b5f7..fb208cec 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -1130,7 +1130,7 @@ class Requests: case 'options': response = f"{response} and\n Query Parameter: options set to '{value}'" case 'endTimeAt': - response = f"{response} and\n Query Parameter: options set to '{value}'" + response = f"{response} and\n Query Parameter: endTimeAt set to '{value}'" # If an exact match is not confirmed, this last case will be used if provided case _: -- GitLab From 7114bc1f0ff4ef003e0f862cc3e5539e1a835919 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 23 Jul 2024 12:03:39 +0200 Subject: [PATCH 4/8] fix: remove te_pagination tag and fix generated doc --- README.md | 16 ++++- .../021_15.robot | 28 ++++----- .../021_16.robot | 6 +- .../020_13.robot | 32 +++++----- .../020_14.robot | 12 ++-- doc/analysis/requests.py | 8 ++- .../Consumption/020_05.json | 10 ++-- .../Consumption/020_13.json | 54 +++++++---------- .../Consumption/020_14.json | 12 ++-- .../Consumption/021_03.json | 6 +- .../Consumption/021_15.json | 60 ++++++++----------- .../Consumption/021_16.json | 11 ++-- .../test_ContextInformation_Consumption.py | 27 +++++++++ resources/AssertionUtils.resource | 22 +++---- 14 files changed, 162 insertions(+), 142 deletions(-) diff --git a/README.md b/README.md index 3472153e..5dcee1db 100644 --- a/README.md +++ b/README.md @@ -148,8 +148,18 @@ test launch command followed by the file name. > > .venv\scripts\deactivate.bat > ``` -### Specific test requirements -- Mqtt tests (058) launch a mosquitto container with docker, thus it requires docker to be installed and running +### Specific test requirements +- Mqtt tests (058) : + - Mqtt tests launch a mosquitto container with docker thus it requires docker to be installed and running + + +- Temporal pagination (020_13, 020_14, 021_15 & 021_16) : + - The pagination tests assumes that it will be triggered by 1 or 2 entities with 2 attributes with 20 instances each + (40 instances) + - Non pagination tests assumes that it will **not** be triggered by 2 entities with 2 attributes with 5 instances each + (20 instances) + - You should configure your broker accordingly + ## Test Suite Management (tsm) @@ -361,7 +371,7 @@ In these cases, it is needed to provide the corresponding information in the Pyt in `self.description` to reference the method that pretty print the operation, and add the method that pretty prints the operation) - When a new permutation is added in an existing Test Case, run the documentation generation script - (`python doc/analysis/generateDocumentationData.py {tc_id}`) for the Test Case and copy the generated JSON file in the + (`python doc/generateDocumentationData.py {tc_id}`) for the Test Case and copy the generated JSON file in the folder containing all files for the given group and subgroup (`cp doc/results/{tc_id}.json doc/files/{group}/{subgroup}`) - When a new directory containing Test Cases is created, it has to be declared in `doc/generaterobotdata.py` along with its acronym diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot index 4987b911..59b3aa5e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -12,39 +12,39 @@ Test Template Retrieve Temporal Entities *** Variables *** -${vehicule_id_prefix} urn:ngsi-ld:Vehicle: -${first_vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld ${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld -${timeBefore} 2019-01-01T01:01:00Z -${timeAfter} 2021-01-01T01:01:00Z -${lrt} least recent timestamp -${mrt} most recent timestamp +${timeBefore}= 2019-01-01T01:01:00Z +${timeAfter}= 2021-01-01T01:01:00Z +${lrt}= least recent timestamp +${mrt}= most recent timestamp *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME 021_15_01 retrieve the entity with lastN and timerel before - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 lastN=${20} expectedSize=20 timerel=before timeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} 021_15_02 retrieve the entity with lastN and timerel between - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} 021_15_03 retrieve the entity with lastN and timerel after - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 lastN=${20} expectedSize=20 timerel=after timeAt=${timeBefore} expectedRangeStart=${mrt} expectedRangeEnd=${lrt} 021_15_04 retrieve the entity with timerel before - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 timerel=before expectedSize=* timeAt=${timeAfter} expectedRangeEnd=${mrt} 021_15_05 retrieve the entity with timerel between - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 021_15_06 retrieve the entity with timerel after - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 021_15_07 retrieve the entity with temporalValues and timerel after - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 representation=temporalValues timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 021_15_08 retrieve the entity with temporalValues, lastN and timerel between - [Tags] te-retrieve 5_7_4 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_4 6_3_10 since_v1.5.1 representation=temporalValues lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot index dec50e75..826ae62b 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -12,14 +12,14 @@ Test Template Retrieve Temporal Entities Via Post *** Variables *** -${vehicule_id_prefix} urn:ngsi-ld:Vehicle: -${first_vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld ${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME 021_16_01 retrieve the entities via post - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 entity-operations-before-query.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot index a8e56ae7..ac8a51e5 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -12,44 +12,44 @@ Test Template Retrieve Temporal Entity *** Variables *** -${vehicule_id_prefix} urn:ngsi-ld:Vehicle: -${vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld -${timeBefore} 2019-01-01T01:01:00Z -${timeAfter} 2021-01-01T01:01:00Z -${lrt} least recent timestamp -${mrt} most recent timestamp +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +${timeBefore}= 2019-01-01T01:01:00Z +${timeAfter}= 2021-01-01T01:01:00Z +${lrt}= least recent timestamp +${mrt}= most recent timestamp *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME 020_13_01 retrieve an entity with 20 instances on two attributes - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 ${EMPTY} expectedSize=* expectedRangeStart=${lrt} expectedRangeEnd=${mrt} 020_13_02 retrieve the entity with lastN - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 lastN=${20} expectedSize=20 expectedRangeStart=${mrt} expectedRangeEnd=${lrt} 020_13_03 retrieve the entity with lastN and timerel before - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 lastN=${20} expectedSize=20 timerel=before timeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} 020_13_04 retrieve the entity with lastN and timerel between - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} 020_13_05 retrieve the entity with lastN and timerel after - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 lastN=${20} expectedSize=20 timerel=after timeAt=${timeBefore} expectedRangeStart=${mrt} expectedRangeEnd=${lrt} 020_13_06 retrieve the entity with timerel before - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 timerel=before expectedSize=* timeAt=${timeAfter} expectedRangeEnd=${mrt} 020_13_07 retrieve the entity with timerel between - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 020_13_08 retrieve the entity with timerel after - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 020_13_09 retrieve the entity with temporalValues and timerel after - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 representation=temporalValues timerel=after timeAt=${timeBefore} expectedRangeStart=${timeBefore} expectedRangeEnd=${mrt} 020_13_10 retrieve the entity with temporalValues, lastN and timerel between - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 representation=temporalValues lastN=${20} timerel=between timeAt=${timeBefore} endTimeAt=${timeAfter} expectedRangeStart=${timeAfter} expectedRangeEnd=${lrt} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot index 7c815779..6e2d32e0 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot @@ -12,18 +12,18 @@ Test Template Retrieve Temporal Entity *** Variables *** -${vehicule_id_prefix} urn:ngsi-ld:Vehicle: -${vehicle_payload_file} pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld -${timeBefore} 2019-01-01T01:01:00Z -${timeAfter} 2021-01-01T01:01:00Z +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld +${timeBefore}= 2019-01-01T01:01:00Z +${timeAfter}= 2021-01-01T01:01:00Z *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME 020_14_01 retrieve an entity with 60 instances of unsynchronized attributes - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 timerel=after timeAt=${timeBefore} emptyAttr=fuelLevel 020_14_02 retrieve the entity with lastN - [Tags] te-retrieve 5_7_3 te_pagination 6_3_10 since_v1.5.1 + [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 lastN=${100} timerel=before timeAt=${timeAfter} emptyAttr=speed diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index fb208cec..d76c4308 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -1119,18 +1119,20 @@ class Requests: response = f"{response} and\n Query Parameter: timerel set to '{value}'" case 'timeAt': response = f"{response} and\n Query Parameter: timeAt set to '{value}'" + case 'endTimeAt': + response = f"{response} and\n Query Parameter: endTimeAt set to '{value}'" case 'attrs': response = f"{response} and\n Query Parameter: attrs set to '{value}'" case 'limit': response = f"{response} and\n Query Parameter: limit set to '{value}'" case 'lastN': + if re.search(pattern=r'\d+', string=value): + value = re.search(pattern=r'\d+', string=value).group() response = f"{response} and\n Query Parameter: lastN set to '{value}'" case 'accept': response = f"{response} and\n Query Parameter: accept set to '{value}'" case 'options': response = f"{response} and\n Query Parameter: options set to '{value}'" - case 'endTimeAt': - response = f"{response} and\n Query Parameter: endTimeAt set to '{value}'" # If an exact match is not confirmed, this last case will be used if provided case _: @@ -1163,6 +1165,8 @@ class Requests: case 'endTimeAt': response = f"{response} and\n Query Parameter: endTimeAt set to '{value}'" case 'lastN': + if re.search(pattern=r'\d+', string=value): + value = re.search(pattern=r'\d+', string=value).group() response = f"{response} and\n Query Parameter: lastN set to '{value}'" case 'accept': response = f"{response} and\n Query Parameter: accept set to '{value}'" diff --git a/doc/files/ContextInformation/Consumption/020_05.json b/doc/files/ContextInformation/Consumption/020_05.json index fe907dc1..e3cf4883 100644 --- a/doc/files/ContextInformation/Consumption/020_05.json +++ b/doc/files/ContextInformation/Consumption/020_05.json @@ -1,5 +1,5 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05", "test_objective": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.3", "config_id": "", @@ -18,7 +18,7 @@ "test_cases": [ { "name": "020_05_01 Retrieve Some Instances", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05_01", "doc": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "tags": [ "5_7_3", @@ -28,13 +28,13 @@ "teardown": "Delete Initial Temporal Entity", "template": "Retrieve the temporal evolution of the last N instances of entity attributes", "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-020-05-01-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '${4}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '4' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" }, { "name": "020_05_02 Retrieve All Instances", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05_02", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_05_02", "doc": "Check that one can retrieve the temporal evolution of the last N instances of entity attributes", "tags": [ "5_7_3", @@ -44,7 +44,7 @@ "teardown": "Delete Initial Temporal Entity", "template": "Retrieve the temporal evolution of the last N instances of entity attributes", "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-020-05-02-expectation.jsonld'\n * the id was changed to '${temporal_entity_representation_id}'\n * response body to be checked set to '${response.json()}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '${7}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities/{temporal_entity_representation_id}'\n method set to 'GET'\n Retrieve Temporal Representation of Entity and\n Query Parameter: id set to '${temporal_entity_representation_id}' and\n Query Parameter: lastN set to '7' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities/{temporal_entity_representation_id}" } diff --git a/doc/files/ContextInformation/Consumption/020_13.json b/doc/files/ContextInformation/Consumption/020_13.json index 51f0024d..287ee6b5 100644 --- a/doc/files/ContextInformation/Consumption/020_13.json +++ b/doc/files/ContextInformation/Consumption/020_13.json @@ -1,6 +1,6 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13", - "test_objective": "Check temporal pagination behavior", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13", + "test_objective": "Check temporal pagination is applied when retrieving the temporal evolution of an entity", "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", "config_id": "", "parent_release": "v1.5.1", @@ -21,14 +21,13 @@ "test_cases": [ { "name": "020_13_01 retrieve an entity with 20 instances on two attributes", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_01", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -40,14 +39,13 @@ }, { "name": "020_13_02 retrieve the entity with lastN", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_02", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_02", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -59,14 +57,13 @@ }, { "name": "020_13_03 retrieve the entity with lastN and timerel before", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_03", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_03", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -78,14 +75,13 @@ }, { "name": "020_13_04 retrieve the entity with lastN and timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_04", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_04", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -97,14 +93,13 @@ }, { "name": "020_13_05 retrieve the entity with lastN and timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_05", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_05", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -116,14 +111,13 @@ }, { "name": "020_13_06 retrieve the entity with timerel before", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_06", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_06", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -135,14 +129,13 @@ }, { "name": "020_13_07 retrieve the entity with timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_07", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_07", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -154,14 +147,13 @@ }, { "name": "020_13_08 retrieve the entity with timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_08", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_08", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -173,14 +165,13 @@ }, { "name": "020_13_09 retrieve the entity with temporalValues and timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_09", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_09", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -192,14 +183,13 @@ }, { "name": "020_13_10 retrieve the entity with temporalValues, lastN and timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13_10", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_13_10", "doc": "Check temporal pagination behavior", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, diff --git a/doc/files/ContextInformation/Consumption/020_14.json b/doc/files/ContextInformation/Consumption/020_14.json index 6ddbba55..d0ca0fd8 100644 --- a/doc/files/ContextInformation/Consumption/020_14.json +++ b/doc/files/ContextInformation/Consumption/020_14.json @@ -1,5 +1,5 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_14", "test_objective": "Check that the time range cut before the second attribute to avoid missing data in content-range", "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", "config_id": "", @@ -19,14 +19,13 @@ "test_cases": [ { "name": "020_14_01 retrieve an entity with 60 instances of unsynchronized attributes", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_14_01", "doc": "Check that the time range cut before the second attribute", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, @@ -38,14 +37,13 @@ }, { "name": "020_14_02 retrieve the entity with lastN", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14_02", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_14_02", "doc": "Check that the time range cut before the second attribute", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, diff --git a/doc/files/ContextInformation/Consumption/021_03.json b/doc/files/ContextInformation/Consumption/021_03.json index 107f6bf4..cf5aab54 100644 --- a/doc/files/ContextInformation/Consumption/021_03.json +++ b/doc/files/ContextInformation/Consumption/021_03.json @@ -1,5 +1,5 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_03", "test_objective": "Check that one can query the temporal evolution of the last N instances of entities attributes", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", "config_id": "", @@ -17,7 +17,7 @@ "test_cases": [ { "name": "021_03_01 Query the temporal evolution of the last N instances of entities attributes", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_03_01", "doc": "Check that one can query the temporal evolution of the last N instances of entities attributes", "tags": [ "5_7_4", @@ -27,7 +27,7 @@ "teardown": null, "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-03-expectation.jsonld'\n and using the list of entity ids define in '${temporal_entities_representation_ids}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' and\n Query Parameter: lastN set to '${4}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-07-01T12:05:00Z' and\n Query Parameter: lastN set to '4' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "temporal/entities" } diff --git a/doc/files/ContextInformation/Consumption/021_15.json b/doc/files/ContextInformation/Consumption/021_15.json index ce0b932d..4ad46c33 100644 --- a/doc/files/ContextInformation/Consumption/021_15.json +++ b/doc/files/ContextInformation/Consumption/021_15.json @@ -1,6 +1,6 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15", - "test_objective": "Check temporal pagination behavior on multiple entity endpoint", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15", + "test_objective": "Check temporal pagination is applied when querying the temporal evolution of entities", "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.4, 6.3.10", "config_id": "", "parent_release": "v1.5.1", @@ -21,153 +21,145 @@ "test_cases": [ { "name": "021_15_01 retrieve the entity with lastN and timerel before", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_01", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_02 retrieve the entity with lastN and timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_02", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_02", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_03 retrieve the entity with lastN and timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_03", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_03", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'lastN=${20}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_04 retrieve the entity with timerel before", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_04", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_04", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=before' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=before' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_05 retrieve the entity with timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_05", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_05", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=between' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=between' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_06 retrieve the entity with timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_06", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_06", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=after' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'timerel=after' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_07 retrieve the entity with temporalValues and timerel after", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_07", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_07", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_15_08 retrieve the entity with temporalValues, lastN and timerel between", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15_08", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_15_08", "doc": "Check temporal pagination behavior on multiple entity endpoint", "tags": [ "5_7_4", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit} and\n Notification with Content range part ${rangeStart} equals ${expectedRangeStart} and\n Notification with Content range part ${rangeEnd} equals ${expectedRangeEnd} and\n Notification with Content range part ${size} equals ${expectedSize}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: options set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: options set to 'representation=temporalValues' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: timerel set to '${timerel}' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' and\n Query Parameter: lastN set to '${lastN}'\n}", "http_verb": "GET", "endpoint": "temporal/entities" } diff --git a/doc/files/ContextInformation/Consumption/021_16.json b/doc/files/ContextInformation/Consumption/021_16.json index 77826141..6f60e9ad 100644 --- a/doc/files/ContextInformation/Consumption/021_16.json +++ b/doc/files/ContextInformation/Consumption/021_16.json @@ -1,6 +1,6 @@ { - "tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16", - "test_objective": "Check that temporal pagination is triggered on the post temporal query", + "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_16", + "test_objective": "Check temporal pagination is applied when querying the temporal evolution of entities via POST", "reference": "ETSI GS CIM 009 V1.5.1 [], clauses 5.7.3, 6.3.10", "config_id": "", "parent_release": "v1.5.1", @@ -19,20 +19,19 @@ "test_cases": [ { "name": "021_16_01 retrieve the entities via post", - "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16_01", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_16_01", "doc": "Check that temporal pagination is triggered on the post temporal query", "tags": [ "5_7_3", "6_3_10", "since_v1.5.1", - "te-retrieve", - "te_pagination" + "te-retrieve" ], "setup": null, "teardown": null, "template": "Retrieve Temporal Entities Via Post", "then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities Via Post with Response Status Code set to 206 and\n Notification with Content range part date-time equals ${unit}\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entityOperations/query'\n method set to 'POST'\n Query Temporal Representation of Entities Via POST Request: and\n Query Parameter: query_file_name set to '${payload_file}' and\n Query Parameter: Link set to '<$https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: content_type set to 'application/json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entityOperations/query'\n method set to 'POST'\n Query Temporal Representation of Entities Via POST Request: and\n Query Parameter: query_file_name set to '${payload_file}' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"' and\n Query Parameter: content_type set to 'application/json'\n}", "http_verb": "POST", "endpoint": "temporal/entityOperations/query" } diff --git a/doc/tests/test_ContextInformation_Consumption.py b/doc/tests/test_ContextInformation_Consumption.py index a4c28356..ec9b25b4 100644 --- a/doc/tests/test_ContextInformation_Consumption.py +++ b/doc/tests/test_ContextInformation_Consumption.py @@ -411,6 +411,19 @@ class TestCIConsumptions(TestCase): expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_14.json' difference_file = f'{self.folder_test_suites}/doc/results/out_021_14.json' + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_021_15(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_15.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_021_15.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_021_16(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_16.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_021_16.json' + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) def test_020_01(self): @@ -496,3 +509,17 @@ class TestCIConsumptions(TestCase): difference_file = f'{self.folder_test_suites}/doc/results/out_020_12.json' self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_020_13(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/020_13.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_020_13.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_020_14(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/020_14.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_020_14.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 6bac6741..f0f5ebb1 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -10,17 +10,17 @@ Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource *** Variables *** -${id_regex_expr}= root\\['id'\\] -${instance_id_regex_expr}= root\\[.*\\]\\['instanceId'\\] -${notification_timestamps_regex_expr}= root\\['last.*'\\] -${notification_endpoint_uri_regex_expr}= root\\['endpoint'\\]\\['uri'\\] -${context_regex_expr}= root\\['@context'\\] -${status_regex_expr}= root\\['status'\\] -${lastfailure_regex_expr}= root\\['lastFailure'\\] -${lastNotification_regex_expr}= root\\['lastNotification'\\] -${timesFailed_regex_expr}= root\\['timesFailed'\\] -${timesSent_regex_expr}= root\\['timesSent'\\] -${is_active_expr}= root\\['isActive'\\] +${id_regex_expr}= root/['id'/] +${instance_id_regex_expr}= root/[.*/]/['instanceId'/] +${notification_timestamps_regex_expr}= root/['last.*'/] +${notification_endpoint_uri_regex_expr}= root/['endpoint'/]/['uri'/] +${context_regex_expr}= root/['@context'/] +${status_regex_expr}= root/['status'/] +${lastfailure_regex_expr}= root/['lastFailure'/] +${lastNotification_regex_expr}= root/['lastNotification'/] +${timesFailed_regex_expr}= root/['timesFailed'/] +${timesSent_regex_expr}= root/['timesSent'/] +${is_active_expr}= root/['isActive'/] *** Keywords *** -- GitLab From 28a38a82ad61a84f101480ff01ab16bce0efb5f3 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 23 Jul 2024 12:03:39 +0200 Subject: [PATCH 5/8] fix: remove te_pagination tag and fix generated doc --- doc/files/ContextInformation/Consumption/020_05.json | 2 +- doc/files/ContextInformation/Consumption/020_13.json | 2 +- doc/files/ContextInformation/Consumption/020_14.json | 2 +- doc/files/ContextInformation/Consumption/021_03.json | 2 +- doc/files/ContextInformation/Consumption/021_15.json | 2 +- doc/files/ContextInformation/Consumption/021_16.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/files/ContextInformation/Consumption/020_05.json b/doc/files/ContextInformation/Consumption/020_05.json index e3cf4883..09ad0393 100644 --- a/doc/files/ContextInformation/Consumption/020_05.json +++ b/doc/files/ContextInformation/Consumption/020_05.json @@ -53,6 +53,6 @@ "then", "when" ], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", "robotfile": "020_05" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_13.json b/doc/files/ContextInformation/Consumption/020_13.json index 287ee6b5..29365ed6 100644 --- a/doc/files/ContextInformation/Consumption/020_13.json +++ b/doc/files/ContextInformation/Consumption/020_13.json @@ -203,6 +203,6 @@ "permutations": [ "when" ], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", "robotfile": "020_13" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_14.json b/doc/files/ContextInformation/Consumption/020_14.json index d0ca0fd8..c70fa98c 100644 --- a/doc/files/ContextInformation/Consumption/020_14.json +++ b/doc/files/ContextInformation/Consumption/020_14.json @@ -55,6 +55,6 @@ } ], "permutations": [], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", "robotfile": "020_14" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_03.json b/doc/files/ContextInformation/Consumption/021_03.json index cf5aab54..a59efe3c 100644 --- a/doc/files/ContextInformation/Consumption/021_03.json +++ b/doc/files/ContextInformation/Consumption/021_03.json @@ -33,6 +33,6 @@ } ], "permutations": [], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", "robotfile": "021_03" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_15.json b/doc/files/ContextInformation/Consumption/021_15.json index 4ad46c33..b926c08c 100644 --- a/doc/files/ContextInformation/Consumption/021_15.json +++ b/doc/files/ContextInformation/Consumption/021_15.json @@ -167,6 +167,6 @@ "permutations": [ "when" ], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", "robotfile": "021_15" } \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/021_16.json b/doc/files/ContextInformation/Consumption/021_16.json index 6f60e9ad..dc5c26aa 100644 --- a/doc/files/ContextInformation/Consumption/021_16.json +++ b/doc/files/ContextInformation/Consumption/021_16.json @@ -37,6 +37,6 @@ } ], "permutations": [], - "robotpath": "TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", + "robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities", "robotfile": "021_16" } \ No newline at end of file -- GitLab From d67ca8d5c4c1d7152295d37df1d5af92cdcc9352 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 24 Jul 2024 14:10:56 +0200 Subject: [PATCH 6/8] fix: AssertionUtils Variables --- resources/AssertionUtils.resource | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index f0f5ebb1..6bac6741 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -10,17 +10,17 @@ Resource ${EXECDIR}/resources/ApiUtils/jsonldContext.resource *** Variables *** -${id_regex_expr}= root/['id'/] -${instance_id_regex_expr}= root/[.*/]/['instanceId'/] -${notification_timestamps_regex_expr}= root/['last.*'/] -${notification_endpoint_uri_regex_expr}= root/['endpoint'/]/['uri'/] -${context_regex_expr}= root/['@context'/] -${status_regex_expr}= root/['status'/] -${lastfailure_regex_expr}= root/['lastFailure'/] -${lastNotification_regex_expr}= root/['lastNotification'/] -${timesFailed_regex_expr}= root/['timesFailed'/] -${timesSent_regex_expr}= root/['timesSent'/] -${is_active_expr}= root/['isActive'/] +${id_regex_expr}= root\\['id'\\] +${instance_id_regex_expr}= root\\[.*\\]\\['instanceId'\\] +${notification_timestamps_regex_expr}= root\\['last.*'\\] +${notification_endpoint_uri_regex_expr}= root\\['endpoint'\\]\\['uri'\\] +${context_regex_expr}= root\\['@context'\\] +${status_regex_expr}= root\\['status'\\] +${lastfailure_regex_expr}= root\\['lastFailure'\\] +${lastNotification_regex_expr}= root\\['lastNotification'\\] +${timesFailed_regex_expr}= root\\['timesFailed'\\] +${timesSent_regex_expr}= root\\['timesSent'\\] +${is_active_expr}= root\\['isActive'\\] *** Keywords *** -- GitLab From 3dd5feb7815c98ac73605301e11b3394c5f55eaa Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 26 Jul 2024 10:52:05 +0200 Subject: [PATCH 7/8] fix: bad contexts --- data/entities/fragmentEntities/type-building-fragment.json | 2 +- .../fragmentEntities/type-vehicle-building-fragment.json | 2 +- data/entities/fragmentEntities/type-vehicle-fragment.json | 2 +- data/entities/fragmentEntities/types-vehicle-car-fragment.json | 2 +- ...0-01-vehicule-temporal-representation-sixty-instances.jsonld | 2 +- ...-01-vehicule-temporal-representation-twenty-instances.jsonld | 2 +- doc/files/ContextInformation/Provision/011_06.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/entities/fragmentEntities/type-building-fragment.json b/data/entities/fragmentEntities/type-building-fragment.json index aa8f90d1..40c43a16 100644 --- a/data/entities/fragmentEntities/type-building-fragment.json +++ b/data/entities/fragmentEntities/type-building-fragment.json @@ -1,6 +1,6 @@ { "type": "Building", "@context": [ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/fragmentEntities/type-vehicle-building-fragment.json b/data/entities/fragmentEntities/type-vehicle-building-fragment.json index 6665997b..6522bbc1 100644 --- a/data/entities/fragmentEntities/type-vehicle-building-fragment.json +++ b/data/entities/fragmentEntities/type-vehicle-building-fragment.json @@ -1,6 +1,6 @@ { "type": ["Building", "Vehicle"], "@context": [ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/fragmentEntities/type-vehicle-fragment.json b/data/entities/fragmentEntities/type-vehicle-fragment.json index e405afcc..040dd88a 100644 --- a/data/entities/fragmentEntities/type-vehicle-fragment.json +++ b/data/entities/fragmentEntities/type-vehicle-fragment.json @@ -1,6 +1,6 @@ { "type": "Vehicle", "@context": [ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/fragmentEntities/types-vehicle-car-fragment.json b/data/entities/fragmentEntities/types-vehicle-car-fragment.json index fde75e0f..6623d2fb 100644 --- a/data/entities/fragmentEntities/types-vehicle-car-fragment.json +++ b/data/entities/fragmentEntities/types-vehicle-car-fragment.json @@ -1,6 +1,6 @@ { "type": ["Vehicle", "Car"], "@context": [ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld index 478db69c..caa82a18 100644 --- a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld +++ b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-sixty-instances.jsonld @@ -596,6 +596,6 @@ } ], "@context":[ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld index f1b24572..dbfe4b92 100644 --- a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +++ b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld @@ -206,6 +206,6 @@ } ], "@context":[ - "https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld" + "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/doc/files/ContextInformation/Provision/011_06.json b/doc/files/ContextInformation/Provision/011_06.json index b31fbadf..9a885735 100644 --- a/doc/files/ContextInformation/Provision/011_06.json +++ b/doc/files/ContextInformation/Provision/011_06.json @@ -30,7 +30,7 @@ "teardown": "Delete Initial Entity", "template": null, "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Update Entity Attributes with Check Updated Entity and\n Query Parameter: 'ignored_keys' set to '${None}'\n}", - "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://easy-global-market.github.io/ngsild-api-data-models/ngsildTestSuite/ngsildTestSuiteV1.8-compound.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/'\n method set to 'GET'\n Request Retrieve Entity by Id and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: accept set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", "http_verb": "GET", "endpoint": "" } -- GitLab From 5990dfd5d0c6c217090949e6d710527f4a6c2f5e Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 26 Jul 2024 13:57:22 +0200 Subject: [PATCH 8/8] feat: partly synchronised attributes --- ...ral-representation-twenty-instances.jsonld | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld index dbfe4b92..05e9ba09 100644 --- a/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld +++ b/data/temporalEntities/pagination/2020-01-vehicule-temporal-representation-twenty-instances.jsonld @@ -107,102 +107,102 @@ { "type":"Property", "value":1, - "observedAt":"2020-01-01T02:01:00Z" + "observedAt":"2020-01-01T01:03:00Z" }, { "type":"Property", "value":2, - "observedAt":"2020-01-01T02:02:00Z" + "observedAt":"2020-01-01T01:04:00Z" }, { "type":"Property", "value":3, - "observedAt":"2020-01-01T02:03:00Z" + "observedAt":"2020-01-01T01:05:00Z" }, { "type":"Property", "value":4, - "observedAt":"2020-01-01T02:04:00Z" + "observedAt":"2020-01-01T01:06:00Z" }, { "type":"Property", "value":5, - "observedAt":"2020-01-01T02:05:00Z" + "observedAt":"2020-01-01T01:07:00Z" }, { "type":"Property", "value":6, - "observedAt":"2020-01-01T02:06:00Z" + "observedAt":"2020-01-01T01:08:00Z" }, { "type":"Property", "value":7, - "observedAt":"2020-01-01T02:07:00Z" + "observedAt":"2020-01-01T01:09:00Z" }, { "type":"Property", "value":8, - "observedAt":"2020-01-01T02:08:00Z" + "observedAt":"2020-01-01T01:10:00Z" }, { "type":"Property", "value":9, - "observedAt":"2020-01-01T02:09:00Z" + "observedAt":"2020-01-01T01:11:00Z" }, { "type":"Property", "value":10, - "observedAt":"2020-01-01T02:10:00Z" + "observedAt":"2020-01-01T01:12:00Z" }, { "type":"Property", "value":11, - "observedAt":"2020-01-01T02:11:00Z" + "observedAt":"2020-01-01T01:13:00Z" }, { "type":"Property", "value":12, - "observedAt":"2020-01-01T02:12:00Z" + "observedAt":"2020-01-01T01:14:00Z" }, { "type":"Property", "value":13, - "observedAt":"2020-01-01T02:13:00Z" + "observedAt":"2020-01-01T01:15:00Z" }, { "type":"Property", "value":14, - "observedAt":"2020-01-01T02:14:00Z" + "observedAt":"2020-01-01T01:16:00Z" }, { "type":"Property", "value":15, - "observedAt":"2020-01-01T02:15:00Z" + "observedAt":"2020-01-01T01:17:00Z" }, { "type":"Property", "value":16, - "observedAt":"2020-01-01T02:16:00Z" + "observedAt":"2020-01-01T01:18:00Z" }, { "type":"Property", "value":17, - "observedAt":"2020-01-01T02:17:00Z" + "observedAt":"2020-01-01T01:19:00Z" }, { "type":"Property", "value":18, - "observedAt":"2020-01-01T02:18:00Z" + "observedAt":"2020-01-01T01:20:00Z" }, { "type":"Property", "value":19, - "observedAt":"2020-01-01T02:19:00Z" + "observedAt":"2020-01-01T01:21:00Z" }, { "type":"Property", "value":20, - "observedAt":"2020-01-01T02:20:00Z" + "observedAt":"2020-01-01T01:22:00Z" } ], "@context":[ -- GitLab