Evaluating Test Results for an expression rule

After running a test, view the results to determine if you need to modify the rule configuration before using it in production. View your test results by clicking the View tab (on the Tools Pane). The rule results from the asset you just tested are displayed at the top of the list in the Test Results table. Only the last 50 rule test results per asset are shown for rules that were triggered by the test event. You can also search for test results of previously sent messages from any assets, including any associated assets. Test results include the date and time the message was sent, the Rule name, and the IF result.  If the test resulted in a rule failure, the error icon appears (error_exclamation.png). Mouse over the error icon to view the explanation for the rule failure.

Note: If you choose to Automatically view test results in the Test tab, the View tab is brought to the front automatically when you execute a test.

The View tab on the Tools Pane captures the following errors:

o        Recursion Errors  - The condition in a rule is created either by an action in the same rule or by an action in another rule in a sequence, thus causing that rule to run over and over again, potentially in an infinite loop.

o        Non-Boolean If expressions - The If expression does not evaluate to true or false (1 or 0).   

o        Non-existent Custom Object referenced in an ExecuteCustomObject action.

o        Data type conversion errors

o        Any runtime exceptions thrown from functions or actions.

Unexpected results or no results shown

If you don't see the test results that you expect, do one or both of the following:

o        Verify that each of your tests are associated with assets.

o        Give the Platform time to record/process the new messages for tests (For example, processing an alarm message may result in a delay).  Click the Refresh button above the Test Results table to view any delayed results.

If there are no test results, then the Platform does not support the processing of live messages in its current state.  If this is the case, then the results will be provided only when debugging tests (non-production mode).

To evaluate your test results

1.       Optional: Search for a specific asset, model, or "asset name || model name" combination by typing in the Find rule results for asset field and clicking Search. The search will pull up all assets and models with names containing the string that you have typed in the search field.

2.       From the drop-down list above the Test Results table, select Group by Test type (to group the test results by Data, Alarm, or Location) or Group by Asset name.

Note:  If there are asset associations for the asset you created the test for (in this case, Asset1), then a drop-down list appears below the Find rule results for asset field that lists all associated assets. Select an associated asset to view the rule results for that asset instead.

3.       Click on a Test type (Data, Alarm, or Location), or an Asset name to expand its section and view the list of results.

4.       Failed test results are marked with an error icon (error_exclamation.png). Mouse over an icon to view the explanation for the failure or click on the rule name  to view the expression with corresponding values (name, value, type) in the Rule Builder.  The expressions (If, Then, or Else) will be marked with the following icons (if there is no icon in front of an expression, then it was not executed at all):  

error_debug_message.png  This expression of the expression rule was executed at runtime, but an error was thrown.  
good_debug_message.png  This expression of the expression rule was executed, and no errors were detected.  
 

5.       Use the expression rule form to edit the expression rule and fix any of the errors identified through testing (See Syntax guidelines for expression rules).

6.       Click Clear to empty the list of test results and start a new search, or a new test.