The Test tab of the Tools pane allows you to simulate messages for specific assets to run the associated rules. The simulated messages are sent to the Axeda® Platform as if they came from the actual asset. This simulation allows you to test the rule configuration and effect of your rules before using them in production.
To test an expression rule, you must first configure and save a rule and apply the rule to specific models and assets. Then follow these steps.
1. Open the Test tab and click New Test.
2. Select the type of message to simulate (Data, Alarm, or Location). This will determine what condition in the Platform causes this rule to execute. This is required information and specifies what condition in the Platform causes this rule to execute. For complete details about the available events, refer to the topic, Triggers for Expression Rules.
3. Now specify the information needed to simulate a test message.
4. Type a name for the test, and then search for and select the asset for the simulated message.
5. The information required to simulate a test message varies based on the type of message you choose to simulate (Data, Alarm, or Location):
Note: For Alarm and Data tests, only data items for that asset are listed for selection as part of the test criteria. You must pre-create data items as part of your model configuration.
o Data test: Specify the data item(s) and value(s) to create in the simulated data message.
o Alarm test: Type an alarm name. Enter an alarm description (optional). Type a severity, and select the data item(s) and value(s) to create in the simulated alarm message (including data items is optional for Alarm tests).
o Location test: Type the location to create in the simulated location message. Use the format: latitude,longitude; for example, 42.994532,-71.2938472. (The Axeda Platform Web services and SDK express latitude and longitude using the World Geodetic System (WSG 84) coordinate system. This coordinate system is the one used by the Global Positioning System (GPS). For more information, refer to http://earth-info.nga.mil/GandG/publications/tr8350.2/tr8350_2.html).
6. Click Save.
7. Once you create a test, it appears in the Tests table of the Test tab in the appropriate section (Data, Alarm, or Location). Click on a test type (Data, Alarm, or Location) to expand its section and view the list of test messages.
8. Optional: Be sure that the Automatically view test results check box is checked if you want to view the test results automatically (the View tab will be brought forward when you execute a test).
9. Click on the Execute Test icon () next to the test(s) you want to send (this is the message that the Axeda Platform will evaluate). The icon will change to an open envelope () when the test has run. To send the same message more than once, click on the open envelope to reset the message, and then click once more to send the test.
10. To edit a Test message, click on the name of the Test message.
11. To delete a single test message, click , or delete all test messages by clicking the Clear Tests button.
12. If you did not choose to Automatically view test results, select the View tab of the Accordion to view the test results.