Testing Workflows

Samuel Fresia
Samuel Fresia
  • Updated

For more in depth information on testing Proposify specific triggers and actions, check out this article:

The workflow designer provides a sandbox for testing workflows. From the designer you can run a test instance of your workflow, configure test values for config variables, and view test logs in real time.

You can test your workflow after you set test values for config variables by clicking the green Run button.

If your workflow is made up of multiple flows, each flow is tested independently. Click the flow name on the top of the workflow designer area, select the flow you would like to test, and then click Run for that flow. Note that each flow has a distinct webhook URL, so if you are invoking the integration from a third-party app via webhook, you'll need to note the flow's webhook URL.

 

The test runner drawer

The test runner drawer is where you can configure and run tests of your workflow. It's located at the bottom of the workflow designer screen.

Test runner drawer in Prismatic app

 

Test instance config variables

If your workflow uses connections or config variables, you can specify testing values for those variables by clicking Test Configuration in Test Runner drawer and then select Test-instance configuration. You will be prompted to fill out the same configuration wizard that you would see when you connect a deployed Automation.

If you specified default values for your config variables, those will be preset for you. Otherwise, fill in testing values and connection information for the purposes of testing your workflow.

Config wizard for testing integrations in Prismatic app

 

Running a test of your flow

To run a test of your flow, click the green Run button in the Test Runner drawer. If you would like to send data to your workflow's trigger as a webhook payload, you can specify that payload in the Test Configuration tab by clicking Trigger payload.

Trigger payload dialog for testing integrations in Prismatic app

Within the trigger payload dialog, you can also specify custom HTTP headers to be sent with the webhook request. If you would like to invoke your workflow from an external system (i.e. send a webhook from your app or a third-party system), copy the webhook URL that is displayed in the Trigger payload dialog and send HTTP requests to that endpoint.

 

Replaying test invocations

Time-saving tip

You can replay a test workflow run. That is helpful if you are testing a workflow from a third-party app. You don't need to set up your third-party environment every time - you can send a webhook once from your third-party app with a payload, and run that same payload through your workflow until you're happy with the results.

To replay a test workflow run, open the Test Runner drawer and select a test that you'd like to replay. Click the replay button to the right of the test.

Replay test integration invocation in Prismatic app

The payload that was sent to trigger this workflow test will be fed back into another test of the workflow. This allows you to make changes to your workflow and iterate quickly, without needing to reconfigure your third-party apps and services to fire new webhook requests over and over.

 

Test run results and logs

After running an workflow test, the steps that ran are displayed in the Steps column of the Test Runner drawer. You can toggle the Logs option to show logs for each step that ran.

Clicking on a step will display the step's outputs and logs in the third column. This is helpful for debugging and verifying the flow of data within your workflow.

 

Testing a trigger's instance deploy and instance delete events

In addition to receiving and processing a webhook request, some triggers contain code that runs when the automation is deployed or removed. This code is useful for setting up or removing resources that are required for the integration to run (like configuring webhooks in third-party apps).

If the trigger you are using contains code that runs on instance deploy or delete, you can test that code by clicking Test Configuration in the Test Runner drawer, and then select Test trigger functions. You can opt to test the instance deploy or instance delete functions.

Test deploy and delete events in Prismatic app