Evaluations as Tests

Any recorded evaluation can be saved as a test. The test keeps the values the rule read in production and, as its expected result, what the rule decided, so the real case can be run again whenever you like. Use it to keep the cases that matter, such as a decision a customer questioned, an unusual case, or one that once went wrong, and to check them again before a new version of the rule goes live.

You can also keep the evaluation's values as a value template, to start new tests from a real case. See Value Templates.

Saving an evaluation as a test needs its own permission, because the test keeps a copy of production data after the evaluation itself is gone. Without it, you can review evaluations but not save them as tests.

What the Save Test Dialog Asks For

Save as Test... opens the Save Test dialog over the evaluation. Its first line reminds you that the test holds only the values the rule read in production: fields the rule never read are empty. The test passes on the rule version that ran; against another version it may not.

Field What it is for
Test Name The test's name, shown in the Tests grid. Required: Save Test stays unavailable until it is filled in.
Test Description A short description of what the test checks.
Test Internal Note A working note for your colleagues, kept with the test.
Expected Result The result the test expects. It starts as the result the evaluation returned (True or False); change it if the rule decided wrongly and you want the test to fail until it is fixed.
Value Template Name Optional. Type a name to also keep the evaluation's values as a value template.

Saving an Evaluation as a Test

  1. Click Live Evaluations at the top of the screen, find the evaluation, and click its row. The Evaluation dialog opens. See Evaluations.
  2. Click Save as Test... at the bottom right of the dialog. The Save Test dialog opens.
  3. Type a Test Name, and optionally a Test Description and a Test Internal Note.
  4. Check the Expected Result, and change it if the rule should have decided differently.
  5. To keep the values as a value template as well, type a Value Template Name.
  6. Click Save Test. The notification "The test was saved." appears; click OK.

The new test belongs to the same rule version and the same source version as the evaluation. It is an Expectation test, and it already shows the evaluation's outcome as its last run. Find it in the Tests grid, open it, and run it like any other test. See Saved Tests.

Things to Know

  • Each evaluation is one test. When your application evaluated several rules for one case, each rule left its own evaluation; save the one for the rule you want to test.
  • Rules the rule used need nothing more. The test remembers which versions of them ran.
  • The values stay after the evaluation is gone. Only deleting the test, or its whole source object, removes them.

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

p102

l097 --

l102

p101

×