Workflows testing strategies

Overview

To edit and test your Workflows, you can use several strategies. We'll describe how you can:

  • Use the Tag Object step
  • Stage a roll-out
  • Use Live Test (for API-triggered Workflows)
  • Copy the Workflow

Then, we'll describe how these strategies can be used in these sample scenarios:

  • Testing a completely new Workflow
  • Modifying a Workflow that is running in Production

Testing strategies

Use the Tag Object step

The Tag Object Workflow step lets you apply a tag to an object you choose.

workflows-tag-object-step.png

You can use the Tag Object step in several ways to help you test. Here's one method:

  1. Add the Tag Object step to your Workflow. Depending on what you want to test, choose the best option below.
    • Insert a temporary Tag Object step: You can insert a Tag Object step anywhere in your Workflow that you want to test.
    • Swap in a Tag Object step for another Action step: If there is an Action Step you do not want to run during testing, you can temporarily swap it for a Tag Object step while you’re testing.
  2. Trigger a run of your Workflow.
  3. See if the Tag Object step ran according to the logic you expect your Workflow to have. You can inspect an object in the Persona Dashboard to see if it was tagged with the test Tag.

Recommendations

  • Create a dedicated test Tag when testing your Workflow. This ensures that there aren’t any side-effects to applying this Tag to an object.
  • You can use the Remove Tag Workflow step to clean up any test Tags that you applied to objects. You may want to insert a Wait step before the Remove Tag step, with a time period that allows you to inspect the impact of the earlier Tag Object step.

Stage a roll-out

You can roll out a new version of a Workflow gradually using the roll-out feature. Learn more about roll-outs here.

For example, you can roll out a Workflow to 5% or 10%, wait for a set amount of time, and examine the results.

workflows-stage-a-roll-out.png

Use Live Test (for API-triggered Workflows)

If your Workflow is API-triggered, you can test the Workflow using the Live Test feature.

The Live Test feature lets you easily input a custom payload through the Workflow Editor UI, and click to send a request to trigger your Workflow.

To use Live Test, open a Workflow in the Workflow Editor, and select the starting API Trigger step. Find the Live Test feature in the Trigger Step settings.

workflows-live-test.png

Copy the Workflow

You can create a second Workflow that is a copy of the Workflow you want to edit and test. This copy can act as a testing grounds.

To duplicate a Workflow, follow these instructions.

This strategy requires the biggest effort. Consider if other strategies can work for you.

Sample scenarios

In all cases, exercise judgment to pick an appropriate testing strategy for your particular use case and change. Below are ideas to help you formulate your own testing strategy.

Testing a completely new Workflow

With a completely new Workflow, you can make use of any of the above strategies. You likely can avoid copying the Workflow.

Modifying a Workflow that is running in Production

Some possible courses of action are:

  • For minor changes, create and edit a draft in Production, and test using the Tag Object step and Live Test.
  • For substantial changes, copy the Workflow into a duplicate Workflow. Consider duplicating into a Sandbox environment. Develop and test in the duplicate Workflow. Then copy the changes back to your original Workflow.
  • For changes that may take time to see results, consider staging a roll-out.