From d18ec9ae51ce28d777fa7dd72461023c35c87385 Mon Sep 17 00:00:00 2001 From: Houcem Kacem Date: Fri, 18 Dec 2020 11:50:15 +0100 Subject: [PATCH 1/4] feat: add tp 021_11 --- .../021_11.robot | 52 +++++++ ...epresentation-021-11-01-expectation.jsonld | 86 ++++++++++++ ...epresentation-021-11-02-expectation.jsonld | 128 ++++++++++++++++++ resources/ApiUtils.resource | 3 +- 4 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-11-01-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-11-02-expectation.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot new file mode 100644 index 00000000..8e81be60 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities with a limit to the number of entities to be retrieved +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Query the temporal evolution of entities with a limit to the number of entities to be retrieved + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${bus_id_prefix}= urn:ngsi-ld:Bus: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${bus_payload_file}= 2020-08-bus-temporal-representation-sample.jsonld + +${expectation_file}= vehicles-temporal-representation-021-11-expectation.jsonld + +*** Test Cases *** LIMIT EXPECTATION_FILE TEMPORAL_ENTITIES_REPRESENTATION_IDS +Query Some entities ${2} vehicles-temporal-representation-021-11-01-expectation.jsonld ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} +Query All entities ${10} vehicles-temporal-representation-021-11-02-expectation.jsonld ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} ${third_temporal_entity_representation_id} + +*** Keywords *** +Query the temporal evolution of entities with a limit to the number of entities to be retrieved + [Arguments] ${limit} ${expectation_file} @{temporal_entities_representation_ids} + [Documentation] Check that you can query the temporal evolution of entities with a limit to the number of entities to be retrieved + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle Bus + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} limit=${limit} timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +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} + ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_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} + Create Temporal Representation Of Entity ${bus_payload_file} ${third_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + Set Suite Variable ${third_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} + Delete Temporal Representation Of Entity ${third_temporal_entity_representation_id} diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-11-01-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-11-01-expectation.jsonld new file mode 100644 index 00000000..fdbbaea5 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-11-01-expectation.jsonld @@ -0,0 +1,86 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "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" + } + ], + "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" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07: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-11-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-11-02-expectation.jsonld new file mode 100644 index 00000000..5396ce0d --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-11-02-expectation.jsonld @@ -0,0 +1,128 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "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" + } + ], + "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" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07: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" + } + ] + }, + { + "id":"urn:ngsi-ld:Bus:randomUUID", + "type":"Bus", + "brandName":{ + "type":"Property", + "value":"Mercedes" + }, + "fuelLevel":[ + { + "type":"Property", + "value":210, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":145, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":124, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":45, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":25, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 28d92519..330a0905 100644 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -149,7 +149,7 @@ Retrieve Temporal Representation Of Entity Set Test Variable ${response} Query Temporal Representation Of Entities - [Arguments] ${context}=${EMPTY} ${entity_types}=${EMPTY} ${entity_ids}=${EMPTY} ${entity_id_pattern}=${EMPTY} ${ngsild_query}=${EMPTY} ${georel}=${EMPTY} ${geometry}=${EMPTY} ${coordinates}=${EMPTY} ${geoproperty}=${EMPTY} ${timerel}=${EMPTY} ${timeAt}=${EMPTY} ${attrs}=${EMPTY} ${lastN}=${EMPTY} + [Arguments] ${context}=${EMPTY} ${entity_types}=${EMPTY} ${entity_ids}=${EMPTY} ${entity_id_pattern}=${EMPTY} ${ngsild_query}=${EMPTY} ${georel}=${EMPTY} ${geometry}=${EMPTY} ${coordinates}=${EMPTY} ${geoproperty}=${EMPTY} ${timerel}=${EMPTY} ${timeAt}=${EMPTY} ${attrs}=${EMPTY} ${limit}=${EMPTY} ${lastN}=${EMPTY} ${entity_types_length} = Get Length ${entity_types} ${entity_ids_length} = Get Length ${entity_ids} ${attrs_length} = Get Length ${attrs} @@ -168,6 +168,7 @@ Query Temporal Representation Of Entities Run Keyword If '${geometry}'!='' Set To Dictionary ${params} geometry=${geometry} Run Keyword If '${coordinates}'!='' Set To Dictionary ${params} coordinates=${coordinates} Run Keyword If '${geoproperty}'!='' Set To Dictionary ${params} geoproperty=${geoproperty} + Run Keyword If '${limit}'!='' Set To Dictionary ${params} limit=${limit} ${response}= GET ${TEMPORAL_ENTITIES_ENDPOINT_PATH} headers=${headers} query=${params} Output request -- GitLab From 6a4919ad1dc85d0a446daf060695b123d7af78db Mon Sep 17 00:00:00 2001 From: Houcem Kacem Date: Fri, 18 Dec 2020 11:58:01 +0100 Subject: [PATCH 2/4] feat: add tp 021_12 --- .../021_11.robot | 2 +- .../021_12.robot | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot index 8e81be60..b1fdaa47 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_11.robot @@ -19,7 +19,7 @@ ${expectation_file}= vehicles-temporal-representation-021-11-expectation.json *** Test Cases *** LIMIT EXPECTATION_FILE TEMPORAL_ENTITIES_REPRESENTATION_IDS Query Some entities ${2} vehicles-temporal-representation-021-11-01-expectation.jsonld ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} -Query All entities ${10} vehicles-temporal-representation-021-11-02-expectation.jsonld ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} ${third_temporal_entity_representation_id} +Query All entities ${20} vehicles-temporal-representation-021-11-02-expectation.jsonld ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} ${third_temporal_entity_representation_id} *** Keywords *** Query the temporal evolution of entities with a limit to the number of entities to be retrieved diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot new file mode 100644 index 00000000..6bfb3e01 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_12.robot @@ -0,0 +1,32 @@ +*** Settings *** +Documentation Check that you cannot query the temporal evolution of entities with an invalid request or invalid request content +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld + +*** Test Case *** +Query the temporal evolution of entities with an invalid request + [Documentation] Check that you cannot query the temporal evolution of entities with an invalid request + [Tags] mandatory + + Query Temporal Representation Of Entities timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + Check Response Status Code Set To 400 + Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_BAD_REQUEST_DATA} + Check Response Body Containing ProblemDetails Element Containing Title Element ${response} + +*** Keywords *** +Setup Initial Entities + ${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 Entities + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} -- GitLab From 45639955c5f315996f2a14a0dff39d7c1cd33ecd Mon Sep 17 00:00:00 2001 From: Houcem Kacem Date: Fri, 18 Dec 2020 12:47:38 +0100 Subject: [PATCH 3/4] feat: add tp 021_13 --- .../021_13.robot | 43 +++++++++++++++ .../entity-operations-after-query.jsonld | 9 ++++ .../entity-operations-before-query.jsonld | 9 ++++ ...epresentation-021-13-01-expectation.jsonld | 52 +++++++++++++++++++ ...epresentation-021-13-02-expectation.jsonld | 52 +++++++++++++++++++ resources/ApiUtils.resource | 11 ++++ 6 files changed, 176 insertions(+) create mode 100644 TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot create mode 100644 data/temporalEntities/entity-operations-after-query.jsonld create mode 100644 data/temporalEntities/entity-operations-before-query.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-13-01-expectation.jsonld create mode 100644 data/temporalEntities/expectations/vehicles-temporal-representation-021-13-02-expectation.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot new file mode 100644 index 00000000..fddc62ad --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_13.robot @@ -0,0 +1,43 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities using the entityOperations method +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Query the temporal evolution of entities using the entityOperations method + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld + +*** Test Cases *** PAYLOAD_FILE EXPECTATION_FILE +After entity-operations-after-query.jsonld vehicles-temporal-representation-021-13-01-expectation.jsonld +Before entity-operations-before-query.jsonld vehicles-temporal-representation-021-13-02-expectation.jsonld + +*** Keywords *** +Query the temporal evolution of entities using the entityOperations method + [Arguments] ${payload_file} ${expectation_file} + [Documentation] Check that you can query the temporal evolution of entities using the entityOperations method + [Tags] mandatory + + Query Temporal Representation Of Entities Via Post ${payload_file} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +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/data/temporalEntities/entity-operations-after-query.jsonld b/data/temporalEntities/entity-operations-after-query.jsonld new file mode 100644 index 00000000..494f7062 --- /dev/null +++ b/data/temporalEntities/entity-operations-after-query.jsonld @@ -0,0 +1,9 @@ +{ + "type":"Vehicle", + "timerel":"after", + "timeAt":"2020-08-02T12:05:00Z", + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/entity-operations-before-query.jsonld b/data/temporalEntities/entity-operations-before-query.jsonld new file mode 100644 index 00000000..9a5ab48f --- /dev/null +++ b/data/temporalEntities/entity-operations-before-query.jsonld @@ -0,0 +1,9 @@ +{ + "type":"Vehicle", + "timerel":"before", + "timeAt":"2020-08-02T12:05:00Z", + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-01-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-01-expectation.jsonld new file mode 100644 index 00000000..4adef51e --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-01-expectation.jsonld @@ -0,0 +1,52 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + } + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07: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-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-02-expectation.jsonld new file mode 100644 index 00000000..7fbe7c43 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-13-02-expectation.jsonld @@ -0,0 +1,52 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "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" + } + ], + "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" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + } + } +] \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 330a0905..7f4723b5 100644 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -14,6 +14,7 @@ ${BATCH_DELETE_ENDPOINT_PATH} entityOperations/delete &{BATCH_OPERATION_ENDPOINT_MAPPING} create=${BATCH_CREATE_ENDPOINT_PATH} upsert=${BATCH_UPSERT_ENDPOINT_PATH} update=${BATCH_UPDATE_ENDPOINT_PATH} delete=${BATCH_DELETE_ENDPOINT_PATH} ${ENTITIES_ENDPOINT_PATH} entities ${TEMPORAL_ENTITIES_ENDPOINT_PATH} temporal/entities +${TEMPORAL_ENTITIES_ENTITY_OPERATIONS_ENDPOINT_PATH} temporal/entityOperations ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_LD_JSON} application/ld+json @@ -175,6 +176,16 @@ Query Temporal Representation Of Entities Output response Set Test Variable ${response} +Query Temporal Representation Of Entities Via Post + [Arguments] ${query_file_name} + ${headers}= Create Dictionary + Set To Dictionary ${headers} Content-Type ${CONTENT_TYPE_LD_JSON} + ${query_payload}= Load Json From File ${EXECDIR}/data/temporalEntities/${query_file_name} + ${response}= POST ${TEMPORAL_ENTITIES_ENTITY_OPERATIONS_ENDPOINT_PATH}/query body=${query_payload} headers=${headers} + Output request + Output response + Set Test Variable ${response} + Delete Temporal Representation Of Entity [Arguments] ${temporal_entity_representation_id} -- GitLab From 0dd88f48127ae835e0508c053bd8bb53f802fee8 Mon Sep 17 00:00:00 2001 From: Houcem Kacem Date: Fri, 18 Dec 2020 14:53:37 +0100 Subject: [PATCH 4/4] refactor: rename variables --- resources/ApiUtils.resource | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 7f4723b5..50407fe7 100644 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -14,7 +14,7 @@ ${BATCH_DELETE_ENDPOINT_PATH} entityOperations/delete &{BATCH_OPERATION_ENDPOINT_MAPPING} create=${BATCH_CREATE_ENDPOINT_PATH} upsert=${BATCH_UPSERT_ENDPOINT_PATH} update=${BATCH_UPDATE_ENDPOINT_PATH} delete=${BATCH_DELETE_ENDPOINT_PATH} ${ENTITIES_ENDPOINT_PATH} entities ${TEMPORAL_ENTITIES_ENDPOINT_PATH} temporal/entities -${TEMPORAL_ENTITIES_ENTITY_OPERATIONS_ENDPOINT_PATH} temporal/entityOperations +${TEMPORAL_ENTITY_OPERATIONS_ENDPOINT_PATH} temporal/entityOperations ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_LD_JSON} application/ld+json @@ -181,7 +181,7 @@ Query Temporal Representation Of Entities Via Post ${headers}= Create Dictionary Set To Dictionary ${headers} Content-Type ${CONTENT_TYPE_LD_JSON} ${query_payload}= Load Json From File ${EXECDIR}/data/temporalEntities/${query_file_name} - ${response}= POST ${TEMPORAL_ENTITIES_ENTITY_OPERATIONS_ENDPOINT_PATH}/query body=${query_payload} headers=${headers} + ${response}= POST ${TEMPORAL_ENTITY_OPERATIONS_ENDPOINT_PATH}/query body=${query_payload} headers=${headers} Output request Output response Set Test Variable ${response} -- GitLab