Skip to content
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_05_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_05",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_06_01",
"doc": "only the subscribed Entities matching the query and watched attributes shall be included.",
"tags": [
"046_06",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_07_01",
"doc": "The structure of the notification message shall be as mandated by clause 5.3. Valid notification with attributes as stated above",
"tags": [
"046_07",
"5_8_6",
"sub-notification"
],
......@@ -34,7 +33,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_07_02",
"doc": "The structure of the notification message shall be as mandated by clause 5.3. The Entity Attributes included (Properties or Relationships) shall be those specified by the notification.attributes member in the Subscription data type (clause 5.2.12).",
"tags": [
"046_07",
"5_8_6",
"sub-notification"
],
......@@ -51,7 +49,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_07_03",
"doc": "The structure of the notification message shall be as mandated by clause 5.3. URI expansion shall be observed (clause 5.5.7).",
"tags": [
"046_07",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_08_01",
"doc": "The structure of the notification message shall be as mandated by clause 5.3.1. The absence of the notification.attributes member of a Subscription means that all Entity Attributes shall be included. All attributes are included",
"tags": [
"046_08",
"5_8_6",
"sub-notification"
],
......@@ -34,7 +33,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_08_02",
"doc": "The structure of the notification message shall be as mandated by clause 5.3.1. The absence of the notification.attributes member of a Subscription means that all Entity Attributes shall be included If the notification.format member value is \"keyValues\" then a simplified representation of the entities (as mandated by clause 4.5.3) shall be provided",
"tags": [
"046_08",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_09_01",
"doc": "A Notification shall be sent (as mandated by each concrete binding and including any optional endpoint.receiverInfo defined by clause 5.2.22) to the endpoint specified by the endpoint.uri member of the notification structure defined by clause 5.2.1",
"tags": [
"046_09",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_10_01",
"doc": "The Notification shall be sent as JSON",
"tags": [
"046_10",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_11_01",
"doc": "The notification.timesSent member shall be incremented by one.",
"tags": [
"046_11",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_12_01",
"doc": "The status, lastNotification and lastSuccess members shall be updated with expected value and dates. This test will check these formats.",
"tags": [
"046_12",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_13_01",
"doc": "If the response to the notification request is different than 200 OK then implementations shall: Update notification.lastFailure with a timestamp representing the current date and time, update notification.status to \"failed\"",
"tags": [
"046_13",
"5_8_6",
"sub-notification"
],
......
......@@ -17,7 +17,6 @@
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_14_01",
"doc": "The Notification content shall be JSON-LD when endpoint.accept is set to 'application/ld+json'",
"tags": [
"046_14",
"5_8_6",
"sub-notification"
],
......
{
"tp_id": "TP/NGSI-LD/CI/SUB/046_15",
"test_objective": "If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.",
"reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.6",
"config_id": "",
"parent_release": "v1.3.1",
"pics_selection": "PICS_5_8_6",
"keywords": [
"Before Test",
"After Test"
],
"teardown": "After Test",
"initial_condition": "with {\n the SUT containing an initial state\n}",
"test_cases": [
{
"name": "046_15_01 Check that a notification is not sent if the throttling has not elapsed yet",
"permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_15_01",
"doc": "If a Subscription defines a throttling member, a Notification shall not be sent if the throttling specified (in seconds) has not elapsed yet.",
"tags": [
"5_8_6",
"sub-notification"
],
"setup": null,
"teardown": null,
"template": null,
"then": "then {\n the client at '${endpoint}' receives a valid Notification containing:\n Notification received After waiting '10' seconds and\n Notification received Waiting for no Notification data and\n Query Parameter: timeout set to '5'\n}",
"when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'airQualityLevel-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}",
"http_verb": "PATCH",
"endpoint": "entities/{entityId}/attrs/{attributeId}"
}
],
"permutations": [],
"robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour",
"robotfile": "046_15"
}
\ No newline at end of file
......@@ -224,6 +224,13 @@ class TestCIConsumptions(TestCase):
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_019_07(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/QueryEntities/019_07.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/019_07.json'
difference_file = f'{self.folder_test_suites}/doc/results/out_019_07.json'
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_018_01_01(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/Entity/RetrieveEntity/018_01_01.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/018_01_01.json'
......@@ -378,6 +385,13 @@ class TestCIConsumptions(TestCase):
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_021_14(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_14.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/021_14.json'
difference_file = f'{self.folder_test_suites}/doc/results/out_021_14.json'
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_020_01(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Consumption/020_01.json'
......
......@@ -70,6 +70,13 @@ class TestCISubscription(TestCase):
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_028_05(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/CreateSubscription/028_05.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/028_05.json'
difference_file = f'{self.folder_test_suites}/doc/results/out_028_05.json'
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_032_01(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/DeleteSubscription/032_01.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/032_01.json'
......@@ -189,6 +196,13 @@ class TestCISubscription(TestCase):
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_046_15(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_15.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_15.json'
difference_file = f'{self.folder_test_suites}/doc/results/out_046_15.json'
self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file)
def test_031_01(self):
robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot'
expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/031_01.json'
......
......@@ -38,6 +38,8 @@ Query Entities
... ${georel}=${EMPTY}
... ${coordinates}=${EMPTY}
... ${geometry}=${EMPTY}
... ${count}=${EMPTY}
... ${q}=${EMPTY}
${attrs_length}= Get Length ${attrs}
${accept_length}= Get Length ${accept}
${options_length}= Get Length ${options}
......@@ -77,6 +79,8 @@ Query Entities
IF '${geometry}'!=''
Set To Dictionary ${params} geometry=${geometry}
END
IF '${count}'!='' Set To Dictionary ${params} count=${count}
IF '${q}'!='' Set To Dictionary ${params} q=${q}
${response}= GET
... url=${url}/${ENTITIES_ENDPOINT_PATH}
......
......@@ -37,6 +37,7 @@ Query Temporal Representation Of Entities
... ${limit}=${EMPTY}
... ${lastN}=${EMPTY}
... ${accept}=${EMPTY}
... ${options}=${EMPTY}
${entity_types_length}= Get Length ${entity_types}
${entity_ids_length}= Get Length ${entity_ids}
${attrs_length}= Get Length ${attrs}
......@@ -78,6 +79,9 @@ Query Temporal Representation Of Entities
Set To Dictionary ${params} geoproperty=${geoproperty}
END
IF '${limit}'!='' Set To Dictionary ${params} limit=${limit}
IF '${options}'!=''
Set To Dictionary ${params} options=${options}
END
${response}= GET
... url=${temporal_api_url}/${TEMPORAL_ENTITIES_ENDPOINT_PATH}
......
......@@ -60,6 +60,10 @@ Check Response Headers Containing URI set to
... ignore_order=True
END
Check Response Headers Containing NGSILD-Results-Count Equals To
[Arguments] ${expected_result_count} ${response_headers}
Should Be Equal ${response_headers['NGSILD-Results-Count']} ${expected_result_count}
# Since Http headers names are case-insensitive (from Http specification)
# We check both Location and location headers
......