Test Results

When a test runs, the Test Result dialog shows what the rule did with the values you gave it, step by step: which conditions were true or false and why, which branch of the rule ran, which fields it changed, which actions it called and which in-rule methods it used. For an Expectation test, it also shows which of your expectations were met. Use it to understand a rule's behavior, to find out why a rule did not do what you expected, and to decide whether a version is ready to go live.

The Test Result dialog has these parts:

  • The line at the top says what was tested: the rule version or draft, its rule, and the source version it ran against. Each name is a link that opens its dialog.
  • The Fields View on the left shows your values again, now beside what the run produced. Fields the rule changed show their new values; each in-rule method call shows the value it returned. For an Expectation test, every expectation is marked as met or missed.
  • The rule in the middle, read-only (Rule Definition: Disabled). Hovering over a step on the right lights up the part of the rule it is about.
  • The result on the right:
    • The head: the outcome (RAN when the rule finished, or an error), a sentence with the rule's result (for example, "The rule ran and returned TRUE."), when the test ran, how long it took, and the Precision and Rounding it used.
    • The steps, grouped by the rule's sections (IF, THEN, ELSE IF, ELSE). Each condition shows whether it was TRUE or FALSE and the values it compared. Each section that did not run says not reached. A field the rule set shows its value before and after, such as null → 37.5.
    • RULE RESULT: the rule's own result and the reason, such as "IF was true, so THEN ran".
    • For an Expectation test, whether the test Passed or Failed, and each expectation that was missed, with what was expected and what came out.
  • The footer: Back to Test on the left; Delete Test and Save Test... on the right.

Reading a Result

  1. Look at the head first. RAN means the rule finished; the sentence beside it gives its result. If the run failed, the head says so and shows the error message.
  2. Read the steps from the top. A green check marks a condition that was true; the values under it show what was compared.
  3. Look for not reached to see which parts of the rule did not run.
  4. Check the RULE RESULT line for why the rule returned what it did.
  5. For an Expectation test, look for Failed and the expectations listed as missed. The Fields View marks the same expectations, so you can see which field or call was wrong.
  6. If the rule calls other rules, their steps appear in the steps too, under the call.

Going Back to the Test

Click Back to Test. The Test dialog comes back with your values and the rule as they were, so you can change a value, or the rule if it is editable, and click Run again.

Saving the Test from Its Result

Click Save Test... to save the test together with this run. The run is kept with the test as its last run: its outcome, when it ran and who ran it. See Saved Tests.

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×