<test>

<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>
store | http://example.com/erp5 | base_url_x
openAndWait | ${base_url}/Zuite_setUpPersonTest |
verifyTextPresent |
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>

</test>

# Agenda

- See Data In Wendelin
- Download Data

This tutorial teaches how to verify data arrival on wendelin and how to download the data.

Before doing this tutorial make sure you read and completed the following tutorials

- HowTo Setup Sensor and IOT Gateway
- SlapOS HowTo Use SlapOS Client
- HowTo Supply Fluentd
- Fluentd Configuration File
- HowTo setup Fluentd on IOT Gateway
- HowTo setup Fluentd on Sensor

# Wendelin Dashboard

Open your Wendelin dashboard.

You see that new Data Stream and Data Ingestion were created.

# Data Stream

From your Wendelin dashboard click on Data Stream.

In Data Stream you can see the Total size (bytes) of the ingested data.

If you reload the page the size will change as new data arrives.

<test>

openAndWait | ${base_url_x}/web_site_module/default_wendelin_front/ |
waitForElementPresent | //div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1] |
verifyElementPresent | //div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1] |
verifyTextPresent | sensor_1-sample-environment-raw-data |
verifyElementPresent | //div[@data-gadget-scope="field_listbox_movement"]//div//div//div[@class='document_table']//table//tbody//tr[1] |
click | //div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1]//td[1]//a |
waitForElementPresent | //input[@id="field_my_title"] |
verifyTextPresent | Validated |

</test>

# Download Data

You can see and download data using the curl commad:

`curl -k -u [user]:[password] https://[hostname]/erp5/data_stream_module/[id] -r [start]-[end] --output data.txt`

As data can be very big you can define start and stop bytes to download a slice of data.