Commit 3f3029f4 authored by Giuseppe Tropea's avatar Giuseppe Tropea
Browse files

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

parents 48721dda c25a750d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -30,11 +30,11 @@ In order to install the ETSI NGSI-LD Test Suite, download the configuration scri

- For MacOS and Ubuntu, download the following file:

```$ curl https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/windows11/scripts/configure.sh > configure.sh```
```$ curl https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/scripts/configure.sh > configure.sh```

- For Windows, using Powershell download the following file (curl is an alias for Invoke-WebRequest in Powershell):

```> curl https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/windows11/scripts/configure.ps1 > configure.ps1```
```> curl https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/scripts/configure.ps1 > configure.ps1```

- For MacOS and Ubuntu, be sure that you have the proper execution permissions of the file and the user is included 
in the sudoers group, then execute the following script:
@@ -100,7 +100,7 @@ Now, you can launch the tests with the following command in MacOS or Linux:

```$ robot --outputdir ./results .```  

For Windows system, you can lauch the tests with the following command:
For Windows system, you can launch the tests with the following command:

```> robot --outputdir .\results .\TP\NGSI-LD```

@@ -146,8 +146,8 @@ Robot Framework. Our recommendations are:

- Install [Robot Framework Language Server](https://plugins.jetbrains.com/plugin/16086-robot-framework-language-server)

- Define as variable the path of the working directory. In Settings > Languages & Frameworks > Robot Framework (Project), 
insert the following: `{"EXECDIR": "{path}/auth-test-suite"}`
- Define as variable the path of the working directory. In Settings > Languages & Frameworks > Robot Framework 
(Project), insert the following: `{"EXECDIR": "{path}/auth-test-suite"}`.


### Run configurations (PyCharm)
+6 −6
Original line number Diff line number Diff line
@@ -22,25 +22,25 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building
    [Tags]    e-query    5_7_2
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${first_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response1.status_code}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${second_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response2.status_code}
    ${third_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${third_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response3}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${third_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response3.status_code}
    @{entities_ids_to_be_compared}=    Create List    ${first_entity_id}    ${second_entity_id}
    ${entities_ids_to_be_retrieved}=    Catenate    SEPARATOR=,    ${first_entity_id}    ${second_entity_id}
    ${entity_types_to_be_retrieved}=    Catenate    SEPARATOR=,    ${entity_type}
+10 −10
Original line number Diff line number Diff line
@@ -28,34 +28,34 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking
    [Tags]    e-query    5_7_2
    ${building_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${building_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${building_filename}
    ...    ${building_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response1.status_code}
    ${vehicle_entity_id}=    Generate Random Entity Id    ${vehicle_id_prefix}
    Set Suite Variable    ${vehicle_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${vehicle_filename}
    ...    ${vehicle_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response2.status_code}
    ${parking_entity_id}=    Generate Random Entity Id    ${parking_id_prefix}
    Set Suite Variable    ${parking_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response3}=    Create Entity Selecting Content Type
    ...    ${parking_filename}
    ...    ${parking_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response3.status_code}
    ${entity_types_to_be_retrieved}=    Catenate    SEPARATOR=,    ${vehicle_entity_type}    ${parking_entity_type}
    ${response}=    Query Entities    entity_types=${entity_types_to_be_retrieved}    accept=${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    200    ${response.status_code}
    @{entities_ids_to_be_compared}=    Create List    ${vehicle_entity_id}    ${parking_entity_id}
    Check Response Body Containing List Containing Entity Elements With Different Types
    ...    ${expectation_filename}
    ...    ${entities_ids_to_be_compared}
    ...    ${response.json()}
    ...    ${True}
    ...    filename=${expectation_filename}
    ...    entities_representation_ids=${entities_ids_to_be_compared}
    ...    response_body=${response.json()}
    ...    ignore_core_context_version=${True}


*** Keywords ***
+7 −7
Original line number Diff line number Diff line
@@ -23,18 +23,18 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.*
    [Tags]    e-query    5_7_2
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${first_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response1.status_code}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${second_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response2.status_code}
    ${entity_types_to_be_retrieved}=    Catenate    SEPARATOR=,    ${entity_type}
    @{entities_ids_to_be_compared}=    Create List    ${second_entity_id}    ${first_entity_id}
    ${response}=    Query Entities
@@ -42,9 +42,9 @@ ${entity_id_pattern}= urn:ngsi-ld:Building:.*
    ...    entity_types=${entity_types_to_be_retrieved}
    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing List Containing Entity Elements
    ...    ${expectation_filename}
    ...    ${entities_ids_to_be_compared}
    ...    ${response.json()}
    ...    expectation_filename=${expectation_filename}
    ...    entities_ids=${entities_ids_to_be_compared}
    ...    response_body=${response.json()}


*** Keywords ***
+4 −10
Original line number Diff line number Diff line
@@ -25,18 +25,18 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego
    [Tags]    e-query    5_7_2
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${first_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response1.status_code}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Suite Variable    ${second_entity_id}
    ${response}=    Create Entity Selecting Content Type
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename2}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code    201    ${response.status_code}
    Check Response Status Code    201    ${create_response2.status_code}
    ${attributes_to_be_retrieved}=    Catenate
    ...    SEPARATOR=,
    ...    ${attribute_airqualitylevel}
@@ -49,12 +49,6 @@ ${attribute_subcategory}= https://ngsi-ld-test-suite/context#subCatego
    ...    ${entities_ids_to_be_compared}
    ...    ${response.json()}

    Check Response Status Code    200    ${response.status_code}
    Check Response Body Containing List Containing Entity Elements
    ...    ${expectation_filename}
    ...    ${entities_ids_to_be_compared}
    ...    ${response.json()}


*** Keywords ***
Delete Entities
Loading