From d0f7b6607cfd42fbc06a79150ec151f5dd1ebd3c Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 10 Jul 2024 11:13:46 +0200 Subject: [PATCH 01/16] 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 ++ ...l-representation-multiple-instances.jsonld | 115 ---- ...e-temporal-representation-020-05-01.jsonld | 60 -- ...e-temporal-representation-020-05-02.jsonld | 115 ---- ...cles-temporal-representation-021-03.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 a26fe48e..40a59905 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -27,7 +27,7 @@ ${expectation_file}= vehicles-temporal-representation-021-03.json ... 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 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 db970a97..516b78d5 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-vehicle-temporal-representation-multiple-ins *** 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.jsonld + ${4} vehicle-temporal-representation-020-05-01.jsonld 020_05_02 Retrieve All Instances [Tags] te-retrieve 5_7_3 - ${20} vehicle-temporal-representation-020-05-02.jsonld + ${7} vehicle-temporal-representation-020-05-02.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-vehicle-temporal-representation-multiple-instances.jsonld b/data/temporalEntities/2020-08-vehicle-temporal-representation-multiple-instances.jsonld index b25b175d..93a5a0fc 100644 --- a/data/temporalEntities/2020-08-vehicle-temporal-representation-multiple-instances.jsonld +++ b/data/temporalEntities/2020-08-vehicle-temporal-representation-multiple-instances.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.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01.jsonld index 0c5cf14a..e00fcbf6 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01.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.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02.jsonld index 421a6ae7..cf5c87e5 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02.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.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03.jsonld index a864acbf..d7af771b 100644 --- a/data/temporalEntities/expectations/vehicles-temporal-representation-021-03.jsonld +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03.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 37035b4259c2af6c8615b1e82997ca6901077757 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 17 Jul 2024 15:47:51 +0200 Subject: [PATCH 02/16] fix: add missing file and good file numbering --- .../020_13.robot | 162 +++++++++++++ .../{020_15.robot => 020_14.robot} | 4 +- .../Consumption/020_05.json | 10 +- .../Consumption/020_13.json | 218 ++++++++++++++++++ .../Consumption/{020_15.json => 020_14.json} | 16 +- .../Consumption/021_03.json | 6 +- 6 files changed, 398 insertions(+), 18 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 d110043d..c697c89e 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", + "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", @@ -19,7 +19,7 @@ { "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", + "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.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", + "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.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}" } 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 9a4345ef..6f2450cb 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", + "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", @@ -18,7 +18,7 @@ { "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", + "doc": "Check that one can query the temporal evolution of the last N instances of entities attributes", "tags": [ "5_7_4", "te-query" @@ -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.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" } -- GitLab From cfd0920fcda6a84b8797455428083f3315718ffa Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Tue, 23 Jul 2024 07:19:35 +0000 Subject: [PATCH 03/16] 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 ab6182387feada59945bf8ef42a10c8a08fa956b Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 23 Jul 2024 12:03:39 +0200 Subject: [PATCH 04/16] 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_13.json | 54 +++++++---------- .../Consumption/020_14.json | 12 ++-- .../Consumption/021_15.json | 60 ++++++++----------- .../Consumption/021_16.json | 11 ++-- .../test_ContextInformation_Consumption.py | 27 +++++++++ resources/AssertionUtils.resource | 22 +++---- 12 files changed, 154 insertions(+), 134 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_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_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 4eb46cab95c406645d2c17adf935c919c90e3d92 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 23 Jul 2024 12:03:39 +0200 Subject: [PATCH 05/16] fix: remove te_pagination tag and fix generated doc --- doc/files/ContextInformation/Consumption/020_13.json | 2 +- doc/files/ContextInformation/Consumption/020_14.json | 2 +- doc/files/ContextInformation/Consumption/021_15.json | 2 +- doc/files/ContextInformation/Consumption/021_16.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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_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 93367c05fc80f27fcb0679105b8d7daac899b082 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 24 Jul 2024 14:10:56 +0200 Subject: [PATCH 06/16] 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 3fa30d14bd9d0dcd32108686dd45e10476ed226b Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 26 Jul 2024 10:52:05 +0200 Subject: [PATCH 07/16] 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 7b4a2c2e81b55a206a4a13d893547addaf61a4fd Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Fri, 26 Jul 2024 13:57:22 +0200 Subject: [PATCH 08/16] 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 From 31d3ed0511fd10b433daf7307c92780115e74a5c Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 30 Jul 2024 14:15:56 +0200 Subject: [PATCH 09/16] fix: filename post merge --- .../QueryTemporalEvolutionOfEntities/021_15.robot | 2 +- .../QueryTemporalEvolutionOfEntities/021_16.robot | 2 +- 2 files changed, 2 insertions(+), 2 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 59b3aa5e..fb552cb4 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -14,7 +14,7 @@ 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 +${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld ${timeBefore}= 2019-01-01T01:01:00Z ${timeAfter}= 2021-01-01T01:01:00Z ${lrt}= least recent timestamp 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 826ae62b..8f464128 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -14,7 +14,7 @@ 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 +${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld *** Test Cases *** REPRESENTATION EXPECTATION_FILENAME -- GitLab From 01fdca4fa19460853491219dc2df787e5d14e145 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Thu, 1 Aug 2024 11:34:46 +0200 Subject: [PATCH 10/16] fix: calculation of temporalValues least and most recent timestamp --- .../021_15.robot | 30 ++++++++++++------- .../020_13.robot | 14 +++++++-- 2 files changed, 32 insertions(+), 12 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 fb552cb4..5aaf5a63 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -135,11 +135,8 @@ Delete Initial Entities 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] + ${attributeList}= Get Attribute List From Vehicle Body ${body} ${representation} + ${leastRecentTimestamp}= Convert Date ${timeAfter} FOR ${attribute} IN @{attributeList} IF $representation == 'temporalValues' @@ -156,11 +153,7 @@ Get Least Recent Timestamp From Vehicles 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] + ${attributeList}= Get Attribute List From Vehicle Body ${body} ${representation} ${mostRecentTimestamp}= Convert Date ${timeBefore} FOR ${attribute} IN @{attributeList} @@ -174,3 +167,20 @@ Get Most Recent Timestamp From Vehicles END END RETURN ${mostRecentTimestamp} + +Get Attribute List From Vehicle Body + [Arguments] ${body} ${representation}=${EMPTY} + IF $representation == 'temporalValues' + ${attributeList}= Combine Lists + ... ${body}[0][speed][values] + ... ${body}[0][fuelLevel][values] + ... ${body}[1][speed][values] + ... ${body}[1][fuelLevel][values] + ELSE + ${attributeList}= Combine Lists + ... ${body}[0][speed] + ... ${body}[0][fuelLevel] + ... ${body}[1][speed] + ... ${body}[1][fuelLevel] + END + RETURN ${attributeList} 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 ac8a51e5..7949f4e2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -129,7 +129,8 @@ Delete Initial Temporal Entity Get Least Recent Timestamp From Vehicle Body [Arguments] ${body} ${representation}=${EMPTY} - ${attributeList}= Combine Lists ${body}[speed] ${body}[fuelLevel] + ${attributeList}= Get Attribute List From Vehicle Body ${body} ${representation} + ${leastRecentTimestamp}= Convert Date ${timeAfter} FOR ${attribute} IN @{attributeList} IF $representation == 'temporalValues' @@ -146,7 +147,7 @@ Get Least Recent Timestamp From Vehicle Body Get Most Recent Timestamp From Vehicle Body [Arguments] ${body} ${representation}=${EMPTY} - ${attributeList}= Combine Lists ${body}[speed] ${body}[fuelLevel] + ${attributeList}= Get Attribute List From Vehicle Body ${body} ${representation} ${mostRecentTimestamp}= Convert Date ${timeBefore} FOR ${attribute} IN @{attributeList} @@ -160,3 +161,12 @@ Get Most Recent Timestamp From Vehicle Body END END RETURN ${mostRecentTimestamp} + +Get Attribute List From Vehicle Body + [Arguments] ${body} ${representation}=${EMPTY} + IF $representation == 'temporalValues' + ${attributeList}= Combine Lists ${body}[speed][values] ${body}[fuelLevel][values] + ELSE + ${attributeList}= Combine Lists ${body}[speed] ${body}[fuelLevel] + END + RETURN ${attributeList} -- GitLab From 870084c4977219a119cf8e6bd361a544edc02eba Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 6 Aug 2024 15:08:43 +0200 Subject: [PATCH 11/16] fix: comments and readme --- README.md | 8 +------- .../QueryTemporalEvolutionOfEntities/021_15.robot | 2 +- .../QueryTemporalEvolutionOfEntities/021_16.robot | 2 +- .../RetrieveTemporalEvolutionOfEntity/020_13.robot | 2 +- .../RetrieveTemporalEvolutionOfEntity/020_14.robot | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5dcee1db..40b7def7 100644 --- a/README.md +++ b/README.md @@ -258,13 +258,7 @@ 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_15.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot index 5aaf5a63..90711418 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -21,7 +21,7 @@ ${lrt}= least recent timestamp ${mrt}= most recent timestamp -*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +*** Test Cases *** 021_15_01 retrieve the entity with lastN and timerel before [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} 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 8f464128..4d3f58d3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -17,7 +17,7 @@ ${first_vehicle_payload_file}= pagination/2020-01-vehicule-temporal-represe ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.jsonld -*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +*** Test Cases *** PAYLOAD_FILE 021_16_01 retrieve the entities via post [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 7949f4e2..4069ae42 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -20,7 +20,7 @@ ${lrt}= least recent timestamp ${mrt}= most recent timestamp -*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +*** Test Cases *** 020_13_01 retrieve an entity with 20 instances on two attributes [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 ${EMPTY} expectedSize=* expectedRangeStart=${lrt} expectedRangeEnd=${mrt} 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 6e2d32e0..4b5dcd4e 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot @@ -18,7 +18,7 @@ ${timeBefore}= 2019-01-01T01:01:00Z ${timeAfter}= 2021-01-01T01:01:00Z -*** Test Cases *** REPRESENTATION EXPECTATION_FILENAME +*** Test Cases *** 020_14_01 retrieve an entity with 60 instances of unsynchronized attributes [Tags] te-retrieve 5_7_3 6_3_10 since_v1.5.1 timerel=after timeAt=${timeBefore} emptyAttr=fuelLevel -- GitLab From 5190c5ed3d1a0fd08ba41030bf5c30b75319df4b Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 6 Aug 2024 15:31:15 +0200 Subject: [PATCH 12/16] feat: check response statuscode --- .../QueryTemporalEvolutionOfEntities/021_15.robot | 8 ++++++-- .../QueryTemporalEvolutionOfEntities/021_16.robot | 8 ++++++-- .../RetrieveTemporalEvolutionOfEntity/020_13.robot | 6 +++++- .../RetrieveTemporalEvolutionOfEntity/020_14.robot | 6 +++++- 4 files changed, 22 insertions(+), 6 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 90711418..0a4d9062 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_15.robot @@ -119,12 +119,16 @@ Retrieve Temporal Entities 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 + ${response}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} + Check Response Status Code 201 ${response.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} Set Suite Variable ${second_temporal_entity_representation_id} 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 4d3f58d3..cbd46786 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_16.robot @@ -48,12 +48,16 @@ Retrieve Temporal Entities Via Post 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 + ${response}= Create Temporal Representation Of Entity ... ${first_vehicle_payload_file} ... ${first_temporal_entity_representation_id} - Create Temporal Representation Of Entity + Check Response Status Code 201 ${response.status_code} + + ${response}= Create Temporal Representation Of Entity ... ${second_vehicle_payload_file} ... ${second_temporal_entity_representation_id} + Check Response Status Code 201 ${response.status_code} + Set Suite Variable ${first_temporal_entity_representation_id} Set Suite Variable ${second_temporal_entity_representation_id} 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 4069ae42..b2778c88 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_13.robot @@ -121,7 +121,11 @@ Retrieve Temporal Entity 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} + ${response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${response.status_code} + Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity 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 4b5dcd4e..157e3479 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_14.robot @@ -45,7 +45,11 @@ Retrieve Temporal Entity 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} + ${response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${response.status_code} + Set Suite Variable ${temporal_entity_representation_id} Delete Initial Temporal Entity -- GitLab From f0eee10e02ec43973c037ac21c84c4e478c8d5b0 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Mon, 5 Aug 2024 15:52:25 +0200 Subject: [PATCH 13/16] feat: add between tests for temporal entities get --- .../021_01.robot | 12 ++-- .../021_13.robot | 3 + .../021_14.robot | 12 ++-- .../entity-operations-between-query.jsonld | 11 ++++ ...s-temporal-representation-021-01-03.jsonld | 63 ++++++++++++++++++ ...s-temporal-representation-021-13-03.jsonld | 41 ++++++++++++ ...les-temporal-representation-021-14-03.json | 66 +++++++++++++++++++ 7 files changed, 200 insertions(+), 8 deletions(-) create mode 100644 data/temporalEntities/entity-operations-between-query.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-01-03.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-13-03.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-14-03.json diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot index d3f13ea1..f5c09bc2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -22,22 +22,26 @@ ${bus_payload_file}= 2020-08-bus-temporal-representation.jsonld *** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE 021_01_01 After [Tags] te-query 5_7_4 - after 2020-08-01T12:04:00Z vehicles-temporal-representation-021-01-01.jsonld + after 2020-08-01T12:04:00Z ${EMPTY} vehicles-temporal-representation-021-01-01.jsonld 021_01_02 Before [Tags] te-query 5_7_4 - before 2020-09-01T13:06:00Z vehicles-temporal-representation-021-01-02.jsonld + before 2020-09-01T13:06:00Z ${EMPTY} vehicles-temporal-representation-021-01-02.jsonld +021_01_03 Between + [Tags] te-query 5_7_4 + between 2020-08-01T12:04:00Z 2020-09-01T13:06:00Z vehicles-temporal-representation-021-01-03.jsonld *** Keywords *** Query the temporal evolution of entities [Documentation] Check that one can query the temporal evolution of entities - [Arguments] ${timerel} ${timeat} ${expectation_file} + [Arguments] ${timerel} ${timeAt} ${endTimeAt} ${expectation_file} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=${timerel} - ... timeAt=${timeat} + ... timeAt=${timeAt} + ... endTimeAt=${endTimeAt} ... context=${ngsild_test_suite_context} @{temporal_entities_representation_ids}= Create List diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot index cb984e80..51162102 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -24,6 +24,9 @@ ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.json 021_13_02 Before [Tags] te-query 5_7_4 entity-operations-before-query.jsonld vehicles-temporal-representation-021-13-02.jsonld +021_13_03 Between + [Tags] te-query 5_7_4 + entity-operations-between-query.jsonld vehicles-temporal-representation-021-13-03.jsonld *** Keywords *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot index 3587218e..77cd08e2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot @@ -22,21 +22,25 @@ ${bus_payload_file}= 2020-08-bus-temporal-representation.jsonld *** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE 021_14_01 After [Tags] te-query 5_7_4 - after 2020-08-01T12:04:00Z vehicles-temporal-representation-021-14-01.json + after 2020-08-01T12:04:00Z ${EMPTY} vehicles-temporal-representation-021-14-01.json 021_14_02 Before [Tags] te-query 5_7_4 - before 2020-09-01T13:06:00Z vehicles-temporal-representation-021-14-02.json + before 2020-09-01T13:06:00Z ${EMPTY} vehicles-temporal-representation-021-14-02.json +021_14_02 Between + [Tags] te-query 5_7_4 + between 2020-08-01T12:04:00Z 2020-09-01T13:06:00Z vehicles-temporal-representation-021-14-03.json *** Keywords *** Query the temporal evolution of entities [Documentation] Check that one can query the temporal evolution of entities with the simplified representation - [Arguments] ${timerel} ${timeat} ${expectation_file} + [Arguments] ${timerel} ${timeAt} ${endTimeAt} ${expectation_file} ${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle ${response}= Query Temporal Representation Of Entities ... entity_types=${entity_types_to_be_retrieved} ... timerel=${timerel} - ... timeAt=${timeat} + ... timeAt=${timeAt} + ... endTimeAt=${endTimeAt} ... context=${ngsild_test_suite_context} ... options=temporalValues @{temporal_entities_representation_ids}= Create List diff --git a/data/temporalEntities/entity-operations-between-query.jsonld b/data/temporalEntities/entity-operations-between-query.jsonld new file mode 100644 index 00000000..daba537f --- /dev/null +++ b/data/temporalEntities/entity-operations-between-query.jsonld @@ -0,0 +1,11 @@ +{ + "type": "Query", + "entities": [{ + "type": "Vehicle" + }], + "temporalQ": { + "timerel":"between", + "timeAt":"2020-08-02T12:05:00Z", + "endTimeAt":"2020-09-01T13:06:00Z" + } +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-03.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-03.jsonld new file mode 100644 index 00000000..60eee90a --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-03.jsonld @@ -0,0 +1,63 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-03.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-03.jsonld new file mode 100644 index 00000000..20dfc082 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-03.jsonld @@ -0,0 +1,41 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "fuelLevel": [], + "speed": [] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-14-03.json b/data/temporalEntities/expectations/vehicles-temporal-representation-021-14-03.json new file mode 100644 index 00000000..0450f26e --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-14-03.json @@ -0,0 +1,66 @@ +[ + { + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "speed": { + "type": "Property", + "values": [ + [ + 80.0, + "2020-08-01T12:05:00Z" + ], + [ + 100.0, + "2020-08-01T12:07:00Z" + ] + ] + }, + "fuelLevel": { + "type": "Property", + "values": [ + [ + 53.0, + "2020-08-01T13:05:00Z" + ], + [ + 40.0, + "2020-08-01T14:07:00Z" + ] + ] + } + }, + { + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "speed": { + "type": "Property", + "values": [ + [ + 120.0, + "2020-09-01T12:03:00Z" + ], + [ + 80.0, + "2020-09-01T12:05:00Z" + ], + [ + 100.0, + "2020-09-01T12:07:00Z" + ] + ] + }, + "fuelLevel": { + "type": "Property", + "values": [ + [ + 67.0, + "2020-09-01T12:03:00Z" + ], + [ + 53.0, + "2020-09-01T13:05:00Z" + ] + ] + } + } +] -- GitLab From ddb1a5b5d64105e0506d527cd8bb82f8e71a6104 Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Mon, 5 Aug 2024 18:01:58 +0200 Subject: [PATCH 14/16] fix: arguments description and check entities creation --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 40b7def7..ae294f75 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,6 @@ to maintain and run the selected Test Cases from the pickle file. The list of co * Switch OFF Test Collections tsm collections off [collections] - ## 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 -- GitLab From fb578a3fd954e6280eca2ade8c15a8e2a93c75bf Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Tue, 6 Aug 2024 12:52:44 +0200 Subject: [PATCH 15/16] feat: documentation for between tests --- .../Consumption/021_01.json | 30 ++++++++++++++----- .../Consumption/021_13.json | 22 ++++++++++++-- .../Consumption/021_14.json | 30 ++++++++++++++----- 3 files changed, 65 insertions(+), 17 deletions(-) diff --git a/doc/files/ContextInformation/Consumption/021_01.json b/doc/files/ContextInformation/Consumption/021_01.json index 796ffa31..95fa9f62 100644 --- a/doc/files/ContextInformation/Consumption/021_01.json +++ b/doc/files/ContextInformation/Consumption/021_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_01", - "test_objective": "Check that you can query the temporal evolution of entities", + "test_objective": "Check that one can query the temporal evolution of entities", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", "config_id": "", "parent_release": "v1.3.1", @@ -19,7 +19,7 @@ { "name": "021_01_01 After", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_01_01", - "doc": "Check that you can query the temporal evolution of entities", + "doc": "Check that one can query the temporal evolution of entities", "tags": [ "5_7_4", "te-query" @@ -27,15 +27,15 @@ "setup": "Setup Initial Entities", "teardown": "Delete Initial Entities", "template": "Query the temporal evolution of 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 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-01-01.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-08-01T12:04:00Z' 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}", + "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 '${EMPTY}'\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 '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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" }, { "name": "021_01_02 Before", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_01_02", - "doc": "Check that you can query the temporal evolution of entities", + "doc": "Check that one can query the temporal evolution of entities", "tags": [ "5_7_4", "te-query" @@ -43,8 +43,24 @@ "setup": "Setup Initial Entities", "teardown": "Delete Initial Entities", "template": "Query the temporal evolution of 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 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-01-02.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 'before' and\n Query Parameter: timeAt set to '2020-09-01T13:06:00Z' 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}", + "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 '${EMPTY}'\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 'before' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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" + }, + { + "name": "021_01_03 Between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_01_03", + "doc": "Check that one can query the temporal evolution of entities", + "tags": [ + "5_7_4", + "te-query" + ], + "setup": "Setup Initial Entities", + "teardown": "Delete Initial Entities", + "template": "Query the temporal evolution of 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 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file '2020-09-01T13:06:00Z'\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 'between' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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_13.json b/doc/files/ContextInformation/Consumption/021_13.json index 4d47ea6d..5bd50cf4 100644 --- a/doc/files/ContextInformation/Consumption/021_13.json +++ b/doc/files/ContextInformation/Consumption/021_13.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_13", - "test_objective": "Check that you can query the temporal evolution of entities using the entityOperations method", + "test_objective": "Check that one can query the temporal evolution of entities using the entityOperations method", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", "config_id": "", "parent_release": "v1.3.1", @@ -19,7 +19,7 @@ { "name": "021_13_01 After", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_13_01", - "doc": "Check that you can query the temporal evolution of entities using the entityOperations method", + "doc": "Check that one can query the temporal evolution of entities using the entityOperations method", "tags": [ "5_7_4", "te-query" @@ -35,7 +35,7 @@ { "name": "021_13_02 Before", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_13_02", - "doc": "Check that you can query the temporal evolution of entities using the entityOperations method", + "doc": "Check that one can query the temporal evolution of entities using the entityOperations method", "tags": [ "5_7_4", "te-query" @@ -47,6 +47,22 @@ "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 'entity-operations-before-query.jsonld' 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" + }, + { + "name": "021_13_03 Between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_13_03", + "doc": "Check that one can query the temporal evolution of entities using the entityOperations method", + "tags": [ + "5_7_4", + "te-query" + ], + "setup": "Setup Initial Temporal Entities", + "teardown": "Delete Initial Temporal Entities", + "template": "Query the temporal evolution of entities using the entityOperations method", + "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 200 and\n Query Temporal Representation Of Entities Via Post with Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-13-03.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/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 'entity-operations-between-query.jsonld' 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" } ], "permutations": [ diff --git a/doc/files/ContextInformation/Consumption/021_14.json b/doc/files/ContextInformation/Consumption/021_14.json index 5960c7dc..1798f42e 100644 --- a/doc/files/ContextInformation/Consumption/021_14.json +++ b/doc/files/ContextInformation/Consumption/021_14.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14", - "test_objective": "Check that you can query the temporal evolution of entities with the simplified representation", + "test_objective": "Check that one can query the temporal evolution of entities with the simplified representation", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4", "config_id": "", "parent_release": "v1.3.1", @@ -19,7 +19,7 @@ { "name": "021_14_01 After", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14_01", - "doc": "Check that you can query the temporal evolution of entities with the simplified representation", + "doc": "Check that one can query the temporal evolution of entities with the simplified representation", "tags": [ "5_7_4", "te-query" @@ -27,15 +27,15 @@ "setup": "Setup Initial Entities", "teardown": "Delete Initial Entities", "template": "Query the temporal evolution of 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 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-14-01.json'\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-08-01T12:04:00Z' 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: options set to 'temporalValues'\n}", + "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 '${EMPTY}'\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 '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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: options set to 'temporalValues'\n}", "http_verb": "GET", "endpoint": "temporal/entities" }, { "name": "021_14_02 Before", "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14_02", - "doc": "Check that you can query the temporal evolution of entities with the simplified representation", + "doc": "Check that one can query the temporal evolution of entities with the simplified representation", "tags": [ "5_7_4", "te-query" @@ -43,8 +43,24 @@ "setup": "Setup Initial Entities", "teardown": "Delete Initial Entities", "template": "Query the temporal evolution of 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 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-14-02.json'\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 'before' and\n Query Parameter: timeAt set to '2020-09-01T13:06:00Z' 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: options set to 'temporalValues'\n}", + "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 '${EMPTY}'\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 'before' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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: options set to 'temporalValues'\n}", + "http_verb": "GET", + "endpoint": "temporal/entities" + }, + { + "name": "021_14_02 Between", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14_02", + "doc": "Check that one can query the temporal evolution of entities with the simplified representation", + "tags": [ + "5_7_4", + "te-query" + ], + "setup": "Setup Initial Entities", + "teardown": "Delete Initial Entities", + "template": "Query the temporal evolution of 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 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file '2020-09-01T13:06:00Z'\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 'between' and\n Query Parameter: timeAt set to '${timeAt}' and\n Query Parameter: endTimeAt set to '${endTimeAt}' 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: options set to 'temporalValues'\n}", "http_verb": "GET", "endpoint": "temporal/entities" } -- GitLab From 826849401573f2b86ffb9902efa11ca34d15aa4d Mon Sep 17 00:00:00 2001 From: Thomas BOUSSELIN Date: Wed, 7 Aug 2024 09:03:28 +0200 Subject: [PATCH 16/16] feat: check response statuscode --- README.md | 1 + .../QueryTemporalEvolutionOfEntities/021_01.robot | 2 +- .../QueryTemporalEvolutionOfEntities/021_14.robot | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae294f75..40b7def7 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ to maintain and run the selected Test Cases from the pickle file. The list of co * Switch OFF Test Collections tsm collections off [collections] + ## 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_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot index f5c09bc2..6bbe5068 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -19,7 +19,7 @@ ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.json ${bus_payload_file}= 2020-08-bus-temporal-representation.jsonld -*** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE +*** Test Cases *** TIMEREL TIMEAT ENDTIMEAT EXPECTATION_FILE 021_01_01 After [Tags] te-query 5_7_4 after 2020-08-01T12:04:00Z ${EMPTY} vehicles-temporal-representation-021-01-01.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot index 77cd08e2..804a84e2 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot @@ -19,7 +19,7 @@ ${second_vehicle_payload_file}= 2020-09-vehicle-temporal-representation.json ${bus_payload_file}= 2020-08-bus-temporal-representation.jsonld -*** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE +*** Test Cases *** TIMEREL TIMEAT ENDTIMEAT EXPECTATION_FILE 021_14_01 After [Tags] te-query 5_7_4 after 2020-08-01T12:04:00Z ${EMPTY} vehicles-temporal-representation-021-14-01.json -- GitLab