Skip to main content

Testing a Workflow

When editing a new or existing Workflow, you are working on an inactive draft version. Changes you make to a draft can be saved, but do not affect the published version.

The entire Workflow or individual Steps can be tested while running using the Test run, allowing you to add, edit and remove Steps interactively. Use dummy test parameters by entering values in Tests Parameters. Each Step will use the relevant parameters it needs to run. The values you use will not affect the current published version and are only for test purposes. You can also add input and output parameters, and test them too.

At the top of the page, a status indicator is displayed. During the testing of an entire Workflow the status indicator displays the status of the Workflow. The status of each individual is displayed next to the Step itself. After the Workflow is tested, a summary of the test run is displayed. The summary shows the run time, how many Steps are completed, and how many and which failed.

Testing a Single Step: Interactive Mode

The interactive mode enables the creator of a Workflow to run individual Steps separately. This feature works like a live 'debugger' as one can detect faulty Steps without having to run the entire Workflow. This saves a lot of time and makes the process extremely efficient. The Steps, included nested Steps, can be edited and rerun interactively, while creating the Workflow. During testing, a nested Step can only be stopped by stopping the if, if else, or loop Step that controls it. The Step cannot be edited while its running, and edit functions are disabled.

After creating a Step and you want to test it, Test run is the only active control.

  1. Click Test run and enter your tests parameters you wish to execute the Workflow with. Now Test parameters buttons will be activated.
  2. Click Test parameters and a dialog box opens
  3. Enter values > Update run. This does not run the test, but updates the run.
  4. Test the updated run by clicking on Thumbnail next to the Step you wish to test. A pending Step can be stopped by clicking Thumbnail.
  5. Edit your Step according to the Step's output. Each time you run the Step, the output and the status is reset and any previous data is cleared.

The table below shows the possible Step statuses.

StatusDescriptionIcon
PlayRun the Step.Thumbnail
PendingThe Step is pending approval.Thumbnail
In progressThe Step is in progress.Thumbnail

Clearing your Workflow after a Test Run

After a test run, you can clear the outputs and statuses of the Steps, by clicking Clear.

This does not start a new session. To close the current session, click the Stop Run button, which appears when a Workflow is being tested. The test parameters button is disabled if there isn't an open session.

Working with Test Parameters to test complete Workflows

Use test parameters to test different types of draft Workflows.

  • On-Demand: Enter test parameters in the predefined input parameters.
  • Event-based: Use a JSON sample to represent an incoming event.
  • Scheduled: Run without input parameters.

When testing an entire Workflow, the platform is not interactive and you cannot edit Steps, or stop the run, during the execution.

The table below shows the possible Step statuses.

StatusDescriptionIcon
PlayRun the Step.Thumbnail
PendingThe Step is pending approval.Thumbnail
In progressThe Workflow is running. Time lapsed is displayed.Thumbnail
Run is completeDisplays the Workflow run time.Thumbnail

Running a Test on a On-Demand Workflow Draft Version

An On-Demand Workflow can be tested using input parameters. To provide input parameters for testing, use the following instructions:

  1. Click Test parameters.
  2. Enter the Test parameters with which you wish to test run the Workflow. You can change the runner to run the Workflow with a runner that is not the default. The default runner is Blink Cloud.
  3. Click Apply. Each action that requires an input parameter will use the test parameter that was set.
  4. Click Run test.

If no input parameters are required, you can still test the Workflow, by clicking Run test.

Running a Test of an Event-Based Workflow Draft Version

Using Custom Webhook

An Event-Based Workflow can be tested using a JSON sample of a potential incoming event. To run a test, use the following instructions:

  1. Click Test run.
  2. Fill in the Test run with which you wish to test run the Workflow using one of these methods:
    • Copy and paste a JSON object.
    • Listen to an event. Send an event to the webhook URL. It will be displayed and you can edit it.
  3. You can change the runner of the Workflow to replace the default runner. The default runner is Blink Cloud.
  4. Click Run test.
Thumbnail

Using Real Events

A Event-Based Workflow configured to use a predefined event from the events catalog can now be tested using a real event from the selected external service.

  1. Click Test run.
  2. Fill in the Test run dialog box and click Fetch event. This fetches a real event that was generated in the past 30 days from the external service. The event can be used to test your draft before publishing it.
  3. You can change the runner of the Workflow to replace the default runner. The default runner is Blink Cloud.
  4. Click Run test. Results returned can be:
ResultDescription
Event was foundThe found event is displayed in JSON format.
No events foundThere were no such events in the last 30 days.
Failed to fetch eventFailed to fetch event. Check your details and connection.
note

If the trigger was set up using a condition AND a real event was fetched, the condition will be ignored.

Running a test of a Scheduled Workflow Draft Version

A Scheduled Workflow can be tested using the following instructions:

  1. Click Test scheduled.
  2. You can change the runner of the Workflow to replace the default runner. The default runner is Blink Cloud.
  3. Click Run test.

Using Test Parameters from previous Runs

You can use past executions and their parameters to test run a draft Workflow. Past executions include test runs and executions of the published version. Using a real run with real inputs is an effective way to test, fix and improve past failures.

  1. Click Test parameters.
  2. Click Run history.
  3. Select any test run or past execution to tests with your current draft.

If using input parameters from a past execution to test a draft, only identical parameters (by name and type) to the current input parameters, will be used in the test. Other parameters will be ignored by the test.

Testing a Workflow using different Runners

The Runner is a variable input parameter. The default Runner is the Blink Cloud Runner. You can test your Workflow using a different runner to see how it behaves in different environments. Read more about runners here.