Using the test data services

Test data services

Difficulty: Advanced

Estimated Completion Time: 20 Mins

Version 1.7+

In this tutorial we will show you how to attach a widget to the dashboards testing data via the testing data web services. The testing data services provide three main types of data – random text, random numbers and test alerts. In this tutorial we will focus of the first 2 types, text and numbers, test alerts in covered in a later tutorial. So let’s get started. You will first need to Login to the dashboard builder to start the tutorial.

Step1 – Add two dynamic text box widgets to the dashboard.

Using the new widget button in the bottom left hand corner of the dashboard builder screen add two Dynamic text box widgets to the dashboard. Now position the widgets in the centre of the screen one below the other.

Step2 – Assign the random text datasource

Locate and press the spanner icon for the first dynamic text widget [#widget1). While inside the edit properties dialog locate the Chart Data Source property and paste the following code snippet into the property box. Now just press enter to save and close the dialog. This code snippet points the widget at a web service that generates random text.

[snippet id=”13″]

Step3 – Assign the random number datasource

Locate and press the spanner icon for the second dynamic text widget [#widget2). While inside the edit properties dialog locate the Chart Data Source property and paste the following code snippet into the property box. Now just press enter to save and close the dialog. This code snippet points the widget at a web service that generates random numbers between 20 and 95.

[snippet id=”14″]

Step4 – Display the random Text

Locate and press the spanner icon for the first dynamic text widget [#widget1). While inside the edit properties dialog locate the Data Source Type drop down and assign it to XML. Continue to scroll down the properties dialog and locate the Chart Template property. In this property paste the following code snippet to display the random text. Now just press enter to save and close the dialog.

[snippet id=”15″]

Step5 – Display the random Number

Locate and press the spanner icon for the second dynamic text widget [#widget2). While inside the edit properties dialog locate the Data Source Type drop down and assign it to XML. Continue to scroll down the properties dialog and locate the Chart Template property. In this property paste the following code snippet to display the random number. Now just press enter to save and close the dialog.

[snippet id=”16″]

That’s all done. Please enjoy your new menu random data widgets! View the dashboard using the View dashboard button located in the top right section of the dashboard builder. You should have already noticed the random data appear.

TIP

You can set the “Refresh Interval” interval property and have the widget go and collect random data at timed intervals. To try this locate and press the spanner icon for the either dynamic text widget. While inside the edit properties dialog locate the refresh interval property and assign it a value greater than 0. This property defined the number of seconds to wait before fetching a new random value. Setting the value to 0 means the widget will only fetch one value at load time. Now just press enter to save and close the dialog.

For extra information, guidance and troubleshooting consult:

Leave a Reply