A Singapore Government Agency Website

How to test decisions

What this feature does

Opus provides three levels of decision testing: node-level simulation, regression testing with saved test suites, and real-time monitoring of executed decisions. These ensure your business rules return correct outcomes before production deployment.

Scope: This guide covers testing, regression testing, and monitoring decisions. It does not cover creating decisions (refer to How to build decisions) or releasing to production (refer to How to publish and release).

Who this applies to

  • Audience: Developers testing decision automations in Opus
  • Access required: Editor or Administrator role on the project
  • Assumed knowledge: You have a decision with configured input and rule nodes. Refer to How to build decisions.

Steps

Step 1: Test individual nodes

Use the Node Test Panel to test a single rule node with sample input.

  1. Select a rule node on the canvas and open its settings.
  2. In the Node Test Panel, enter test data as a JSON object.
  3. Select Run Test to see the node’s output.

Step 2: Test the full decision

Test the complete decision with end-to-end input data.

  1. In the Decision Editor toolbar, select Simulate.
  2. Enter the input payload as JSON matching the decision’s input schema.
  3. Select Execute. The output shows the decision’s result and the path taken through the rule nodes.

Step 3: Create regression tests

Regression test suites validate that changes to your decision do not break existing behaviour. Each decision can have one or more test suites.

  1. Navigate to the decision’s Test Suite tab.
  2. Select Create Test Suite.
  3. Add test cases — each case defines an input payload and the expected output.
  4. Select Run to execute all test cases and compare actual vs expected results.

Run regression tests before publishing changes. Refer to How to publish and release for the full release workflow.

Step 4: Monitor execution

Track executed decisions in real time.

  1. Open the decision’s Monitor view.
  2. Select an execution to view the trace — input data, output data, and the path through each rule node.
  3. Select individual nodes to inspect their specific input, output, and timing.

Constraints and limitations

Constraint Detail
Payload preview limit 2 KB per node during monitoring
Nesting depth 5 levels maximum for decisions referencing other decisions
Chat with me!
Bot Launcher