Skip to main content

What a successful test proves

A successful test proves more than “the flow ran.” It proves that the intended event supplied the intended data, the condition made the right decision, the action affected only the approved target, and a reviewer can locate the result. Use an approved non-production workspace, an isolated record such as PERMIT_TEST_001, and non-production members. Never validate a new automation with real citizen data, a production role scope, or an external recipient.

Test protocol

1. Define the expected path before running

Write down the following before opening the test panel: If you cannot describe the expected path, do not enable the automation yet.

2. Test the trigger in isolation

Use one source record. Cause the precise event: submit the intended form action, change the intended status, complete the intended task action, or call the intended dashboard/form interface. Inspect the resulting payload before mapping downstream fields. For a record event, KayanOS can expose values such as data, oldData, changedFields, and action. Check that the event is the one you expected—not simply an update that happened to occur on the same record.

3. Test the condition both ways

Run one case that should continue and one that should stop. For an inspection-routing flow, the positive case might move a complete application to Ready for inspection; the negative case might update a note or leave out the locality. The negative case must create no case, task, notification, document, or role change.

4. Add and verify one action at a time

Start with a read or lookup action. Then add one write, wait, response, document, or notification action and run the test again. After every run, locate the result in KayanOS rather than relying only on the automation output.

5. Verify the complete audit trail

For a successful run, confirm all of the following:
  • The source record has the expected relationship or status.
  • The created/updated target has the expected ID, values, and owner.
  • No duplicate record, task, notification, or document exists.
  • No unrelated record changed.
  • The notification reached only the intended internal member or scope.
  • A reviewer can trace the outcome from the source to the target and back.

6. Roll out in stages

Enable the smallest service scope first. Monitor the first approved live runs, compare them with the expected design, and keep a documented owner and disable path. Expand only after the service owner confirms that the hand-off is correct.

Diagnose failures in the right order

Known input-validation patterns

These validation patterns are useful when interpreting an action error:
  1. Send Notification: when you target a specific Member ID, leave Member Selectors empty unless the action is intentionally configured to use selectors. Supplying an unrelated text value in the optional selector control can cause a validation rejection.
  2. Create Record IDs: use the identifier format accepted by the target table. In a verified non-production run, letters, numbers, and underscores were accepted, while a table-prefixed value containing a colon was rejected. Use a neutral ID such as PERMIT_TEST_001; do not copy an internal-only naming convention into production logic.
The exact error output from the run is the primary evidence. Record the trigger, mapped inputs, error message, and the smallest change that resolves it.

A repeatable failure-report template

When a flow fails, capture this before changing anything:
This makes it possible to distinguish a configuration issue from a permission, data, or lifecycle issue without exposing unnecessary personal or service data.

Recovery after an unsafe or duplicate run

  1. Disable the automation if it can repeat the same effect.
  2. Identify every target created or changed by the run using the source relationship, run output, and timestamp.
  3. Do not delete records just to hide the problem; follow the approved correction or cancellation procedure.
  4. Correct the trigger, condition, duplicate guard, or target mapping in the non-production workspace.
  5. Repeat the positive and negative tests.
  6. Obtain owner review before re-enabling the flow.
Do not treat a successful test-panel response as completion. The test is complete only when the accountable reviewer can locate and verify the intended KayanOS result with no duplicate or unintended side effect.
KayanOS Automations test-run history for a controlled workflow.

Continue building