Skip to content
Commits on Source (9)
......@@ -221,13 +221,15 @@ In these cases, it is needed to provide the corresponding information in the Pyt
- When a new Test Case is created, it has to be declared in the corresponding `doc/tests/test_{group}.py` Python file
(where `{group}` represents the group of operations and how they are defined in the ETSI RGS/CIM-0012v211 document).
It includes the creation of the corresponding expected result inside the `doc/files` folders to compare the generation
of the documentation. Complementary to this, updates have to be done:
Complementary to this, updates have to be done:
- In `doc/analysis/initial_setup.py` if it uses a new keyword to set up the initial state of the Test Case
- In `doc/analysis/requests.py` if it updates an endpoint operation, for instance by adding support for a new request
parameter (in `self.op` with the list and position of parameters, in the method that pretty prints the operation in
the automated generation of the documentation associated with the Test Cases. If the positions array is empty, it
means that all the parameters will be taken into consideration)
- Run the documentation generation script (`python doc/generateDocumentationData.py {new_tc_id}`) for the new Test
Case and copy the generated JSON file in the folder containing all files for the given group and subgroup
(`cp doc/results/{new_tc_id}.json doc/files/{group}/{subgroup}`)
- When a new global Keyword is created, it has to be declared in the corresponding Python files:
- In `doc/analysis/checks.py` if it is an assertion type keyword (in `self.checks` to reference the method that pretty
prints the operation and `self.args` to identify the position of the arguments) and the corresponding method to
......@@ -235,10 +237,17 @@ 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 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
its acronym
Then a new version of the documentation can be generated by running the `doc/generateDocumentationData.py` Python script.
Finally, check that everything is OK by running the unit tests:
```shell
python -m unittest discover -s ./doc/tests -t ./doc
```
### Run configurations (PyCharm)
......
*** Settings ***
Documentation If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.
Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource
Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource ${EXECDIR}/resources/JsonUtils.resource
Suite Setup Setup Initial Entities
Suite Teardown Delete Initial Entities
Test Template Query Entities With Count
*** Variables ***
${building_id_prefix}= urn:ngsi-ld:Building:
${first_entity_filename}= building-simple-attributes-sample.jsonld
${second_entity_filename}= building-simple-attributes-second-sample.jsonld
${entity_type}= Building
${airQualityLevel}= airQualityLevel==6
*** Test Cases *** Q_PARAMETER EXPECTED_STATUS EXPECTED_COUNT
019_07_01 Check that the total number of matching results is returned if the count parameter is set to true and only the entity type is provided
${EMPTY} 200 2
019_07_02 Check that the total number of matching results is returned if the count parameter is set to true and a q parameter is provided
${airQualityLevel} 200 1
*** Keywords ***
Query Entities With Count
[Documentation] If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.
[Tags] e-query 5_7_2 6_3_13
[Arguments] ${q} ${expected_status_code} ${expected_count}
${response}= Query Entities
... entity_types=${entity_type}
... q=${q}
... count=${True}
... context=${ngsild_test_suite_context}
Check Response Status Code ${expected_status_code} ${response.status_code}
Check Response Headers Containing NGSILD-Results-Count Equals To ${expected_count} ${response.headers}
Setup Initial Entities
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
Set Suite Variable ${first_entity_id}
${create_response1}= Create Entity Selecting Content Type
... ${first_entity_filename}
... ${first_entity_id}
... ${CONTENT_TYPE_LD_JSON}
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}
${create_response2}= Create Entity Selecting Content Type
... ${second_entity_filename}
... ${second_entity_id}
... ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${create_response2.status_code}
Delete Initial Entities
Delete Entity by Id ${first_entity_id}
Delete Entity by Id ${second_entity_id}
*** Settings ***
Documentation Check that you can query the temporal evolution of entities with the simplified representation
Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource
Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource
Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource ${EXECDIR}/resources/JsonUtils.resource
Test Setup Setup Initial Entities
Test Teardown Delete Initial Entities
Test Template Query the temporal evolution of entities
*** Variables ***
${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
*** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE
021_14_01 After
[Tags] te-query 5_7_4
after 2020-08-01T12:04:00Z vehicles-temporal-representation-021-14-01-expectation.json
021_14_02 Before
[Tags] te-query 5_7_4
before 2020-09-01T13:06:00Z vehicles-temporal-representation-021-14-02-expectation.json
*** Keywords ***
Query the temporal evolution of entities
[Documentation] Check that you can query the temporal evolution of entities with the simplified representation
[Arguments] ${timerel} ${timeat} ${expectation_file}
${entity_types_to_be_retrieved}= Catenate SEPARATOR=, Vehicle
${response}= Query Temporal Representation Of Entities
... entity_types=${entity_types_to_be_retrieved}
... timerel=${timerel}
... timeAt=${timeat}
... context=${ngsild_test_suite_context}
... options=temporalValues
@{temporal_entities_representation_ids}= Create List
... ${first_temporal_entity_representation_id}
... ${second_temporal_entity_representation_id}
Check Response Status Code 200 ${response.status_code}
Check Response Body Containing List Containing EntityTemporal elements
... ${expectation_file}
... ${temporal_entities_representation_ids}
... ${response.json()}
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 Test Variable ${first_temporal_entity_representation_id}
Set Test Variable ${second_temporal_entity_representation_id}
Set Test 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}
*** Settings ***
Documentation Check that you cannot create a subscription with invalid throttling
Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource
Resource ${EXECDIR}/resources/AssertionUtils.resource
Test Template Create Subscription With Invalid Throttling
*** Test Cases *** FILENAME EXPECTED_STATUS
028_05_01 ThrottlingAndTimeIntervalConjunction
subscription-invalid-throttling-timeInterval-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA}
028_05_02 NegativeThrottling
subscription-invalid-negative-throttling-sample.jsonld ${ERROR_TYPE_BAD_REQUEST_DATA}
*** Keywords ***
Create Subscription With Invalid Throttling
[Documentation] Check that you cannot create a subscription with invalid throttling
[Tags] sub-create 5_8_1
[Arguments] ${filename} ${expected_status}
${response}= Create Subscription From File ${filename}
Check Response Status Code 400 ${response.status_code}
Check Response Body Containing ProblemDetails Element Containing Type Element set to
... ${response.json()}
... ${expected_status}
Check Response Body Containing ProblemDetails Element Containing Title Element ${response.json()}
*** Settings ***
Documentation If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.
Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource
Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource
Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource ${EXECDIR}/resources/JsonUtils.resource
Resource ${EXECDIR}/resources/NotificationUtils.resource
Suite Setup Before Test
Suite Teardown After Test
*** Variables ***
${subscription_id_prefix}= urn:ngsi-ld:Subscription:
${subscription_payload_file_path}= subscriptions/subscription-valid-throttling-sample.jsonld
${building_id_prefix}= urn:ngsi-ld:Building:
${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify
${entity_building_filepath}= building-simple-attributes-sample.jsonld
${fragment_filename}= airQualityLevel-fragment.jsonld
*** Test Cases ***
046_15_01 Check that a notification is not sent if the throttling has not elapsed yet
[Documentation] If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.
[Tags] sub-notification 5_8_6
Setup Initial Subscriptions
${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON}
${notification} ${headers}= Wait for notification timeout=${10}
${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON}
Wait for no notification
*** Keywords ***
Before Test
Start Local Server ${notification_server_host} ${notification_server_port}
Setup Initial Subscriptions
${subscription_id}= Generate Random Entity Id ${subscription_id_prefix}
${entity_id}= Generate Random Entity Id ${building_id_prefix}
${subscription_payload}= Load Subscription Sample With Reachable Endpoint
... ${subscription_payload_file_path}
... ${subscription_id}
... ${notification_server_send_url}
${subscription_payload}= Set Entity Id In Subscription ${subscription_payload} ${entity_id}
Set Suite Variable ${entity_id}
Set Suite Variable ${subscription_id}
Create Entity ${entity_building_filepath} ${entity_id}
Sleep 1s
Create Subscription From Subscription Payload ${subscription_payload} ${CONTENT_TYPE_LD_JSON}
Sleep 1s
After Test
Delete Initial Subscriptions
Delete Initial Entity
Stop Local Server
Delete Initial Subscriptions
Delete Subscription ${subscription_id}
Delete Initial Entity
Delete Entity by Id ${entity_id}
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"name": {
"type": "Property",
"value": "Pisa Tower"
},
"subCategory": {
"type": "Property",
"value": "tourism"
},
"airQualityLevel": {
"type": "Property",
"value": 6,
"unitCode": "C62",
"observedAt": "2020-10-10T16:40:00.000Z"
},
"almostFull": {
"type": "Property",
"value": true
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
{
"id":"urn:ngsi-ld:Subscription:randomUUID",
"type":"Subscription",
"entities":[
{
"type":"Building"
}
],
"notification":{
"format":"keyValues",
"endpoint":{
"uri":"http://my.endpoint.org/notify",
"accept":"application/json"
}
},
"throttling" : -30
}
\ No newline at end of file
{
"id":"urn:ngsi-ld:Subscription:randomUUID",
"type":"Subscription",
"timeInterval": 10,
"entities":[
{
"type":"Building"
}
],
"notification":{
"format":"keyValues",
"endpoint":{
"uri":"http://my.endpoint.org/notify",
"accept":"application/json"
}
},
"throttling" : 30
}
\ No newline at end of file
{
"id":"urn:ngsi-ld:Subscription:randomUUID",
"type":"Subscription",
"entities":[
{
"type":"Building"
}
],
"notification":{
"format":"keyValues",
"endpoint":{
"uri":"http://my.endpoint.org/notify",
"accept":"application/json"
}
},
"throttling" : 15,
"@context":[
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
[
{
"id": "urn:ngsi-ld:Vehicle:randomUUID",
"type": "Vehicle",
"speed": {
"type": "Property",
"values": [
[
80.0,
"2020-08-01T12:05:00Z"
],
[
100.0,
"2020-08-01T12:07:00Z"
]
]
},
"fuelLevel": {
"type": "Property",
"values": [
[
53.0,
"2020-08-01T13:05:00Z"
],
[
40.0,
"2020-08-01T14:07:00Z"
]
]
}
},
{
"id": "urn:ngsi-ld:Vehicle:randomUUID",
"type": "Vehicle",
"speed": {
"type": "Property",
"values": [
[
120.0,
"2020-09-01T12:03:00Z"
],
[
80.0,
"2020-09-01T12:05:00Z"
],
[
100.0,
"2020-09-01T12:07:00Z"
]
]
},
"fuelLevel": {
"type": "Property",
"values": [
[
67.0,
"2020-09-01T12:03:00Z"
],
[
53.0,
"2020-09-01T13:05:00Z"
],
[
40.0,
"2020-09-01T14:07:00Z"
]
]
}
}
]
[
{
"id": "urn:ngsi-ld:Vehicle:randomUUID",
"type": "Vehicle",
"speed": {
"type": "Property",
"values": [
[
120.0,
"2020-08-01T12:03:00Z"
],
[
80.0,
"2020-08-01T12:05:00Z"
],
[
100.0,
"2020-08-01T12:07:00Z"
]
]
},
"fuelLevel": {
"type": "Property",
"values": [
[
67.0,
"2020-08-01T12:03:00Z"
],
[
53.0,
"2020-08-01T13:05:00Z"
],
[
40.0,
"2020-08-01T14:07:00Z"
]
]
}
},
{
"id": "urn:ngsi-ld:Vehicle:randomUUID",
"type": "Vehicle",
"speed": {
"type": "Property",
"values": [
[
120.0,
"2020-09-01T12:03:00Z"
],
[
80.0,
"2020-09-01T12:05:00Z"
],
[
100.0,
"2020-09-01T12:07:00Z"
]
]
},
"fuelLevel": {
"type": "Property",
"values": [
[
67.0,
"2020-09-01T12:03:00Z"
],
[
53.0,
"2020-09-01T13:05:00Z"
]
]
}
}
]
\ No newline at end of file
......@@ -105,7 +105,9 @@ class Checks:
'Check Response Reason set to':
Checks.check_response_reason_set_to,
'Check Response Does Not Contain Body':
Checks.check_response_does_not_contain_body
Checks.check_response_does_not_contain_body,
'Check Response Headers Containing NGSILD-Results-Count Equals To' :
Checks.check_response_header_contains_ngsild_results_count_equals_to,
}
self.args = {
......@@ -303,6 +305,11 @@ class Checks:
'params': ['response'],
'position': [0]
}
,
'Check Response Headers Containing NGSILD-Results-Count Equals To': {
'params': ['expected_result_count' , 'response_headers'],
'position': [0, 1]
}
}
@staticmethod
......@@ -871,6 +878,14 @@ class Checks:
else:
raise Exception(f"ERROR, Expected 'expected_value' and 'obtained_value' parameters but received: '{kwargs}'")
@staticmethod
def check_response_header_contains_ngsild_results_count_equals_to(kwargs: list) -> str:
if 'expected_result_count' in kwargs:
expected_result_count = kwargs['expected_result_count']
return f'Response Header: NGSILD-Results-Count equals to {expected_result_count}'
else:
raise Exception(f"ERROR, Expected 'expected_result_count' but received: '{kwargs}'")
def get_checks(self, **kwargs) -> str:
checking = None
......@@ -977,6 +992,7 @@ if __name__ == "__main__":
'Check Created Resources Set To']
, status_code=201))
print()
print(data.get_checks(checks='Check Response Headers Containing NGSILD-Results-Count Equals To'))
# Check exceptions
try:
......
......@@ -62,7 +62,7 @@ class Requests:
'params': ['context', 'entity_types', 'entity_ids', 'entity_id_pattern',
'ngsild_query', 'csf', 'georel', 'geometry',
'coordinates', 'geoproperty', 'timerel', 'timeAt',
'attrs', 'limit', 'lastN', 'accept']
'attrs', 'limit', 'lastN', 'accept', 'options']
},
'Query Temporal Representation Of Entities Via Post': {
'positions': [],
......@@ -85,7 +85,7 @@ class Requests:
'params': ['entity_ids', 'entity_types', 'accept',
'attrs', 'context', 'geoproperty',
'options', 'limit', 'entity_id_pattern',
'georel', 'coordinates', 'geometry']
'georel', 'coordinates', 'geometry', 'count', 'q']
},
'Query Entities Via POST': {
'positions': [],
......@@ -1025,7 +1025,7 @@ class Requests:
expected_parameters = ['context', 'entity_types', 'entity_ids', 'entity_id_pattern',
'ngsild_query', 'csf', 'georel', 'geometry',
'coordinates', 'geoproperty', 'timerel', 'timeAt',
'attrs', 'limit', 'lastN', 'accept']
'attrs', 'limit', 'lastN', 'accept', 'options']
result = [x for x in kwargs if x not in expected_parameters]
response = "Query Temporal Representation of Entities"
......@@ -1064,6 +1064,8 @@ class Requests:
response = f"{response} and\n Query Parameter: lastN set to '{value}'"
case 'accept':
response = f"{response} and\n Query Parameter: accept set to '{value}'"
case 'options':
response = f"{response} and\n Query Parameter: options set to '{value}'"
# If an exact match is not confirmed, this last case will be used if provided
case _:
......@@ -1131,7 +1133,7 @@ class Requests:
expected_parameters = ['entity_ids', 'entity_types', 'accept',
'attrs', 'context', 'geoproperty',
'options', 'limit', 'entity_id_pattern',
'georel', 'coordinates', 'geometry']
'georel', 'coordinates', 'geometry', 'count' , 'q']
result = [x for x in kwargs if x not in expected_parameters]
response = "Get Entities Request:"
......@@ -1162,6 +1164,10 @@ class Requests:
response = f"{response} and\n Query Parameter: coordinates set to '{value}'"
case 'geometry':
response = f"{response} and\n Query Parameter: geometry set to '{value}'"
case 'count':
response = f"{response} and\n Query Parameter: count set to '{value}'"
case 'q':
response = f"{response} and\n Query Parameter: q set to '{value}'"
case _:
raise Exception(f"ERROR, unexpected attribute '{result}', the attributes expected are "
f"'{expected_parameters}', but received: {kwargs}")
......
{
"tp_id": "TP/NGSI-LD/CI/Cons/E/019_07",
"test_objective": "If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.",
"reference": "ETSI GS CIM 009 V1.3.1 [], clause 6.3.13",
"config_id": "",
"parent_release": "v1.3.1",
"pics_selection": "PICS_6_3_13",
"keywords": [
"Setup Initial Entities",
"Delete Initial Entities"
],
"teardown": "Delete Initial Entities",
"initial_condition": "with {\n the SUT containing an initial state\n}",
"test_cases": [
{
"name": "019_07_01 Check that the total number of matching results is returned if the count parameter is set to true and only the entity type is provided",
"permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_07_01",
"doc": "If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.",
"tags": [
"e-query",
"5_7_2",
"6_3_13"
],
"setup": null,
"teardown": null,
"template": "Query Entities With Count",
"then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to ${expected_status_code} and\n Query Entities with Response Header: NGSILD-Results-Count equals to 2\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: q set to '${q}' and\n Query Parameter: count set to '${True}' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"'\n}",
"http_verb": "GET",
"endpoint": "entities/"
},
{
"name": "019_07_02 Check that the total number of matching results is returned if the count parameter is set to true and a q parameter is provided",
"permutation_tp_id": "TP/NGSI-LD/CI/Cons/E/019_07_02",
"doc": "If the count parameter is set to true the special HTTP header NGSILD-Results-Count is set in the response and it must contain the total number of matching results.",
"tags": [
"e-query",
"5_7_2",
"6_3_13"
],
"setup": null,
"teardown": null,
"template": "Query Entities With Count",
"then": "then {\n the SUT sends a valid Response for the operations:\n Query Entities with Response Status Code set to ${expected_status_code} and\n Query Entities with Response Header: NGSILD-Results-Count equals to 1\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'GET'\n Get Entities Request: and\n Query Parameter: entity_types set to 'Building' and\n Query Parameter: q set to '${q}' and\n Query Parameter: count set to '${True}' and\n Query Parameter: Link set to '<$https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\";type=\"application/ld+json\"'\n}",
"http_verb": "GET",
"endpoint": "entities/"
}
],
"permutations": [
"then"
],
"robotpath": "ContextInformation/Consumption/Entity/QueryEntities",
"robotfile": "019_07"
}
\ No newline at end of file
{
"tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14",
"test_objective": "Check that you can query the temporal evolution of entities with the simplified representation",
"reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.7.4",
"config_id": "",
"parent_release": "v1.3.1",
"pics_selection": "PICS_5_7_4",
"keywords": [],
"teardown": "None",
"initial_condition": "with {\n the SUT being in the \"initial state\" and\n and containing a list of entities\n}",
"test_cases": [
{
"name": "021_14_01 After",
"permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14_01",
"doc": "Check that you can query the temporal evolution of entities with the simplified representation",
"tags": [
"5_7_4",
"te-query"
],
"setup": "Setup Initial Entities",
"teardown": "Delete Initial Entities",
"template": "Query the temporal evolution of entities",
"then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-14-01-expectation.json'\n and using the list of entity ids define in '${temporal_entities_representation_ids}'\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'after' and\n Query Parameter: timeAt set to '2020-08-01T12:04:00Z' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}",
"http_verb": "GET",
"endpoint": "temporal/entities"
},
{
"name": "021_14_02 Before",
"permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/021_14_02",
"doc": "Check that you can query the temporal evolution of entities with the simplified representation",
"tags": [
"5_7_4",
"te-query"
],
"setup": "Setup Initial Entities",
"teardown": "Delete Initial Entities",
"template": "Query the temporal evolution of entities",
"then": "then {\n the SUT sends a valid Response for the operations:\n Query Temporal Representation Of Entities with Response Status Code set to 200 and\n Query Temporal Representation Of Entities with Request response body containing a list that contains Entity Temporal Elements\n compared with file 'vehicles-temporal-representation-021-14-02-expectation.json'\n and using the list of entity ids define in '${temporal_entities_representation_ids}'\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/temporal/entities'\n method set to 'GET'\n Query Temporal Representation of Entities and\n Query Parameter: entity_types set to '${entity_types_to_be_retrieved}' and\n Query Parameter: timerel set to 'before' and\n Query Parameter: timeAt set to '2020-09-01T13:06:00Z' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld' and\n Query Parameter: options set to 'temporalValues'\n}",
"http_verb": "GET",
"endpoint": "temporal/entities"
}
],
"permutations": [
"then",
"when"
],
"robotpath": "ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities",
"robotfile": "021_14"
}
\ No newline at end of file
{
"tp_id": "TP/NGSI-LD/CI/SUB/028_05",
"test_objective": "Check that you cannot create a subscription with invalid throttling",
"reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.1",
"config_id": "",
"parent_release": "v1.3.1",
"pics_selection": "PICS_5_8_1",
"keywords": [],
"teardown": "None",
"initial_condition": "with {\n the SUT containing an initial state\n}",
"test_cases": [
{
"name": "028_05_01 ThrottlingAndTimeIntervalConjunction",
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/028_05_01",
"doc": "Check that you cannot create a subscription with invalid throttling",
"tags": [
"sub-create",
"5_8_1"
],
"setup": null,
"teardown": null,
"template": "Create Subscription With Invalid Throttling",
"then": "then {\n the SUT sends a valid Response for the operations:\n Create Subscription From File with Response Status Code set to 400 and\n Create Subscription From File with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Create Subscription From File with Response body containing 'title' element\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Create Subscription Request with Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscription-invalid-throttling-timeInterval-sample.jsonld'\n}",
"http_verb": "POST",
"endpoint": "subscriptions/"
},
{
"name": "028_05_02 NegativeThrottling",
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/028_05_02",
"doc": "Check that you cannot create a subscription with invalid throttling",
"tags": [
"sub-create",
"5_8_1"
],
"setup": null,
"teardown": null,
"template": "Create Subscription With Invalid Throttling",
"then": "then {\n the SUT sends a valid Response for the operations:\n Create Subscription From File with Response Status Code set to 400 and\n Create Subscription From File with Response Body containing the type 'https://uri.etsi.org/ngsi-ld/errors/BadRequestData' and\n Create Subscription From File with Response body containing 'title' element\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/subscriptions/'\n method set to 'POST'\n Create Subscription Request with Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'subscription-invalid-negative-throttling-sample.jsonld'\n}",
"http_verb": "POST",
"endpoint": "subscriptions/"
}
],
"permutations": [
"when"
],
"robotpath": "ContextInformation/Subscription/CreateSubscription",
"robotfile": "028_05"
}
\ No newline at end of file
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_01_01",
"doc": "Check that a notification is only sent if and only if the status is active",
"tags": [
"046_01",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_02_01",
"doc": "If a Subscription defines a timeInterval member, a Notification shall be sent periodically, when the time interval (in seconds) specified in such value field is reached, regardless of Attribute changes.",
"tags": [
"046_02",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_03_01",
"doc": "A notification with all subscribed Entities will be included if query or geoquery are not defined.",
"tags": [
"046_03",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_04_01",
"doc": "The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions",
"tags": [
"046_04",
"5_8_6",
"sub-notification"
],
......