Commit a0a173f4 authored by Giuseppe Tropea's avatar Giuseppe Tropea
Browse files

Merge remote-tracking branch 'origin/testsuitedata' into testsuitedata-statistics

parents e7dffdc4 0d2393f4
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -15,15 +15,16 @@ ${building_id_prefix}= urn:ngsi-ld:Building:


*** Test Cases ***    FILENAME
MinimalEntity    [Tags]    be-create    5_6_7
003_01_01 MinimalEntity
    [Tags]    be-create    5_6_7
    building-minimal-sample.jsonld
EntityWithSimpleProperties
003_01_02 EntityWithSimpleProperties
    [Tags]    be-create    5_6_7
    building-simple-attributes-sample.jsonld
EntityWithSimpleRelationships
003_01_03 EntityWithSimpleRelationships
    [Tags]    be-create    5_6_7
    building-relationship-sample.jsonld
EntityWithRelationshipsProperties
003_01_04 EntityWithRelationshipsProperties
    [Tags]    be-create    5_6_7
    building-relationship-of-property-sample.jsonld

+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:


*** Test Cases ***
Create a batch of two valid entities and one invalid entity
003_02_01 Create a batch of two valid entities and one invalid entity
    [Documentation]    Check that you can create a batch of two valid entities and one invalid entity
    [Tags]    be-create    5_6_7
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
+4 −2
Original line number Diff line number Diff line
@@ -9,9 +9,11 @@ Test Template Create Batch Entity With Invalid Request Scenarios


*** Test Cases ***    FILENAME    PROBLEM_TYPE
InvalidJson    [Tags]    be-create    5_6_7
003_03_01 InvalidJson
    [Tags]    be-create    5_6_7
    batch/invalid-json-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
EmptyJson    [Tags]    be-create    5_6_7
003_03_01 EmptyJson
    [Tags]    be-create    5_6_7
    batch/empty-sample.jsonld    ${ERROR_TYPE_BAD_REQUEST_DATA}


+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:


*** Test Cases ***
Create a batch of one entity using a provided Link header with JSON content type
003_04_01 Create a batch of one entity using a provided Link header with JSON content type
    [Documentation]    Check that the @context is obtained from a Link Header if the Content-Type header is "application/json"
    [Tags]    be-create    6_3_5
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
@@ -25,10 +25,10 @@ Create a batch of one entity using a provided Link header with JSON content type
    ...    content_type=${CONTENT_TYPE_JSON}
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    201    ${response.status_code}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}
    ${response}=    Retrieve Entity by Id    id=${entity_id}    context=${ngsild_test_suite_context}
    # Attribute should be compacted as we used the same context as provided when creating the entity
    Check Response Body Containing an Attribute set to    almostFull    ${response.json()}
    ${response}=    Retrieve Entity by Id    ${entity_id}
    ${response}=    Retrieve Entity by Id    id=${entity_id}
    # Attribute should not be compacted as we did not provide a context containing this attribute
    Check Response Body Containing an Attribute set to
    ...    https://ngsi-ld-test-suite/context#almostFull
+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building:


*** Test Cases ***
Create a batch of one entity using the default context with JSON content type
003_05_01 Create a batch of one entity using the default context with JSON content type
    [Documentation]    Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
    [Tags]    be-create    6_3_5
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
@@ -22,10 +22,10 @@ Create a batch of one entity using the default context with JSON content type
    @{entities_to_be_created}=    Create List    ${entity}
    ${response}=    Batch Create Entities    @{entities_to_be_created}    content_type=${CONTENT_TYPE_JSON}
    Check Response Status Code    201    ${response.status_code}
    ${response}=    Retrieve Entity by Id    ${entity_id}
    ${response}=    Retrieve Entity by Id    id=${entity_id}
    # Attribute should be compacted as we used the same default context as provided when creating the entity
    Check Response Body Containing an Attribute set to    almostFull    ${response.json()}
    ${response}=    Retrieve Entity by Id    ${entity_id}    context=${ngsild_test_suite_context}
    ${response}=    Retrieve Entity by Id    id=${entity_id}    context=${ngsild_test_suite_context}
    # Attribute should not be compacted as we did not provide a context containing this term
    Check Response Body Containing an Attribute set to    ngsi-ld:default-context/almostFull    ${response.json()}

Loading