Test
Our online tester empowers you to comprehensively test the execution of decisions and rules with your own input data without leaving your environment.
The tester uses the same Decision Services API available in the InRule SaaS Portal ensuring that rule execution will work the same in the tester as compared to being called from end applications. It provides an authentic demonstration of your rules and evaluates the execution results for correctness, efficiency, performance, and edge cases.
Launching the tester
When a testable component is selected, Tester is selectable from the Tools section of the navigation panel.
To run a test
Select the component you would like to test and open the Tester from the Tools in the navigation panel.
If you are testing a flow, the flow is always executed in the context of the entity in which it is created.
- Add values to the input section of the tester. You can do this manually, via the Generate tool, or use JSON.
There are two ways to use JSON data:
- By pasting JSON in the JSON editor
- By using the Import button
- Select the Apply Rules button in the upper right corner of the Tester.
Once the test has been run, you are automatically navigated to the Output tab where you can see the result of your test.
Generate test data
The Generate tool lets you generate a single test data set for your selected rule set with the options: Realistic, Random, or Edge cases.
-
Generate Realistic Data – Default option. Generates plausible real-world-like test data.
-
Generate Random Data – Generates random valid values for each field.
-
Generate Edge Cases – Generates reasonable errors a user could make based on extremes within your data model.
Generated test data
From the Generated Test Data window, you can view what has been generated and Apply, Discard, or Regenerate it. The same functionality is available in the JSON view.
Using JSON in the tester
Input
This functionality replaces the input and output fields of the Tester with a JSON editor that is optimized for large data sets, which could otherwise cause the Tester to lag, or for users who already have existing JSON data sets.
1. Apply Rules
Click here to run the tester.
2. Import
Import a JSON file to use as your input data.
3. Export
Export your input data as a JSON file.
4. Reset
This will reset the values in your form.
5. Validate
Checks to see if the input schema is valid and compares it against the rule application schema in context.
6. Settings
Opens the settings sidebar.
Output
1. Show Summary
Opens the summary sidebar.
2. Export
Exports your input data as a JSON file.