TC9.12 - Management of Delegations on a sensor of an IoT Device

Test Case Title

TC9.12 - Management of Delegations on a sensor of an IoT Device

Goal

The goal for this test case is to present a scenario where a user manages (insert and remove) a delegation towards another user on a sensor of an IoT Device of his own.

Prerequisites

Using a PC with a web browser. You need credentials to access to the Node-Red application.

Two snap4city users registered with rule of AreaManager

Expected successful result

The data (produced by a delegated sensor of an IoT Device) are received by the delegated user as far as the delegation is not removed by the delegator user.

Steps

 

 

  1. Login with a user with Role AreaManager
  2. Create any IoT Device, for example an IoT Device of “Arduino UNO” model (as specified in Snap4City: Arduino & ESP8266 IOT Device NGSI)
  3. To show some data generated from the sensors of the created IoT Device, create a Dashboard via the Dashboard wizard, selecting firstly the “IOT devices” template. Specify a Dashboard title and click the Next button to go in the Data and Widgets  tab. 
     

    In the Data and Widgets tab, filter the “Value Name” as the Name of the IoT Device created at step 2 (This procedure is silimilar to what is described in TC2.19 -  Creating Dashboards with IOT broker connection back and forward). Select the sensor’s value to show and the type of the Dashboard, click the Next button.In the Check and Summary tab, check that all is OK and confirm. A Dashboard will be created presenting the sensor’s value you selected. 
      
  4. Alternately to step 3 (To show some data generated from the sensors of the created IoT Device), create an IoT Application using the “Fiware Orion” block and configure it with the information of the IoT Device created at step 2 (as specified in TC11.2 - Personal Data regarding IOT Devices on User profile devices and Keys) and link its output to the type of Dashboard you choose (as specified in TC2.20 - Creating Dashboards with IOT Application logic. Starting from new and old IOT application and get/connect a Dash, or from Dash connect and IOT app). A Dashboard will be create presenting the sensor’s value you selected in the “Fiware Orion” block.

  1. Add a Delegation on a sensor of the IoT Device you created at step 2 to a user with role AreaManager (for example create a Delegation to the user adifino on the sensor Humidity. A Delegation can also be created on any Group of the organization the delegator user belongs)
     

 

  1. Login with another user with Role AreaManager (in this example the user “adifino”)
  2. It’s possible to create a dashboard as in the step 3. The data will be present to the delegated user since the Delegation created at step 5.
  3. Alternately to step 7, it’s possible to create an IoT Application as specified at step 4. The information to fill in the “Fiware Orion” block  are retrieved from the list of the Delegated sensor.
     

     
  4. Whenever the Delegation is removed, the data created in the step 7 and step 8 will not be received anymore.