Loading README.md +12 −2 Original line number Diff line number Diff line Loading @@ -12,11 +12,14 @@ specification of the ETSI NGSI-LD API. - [Install the Test Suite](#install-the-test-suite) - [Configure the test suite](#configure-the-test-suite) - [Execute the NGSI-LD Test Suite](#execute-the-ngsi-ld-test-suite) - [Use the Test Suite Management (tsm) tool](#test-suite-management-tsm) - [Contribute to the Test Suite](#contribute-to-the-test-suite) - [Install IDE (PyCharm)](#install-ide-pycharm) - [Develop a new Test Case](#develop-a-new-test-case) - [Run configurations (PyCharm)](#run-configurations-pycharm) - [Pre commit](#pre-commit) - [Tooling](#tooling) - [Coding style](#coding-style-of-test-suites) - [Frameworks and libraries used in the project](#frameworks-and-libraries-used-in-the-project) - [Useful links](#useful-links) - [LICENSE](#license) Loading Loading @@ -111,7 +114,7 @@ execution of the following command in MacOS or Ubuntu: In case of Windows, you need to execute the following command: ```> .\.venv\scripts\activate.bat ``` ```> .\venv\Scripts\activate.bat ``` Now, you can launch the tests with the following command in MacOS or Linux: Loading Loading @@ -364,10 +367,13 @@ In these cases, it is needed to provide the corresponding information in the Pyt - In `doc/analysis/requests.py` if it is an endpoint operation (in `self.op` with the list and position of parameters, in `self.description` to reference the method that pretty print the operation, and add the method that pretty prints the operation) - When a new endpoint Keyword is created, additions have to be done in `doc/analysis/requests.py`: - Add corresponding entries in the `self.op` and `self.description` dictionaries in the initialization function of the `Requests` class - Implement the function generating the documentation related to the endpoint Keyword - When a new permutation is added in an existing Test Case, run the documentation generation script (`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 - When a new directory containing Test Cases is created, it has to be declared in `doc/analysis/generaterobotdata.py` along with its acronym Finally, check that everything is OK by running the unit tests: Loading @@ -376,6 +382,10 @@ Finally, check that everything is OK by running the unit tests: python -m unittest discover -s ./doc/tests -t ./doc ``` In order to help in investigating errors that can be encountered when generating the documentation, you can check in the [Documentation generation troubleshoot document](Troubleshoot_Documentation_Generation.md) for further documentation and tips. ### Run configurations (PyCharm) Two sample configurations have been created: Loading TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot +14 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entity Suite Teardown Delete Initial Entity Test Template Retrieve Detailed Representation Of Available Attribute *** Variables *** Loading @@ -16,16 +17,23 @@ ${filename}= building-simple-attributes.json ${expectation_file}= types/expectations/attribute-027-01.json *** Test Cases *** 027_02_01 Retrieve Detailed Representation Of Available Attribute [Documentation] Check that one can retrieve a list with a detailed representation of NGSI-LD attributes *** Test Cases *** ATTR_NAME 027_02_01 WithCompactedAttributeName [Tags] ed-attr 5_7_10 ${response}= Retrieve Attribute attribute_name=airQualityLevel context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Attribute element ${expectation_file} ${response.json()} airQualityLevel 027_02_02 WithExpandedAttributeName [Tags] ed-attr 5_7_10 https%3A%2F%2Fngsi-ld-test-suite%2Fcontext%23airQualityLevel *** Keywords *** Retrieve Detailed Representation Of Available Attribute [Documentation] Check that one can retrieve a list with a detailed representation of NGSI-LD attributes [Arguments] ${attributeName} ${response}= Retrieve Attribute attribute_name=${attributeName} context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Attribute element ${expectation_file} ${response.json()} Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${create_response}= Create Entity Selecting Content Type Loading TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot +14 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Suite Teardown Delete Initial Entities Test Template Retrieve Detailed Representation Of Available Entity Type *** Variables *** Loading @@ -16,16 +17,23 @@ ${filename}= building-simple-attributes.json ${expectation_file}= types/expectations/entity-type-info-024-01.json *** Test Cases *** 024_02_01 Retrieve Detailed Representation Of Available Entity Type [Documentation] Check that one can retrieve a detailed representation of a specified NGSI-LD entity type *** Test Cases *** TYPE 024_02_01 WithCompactedType [Tags] ed-type 5_7_7 ${response}= Retrieve Entity Type type=Building context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} Building 024_02_02 WithExpandedType [Tags] ed-type 5_7_7 https%3A%2F%2Fngsi-ld-test-suite%2Fcontext%23Building *** Keywords *** Retrieve Detailed Representation Of Available Entity Type [Documentation] Check that one can retrieve a detailed representation of a specified NGSI-LD entity type [Arguments] ${type} ${response}= Retrieve Entity Type type=${type} context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-location-attribute.jsonld ${expectation_filename}= building-geoproperty-query.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building ${georal}= equals ${georel}= equals ${geometry}= Point ${coordinates}= [13.3986, 52.5547] Loading @@ -30,7 +30,7 @@ ${coordinates}= [13.3986, 52.5547] ${response}= Query Entities ... entity_types=${entity_types_to_be_retrieved} ... accept=${CONTENT_TYPE_LD_JSON} ... georel=${georal} ... georel=${georel} ... geometry=${geometry} ... coordinates=${coordinates} Loading TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot +3 −2 Original line number Diff line number Diff line Loading @@ -22,9 +22,10 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building [Documentation] Check that one can query one entity via POST Interaction based on id [Tags] e-query 5_7_2 @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${entity_selector}= Create Dictionary id=${first_entity_id} type=${entity_type} @{entities}= Create List ${entity_selector} ${response}= Query Entities Via POST ... entity_id=${first_entity_id} ... entity_type=${entity_type} ... entities=${entities} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} Loading Loading
README.md +12 −2 Original line number Diff line number Diff line Loading @@ -12,11 +12,14 @@ specification of the ETSI NGSI-LD API. - [Install the Test Suite](#install-the-test-suite) - [Configure the test suite](#configure-the-test-suite) - [Execute the NGSI-LD Test Suite](#execute-the-ngsi-ld-test-suite) - [Use the Test Suite Management (tsm) tool](#test-suite-management-tsm) - [Contribute to the Test Suite](#contribute-to-the-test-suite) - [Install IDE (PyCharm)](#install-ide-pycharm) - [Develop a new Test Case](#develop-a-new-test-case) - [Run configurations (PyCharm)](#run-configurations-pycharm) - [Pre commit](#pre-commit) - [Tooling](#tooling) - [Coding style](#coding-style-of-test-suites) - [Frameworks and libraries used in the project](#frameworks-and-libraries-used-in-the-project) - [Useful links](#useful-links) - [LICENSE](#license) Loading Loading @@ -111,7 +114,7 @@ execution of the following command in MacOS or Ubuntu: In case of Windows, you need to execute the following command: ```> .\.venv\scripts\activate.bat ``` ```> .\venv\Scripts\activate.bat ``` Now, you can launch the tests with the following command in MacOS or Linux: Loading Loading @@ -364,10 +367,13 @@ In these cases, it is needed to provide the corresponding information in the Pyt - In `doc/analysis/requests.py` if it is an endpoint operation (in `self.op` with the list and position of parameters, in `self.description` to reference the method that pretty print the operation, and add the method that pretty prints the operation) - When a new endpoint Keyword is created, additions have to be done in `doc/analysis/requests.py`: - Add corresponding entries in the `self.op` and `self.description` dictionaries in the initialization function of the `Requests` class - Implement the function generating the documentation related to the endpoint Keyword - When a new permutation is added in an existing Test Case, run the documentation generation script (`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 - When a new directory containing Test Cases is created, it has to be declared in `doc/analysis/generaterobotdata.py` along with its acronym Finally, check that everything is OK by running the unit tests: Loading @@ -376,6 +382,10 @@ Finally, check that everything is OK by running the unit tests: python -m unittest discover -s ./doc/tests -t ./doc ``` In order to help in investigating errors that can be encountered when generating the documentation, you can check in the [Documentation generation troubleshoot document](Troubleshoot_Documentation_Generation.md) for further documentation and tips. ### Run configurations (PyCharm) Two sample configurations have been created: Loading
TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableAttributeInformation/027_02.robot +14 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entity Suite Teardown Delete Initial Entity Test Template Retrieve Detailed Representation Of Available Attribute *** Variables *** Loading @@ -16,16 +17,23 @@ ${filename}= building-simple-attributes.json ${expectation_file}= types/expectations/attribute-027-01.json *** Test Cases *** 027_02_01 Retrieve Detailed Representation Of Available Attribute [Documentation] Check that one can retrieve a list with a detailed representation of NGSI-LD attributes *** Test Cases *** ATTR_NAME 027_02_01 WithCompactedAttributeName [Tags] ed-attr 5_7_10 ${response}= Retrieve Attribute attribute_name=airQualityLevel context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Attribute element ${expectation_file} ${response.json()} airQualityLevel 027_02_02 WithExpandedAttributeName [Tags] ed-attr 5_7_10 https%3A%2F%2Fngsi-ld-test-suite%2Fcontext%23airQualityLevel *** Keywords *** Retrieve Detailed Representation Of Available Attribute [Documentation] Check that one can retrieve a list with a detailed representation of NGSI-LD attributes [Arguments] ${attributeName} ${response}= Retrieve Attribute attribute_name=${attributeName} context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing Attribute element ${expectation_file} ${response.json()} Setup Initial Entity ${entity_id}= Generate Random Entity Id ${building_id_prefix} ${create_response}= Create Entity Selecting Content Type Loading
TP/NGSI-LD/ContextInformation/Consumption/Discovery/RetrieveAvailableEntityTypeInformation/024_02.robot +14 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Setup Initial Entities Suite Teardown Delete Initial Entities Test Template Retrieve Detailed Representation Of Available Entity Type *** Variables *** Loading @@ -16,16 +17,23 @@ ${filename}= building-simple-attributes.json ${expectation_file}= types/expectations/entity-type-info-024-01.json *** Test Cases *** 024_02_01 Retrieve Detailed Representation Of Available Entity Type [Documentation] Check that one can retrieve a detailed representation of a specified NGSI-LD entity type *** Test Cases *** TYPE 024_02_01 WithCompactedType [Tags] ed-type 5_7_7 ${response}= Retrieve Entity Type type=Building context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} Building 024_02_02 WithExpandedType [Tags] ed-type 5_7_7 https%3A%2F%2Fngsi-ld-test-suite%2Fcontext%23Building *** Keywords *** Retrieve Detailed Representation Of Available Entity Type [Documentation] Check that one can retrieve a detailed representation of a specified NGSI-LD entity type [Arguments] ${type} ${response}= Retrieve Entity Type type=${type} context=${ngsild_test_suite_context} Check Response Status Code 200 ${response.status_code} Check Response Body Containing EntityTypeInfo element ${expectation_file} ${response.json()} Setup Initial Entities ${first_entity_id}= Generate Random Entity Id ${building_id_prefix} ${second_entity_id}= Generate Random Entity Id ${building_id_prefix} Loading
TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_01_05.robot +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ ${building_id_prefix}= urn:ngsi-ld:Building: ${filename}= building-location-attribute.jsonld ${expectation_filename}= building-geoproperty-query.jsonld ${entity_type}= https://ngsi-ld-test-suite/context#Building ${georal}= equals ${georel}= equals ${geometry}= Point ${coordinates}= [13.3986, 52.5547] Loading @@ -30,7 +30,7 @@ ${coordinates}= [13.3986, 52.5547] ${response}= Query Entities ... entity_types=${entity_types_to_be_retrieved} ... accept=${CONTENT_TYPE_LD_JSON} ... georel=${georal} ... georel=${georel} ... geometry=${geometry} ... coordinates=${coordinates} Loading
TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_02_01.robot +3 −2 Original line number Diff line number Diff line Loading @@ -22,9 +22,10 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building [Documentation] Check that one can query one entity via POST Interaction based on id [Tags] e-query 5_7_2 @{entities_ids_to_be_compared}= Create List ${first_entity_id} ${entity_selector}= Create Dictionary id=${first_entity_id} type=${entity_type} @{entities}= Create List ${entity_selector} ${response}= Query Entities Via POST ... entity_id=${first_entity_id} ... entity_type=${entity_type} ... entities=${entities} Check Response Status Code 200 ${response.status_code} Check Response Body Containing List Containing Entity Elements ... ${expectation_filename} Loading