Skip to content
046_07.json 4.42 KiB
Newer Older
{
  "tp_id": "TP/NGSI-LD/CI/SUB/046_07",
  "test_objective": "Check that a notification is only sent if and only if the status is active",
  "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.6",
  "config_id": "",
  "parent_release": "v1.3.1",
  "initial_condition": "with {\n    the SUT being in the \"initial state\" and\n    the SUT containing an initial Subscription ${subscription} \n        with an id set to ${subscription_id} \n}",
  "test_cases": [
    {
      "name": "046_07_01 Check notification structure",
      "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": [
      "setup": "Setup Initial Subscriptions",
      "teardown": "After Test",
      "then": "then {\n    the client at '${endpoint}' receives a valid Notification containing:\n        Notification received After waiting '5' seconds\n}",
lopezaguilar's avatar
lopezaguilar committed
      "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 '${fragment_filename}' and\n    Query Parameter: content_type set to 'application/ld+json'\n}",
lopezaguilar's avatar
lopezaguilar committed
      "endpoint": "entities/{entityId}/attrs/{attributeId}"
    },
    {
      "name": "046_07_02 Check correct attributes are included",
      "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": [
      "setup": "Setup Initial Subscriptions",
      "teardown": "After Test",
      "then": "then {\n    the client at '${endpoint}' receives a valid Notification containing:\n        Notification received After waiting '5' seconds     and\n        Notification received The dictionary `${notification}[data][0]' should contain the key 'airQualityLevel'\n}",
lopezaguilar's avatar
lopezaguilar committed
      "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 '${fragment_filename}' and\n    Query Parameter: content_type set to 'application/ld+json'\n}",
lopezaguilar's avatar
lopezaguilar committed
      "endpoint": "entities/{entityId}/attrs/{attributeId}"
    },
    {
      "name": "046_07_03 Check URI expansion is observed",
      "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": [
      "setup": "Setup Initial Subscriptions",
      "teardown": "After Test",
      "then": "then {\n    the client at '${endpoint}' receives a valid Notification containing:\n        Notification received After waiting '5' seconds     and\n        Notification received The dictionary `${notification}[data][0]' should contain the key 'https://ngsi-ld-test-suite/context#airQualityLevel'\n}",
lopezaguilar's avatar
lopezaguilar committed
      "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 '${fragment_filename}' and\n    Query Parameter: content_type set to 'application/ld+json'\n}",
lopezaguilar's avatar
lopezaguilar committed
      "endpoint": "entities/{entityId}/attrs/{attributeId}"
lopezaguilar's avatar
lopezaguilar committed
  "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour",