Loading TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +3 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Template Create Batch Entity Scenarios Test Template Batch Create Entity Scenarios *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: Loading @@ -12,10 +12,11 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Cases *** FILENAME MinimalEntity building-minimal-sample.jsonld EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Create Batch Entity Scenarios Batch Create Entity Scenarios [Arguments] ${filename} [Documentation] Check that you can create a batch of entities [Tags] mandatory entityOperations Loading TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_03.robot +9 −11 Original line number Diff line number Diff line Loading @@ -3,21 +3,19 @@ Documentation Check that you cannot create a batch of entities with an invalid Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource *** Test Case *** With invalid json document [Documentation] Check that you cannot create a batch of entities with an invalid json document [Tags] mandatory Batch Request Entities From File create filename=batch/invalid-json-sample.jsonld Test Template Create Batch Entity With Invalid Request Scenarios Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} *** Test Cases *** FILENAME InvalidJson batch/invalid-json-sample.jsonld EmptyJson batch/empty-sample.jsonld With empty json document [Documentation] Check that you cannot create a batch of entities with an empty json document *** Keywords *** Create Batch Entity With Invalid Request Scenarios [Arguments] ${filename} [Documentation] Check that you cannot create a batch of entities with an invalid request [Tags] mandatory Batch Request Entities From File create filename=batch/empty-sample.jsonld Batch Request Entities From File create filename=${filename} Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_03.robot +9 −11 Original line number Diff line number Diff line Loading @@ -3,21 +3,19 @@ Documentation Check that you cannot delete a batch of entities with an invalid Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource *** Test Case *** With invalid json document [Documentation] Check that you cannot delete a batch of entities with an invalid json document [Tags] mandatory Batch Request Entities From File delete filename=batch/invalid-json-sample.jsonld Test Template Batch Delete Entity With Invalid Request Scenarios Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} *** Test Cases *** FILENAME InvalidJson batch/invalid-json-sample.jsonld EmptyJson batch/empty-sample.jsonld With empty json document [Documentation] Check that you cannot delete a batch of entities with an empty json document *** Keywords *** Batch Delete Entity With Invalid Request Scenarios [Arguments] ${filename} [Documentation] Check that you cannot delete a batch of entities with an invalid request [Tags] mandatory Batch Request Entities From File delete filename=batch/empty-sample.jsonld Batch Request Entities From File delete filename=${filename} Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +16 −8 Original line number Diff line number Diff line Loading @@ -5,27 +5,31 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Test Template Batch Update Entity Scenarios Suite Teardown Delete Initial Entities *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities *** Test Cases *** FILENAME EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Batch Update Entity Scenarios [Arguments] ${filename} [Documentation] Check that you can update a batch of entities [Tags] mandatory ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} Check Response Status Code Set To 204 @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading @@ -34,3 +38,7 @@ Setup Initial Entities Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +16 −8 Original line number Diff line number Diff line Loading @@ -5,27 +5,31 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Test Template Batch Update Entity With NoOverwrite Option Scenarios Suite Teardown Delete Initial Entities *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities with noOverwrite option *** Test Cases *** FILENAME EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Batch Update Entity With NoOverwrite Option Scenarios [Arguments] ${filename} [Documentation] Check that you can update a batch of entities with noOverwrite option [Tags] mandatory ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} overwrite_option=noOverwrite Check Response Status Code Set To 204 @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading @@ -34,3 +38,7 @@ Setup Initial Entities Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True Loading
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_01.robot +3 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Test Template Create Batch Entity Scenarios Test Template Batch Create Entity Scenarios *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: Loading @@ -12,10 +12,11 @@ ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Cases *** FILENAME MinimalEntity building-minimal-sample.jsonld EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Create Batch Entity Scenarios Batch Create Entity Scenarios [Arguments] ${filename} [Documentation] Check that you can create a batch of entities [Tags] mandatory entityOperations Loading
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/CreateBatchOfEntities/003_03.robot +9 −11 Original line number Diff line number Diff line Loading @@ -3,21 +3,19 @@ Documentation Check that you cannot create a batch of entities with an invalid Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource *** Test Case *** With invalid json document [Documentation] Check that you cannot create a batch of entities with an invalid json document [Tags] mandatory Batch Request Entities From File create filename=batch/invalid-json-sample.jsonld Test Template Create Batch Entity With Invalid Request Scenarios Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} *** Test Cases *** FILENAME InvalidJson batch/invalid-json-sample.jsonld EmptyJson batch/empty-sample.jsonld With empty json document [Documentation] Check that you cannot create a batch of entities with an empty json document *** Keywords *** Create Batch Entity With Invalid Request Scenarios [Arguments] ${filename} [Documentation] Check that you cannot create a batch of entities with an invalid request [Tags] mandatory Batch Request Entities From File create filename=batch/empty-sample.jsonld Batch Request Entities From File create filename=${filename} Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response}
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/DeleteBatchOfEntities/006_03.robot +9 −11 Original line number Diff line number Diff line Loading @@ -3,21 +3,19 @@ Documentation Check that you cannot delete a batch of entities with an invalid Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource *** Test Case *** With invalid json document [Documentation] Check that you cannot delete a batch of entities with an invalid json document [Tags] mandatory Batch Request Entities From File delete filename=batch/invalid-json-sample.jsonld Test Template Batch Delete Entity With Invalid Request Scenarios Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response} *** Test Cases *** FILENAME InvalidJson batch/invalid-json-sample.jsonld EmptyJson batch/empty-sample.jsonld With empty json document [Documentation] Check that you cannot delete a batch of entities with an empty json document *** Keywords *** Batch Delete Entity With Invalid Request Scenarios [Arguments] ${filename} [Documentation] Check that you cannot delete a batch of entities with an invalid request [Tags] mandatory Batch Request Entities From File delete filename=batch/empty-sample.jsonld Batch Request Entities From File delete filename=${filename} Check RL Response Status Code Set To 400 Check RL Response Body Containing Problem Details Element Containing Detail Element ${response}
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_01.robot +16 −8 Original line number Diff line number Diff line Loading @@ -5,27 +5,31 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Test Template Batch Update Entity Scenarios Suite Teardown Delete Initial Entities *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities *** Test Cases *** FILENAME EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Batch Update Entity Scenarios [Arguments] ${filename} [Documentation] Check that you can update a batch of entities [Tags] mandatory ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} Check Response Status Code Set To 204 @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading @@ -34,3 +38,7 @@ Setup Initial Entities Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True
TP/NGSI-LD/ContextInformation/Provision/BatchEntities/UpdateBatchOfEntities/005_02.robot +16 −8 Original line number Diff line number Diff line Loading @@ -5,27 +5,31 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Test Template Batch Update Entity With NoOverwrite Option Scenarios Suite Teardown Delete Initial Entities *** Variable *** ${building_id_prefix}= urn:ngsi-ld:Building: *** Test Case *** Update a batch of entities with noOverwrite option *** Test Cases *** FILENAME EntityWithSimpleProperties building-simple-attributes-sample.jsonld EntityWithSimpleRelationships building-relationship-sample.jsonld EntityWithRelationshipsProperties building-relationship-of-property-sample.jsonld *** Keywords *** Batch Update Entity With NoOverwrite Option Scenarios [Arguments] ${filename} [Documentation] Check that you can update a batch of entities with noOverwrite option [Tags] mandatory ${first_entity}= Load Entity building-relationship-of-property-sample.jsonld ${first_entity_id} ${second_entity}= Load Entity building-relationship-of-property-sample.jsonld ${second_entity_id} ${first_entity}= Load Entity ${filename} ${first_entity_id} ${second_entity}= Load Entity ${filename} ${second_entity_id} @{entities_to_be_updated}= Create List ${first_entity} ${second_entity} Batch Update Entities @{entities_to_be_updated} overwrite_option=noOverwrite Check Response Status Code Set To 204 @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} *** Keywords *** Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading @@ -34,3 +38,7 @@ Setup Initial Entities Set Suite Variable ${first_entity_id} Set Suite Variable ${second_entity_id} Delete Initial Entities @{entities_ids_to_be_deleted}= Create List ${first_entity_id} ${second_entity_id} Batch Delete Entities @{entities_ids_to_be_deleted} teardown=True