Skip to main content

Test a Workflow or API

Use tests to confirm that a deployed workflow accepts the expected input, returns a useful response, and behaves correctly with realistic data. A saved test case gives the team a repeatable check for future changes.

Before you begin​

  • Deploy or promote the workflow version you want to test.
  • Confirm which environment is safe for the test data.
  • Prepare representative input, including a successful case and likely failure cases.
  • Make sure you have permission to view and update tests in the workspace.
caution

Use safe test data Do not submit production credentials, personal data, or records that can trigger an irreversible business action unless the environment and workflow are intended for that test.

Choose the right test​

What you need to verifyTest mode
A request-and-response workflow or REST endpointHTTP
A SOAP operationSOAP
An event received at a webhookWebhook
A message sent to a configured channelQueue

The available modes depend on the selected workflow and its deployment configuration.

Testing a deployed workflow is not the only way to check your work. To try one activity, or run the workflow as it is on your canvas without deploying it, see Run a Workflow from the Canvas. To pause that run and step through it, see Debug a Workflow. Both are Beta.

Run a test​

  1. Open Test, or select Test from the deployed workflow.
  2. Select the environment and test mode.
  3. Enter the request details required by the workflow. Depending on the mode, this can include a URL, method, headers, parameters, body, message properties, or channel.
  4. For a secured workflow, select Refresh Token before sending the request.
  5. Review every dynamic value and confirm that the target environment is correct.
  6. Select Send or Test Webhook.

The result area updates while the test runs. Review the status, elapsed time, headers, response body, and any returned message details before deciding whether the test passed.

Copy an HTTP or SOAP test as cURL​

Copy the request you built in an HTTP or SOAP test as a curl command, to run it from a terminal, share it with a teammate, or attach it to a bug report. The command matches what Send would issue, with your variables resolved.

  1. Select Test in the left rail to open the Tests panel.
  2. Open an HTTP or SOAP test case.
  3. Complete the request. The option is unavailable until the URL field has a value.
  4. Select the caret next to Send.
  5. Select Copy as cURL.

If the request contains secrets, the menu also offers Copy as cURL with secrets. Select it only when you need a command that runs as-is, and share that command with care.

By default, secrets are replaced with placeholders such as <TOKEN>, <PASSWORD>, or <X_API_KEY>. Studio treats a value as a secret by its name. This applies to headers, query parameters, JSON body fields, form fields, and variables. A name counts as secret when it contains authorization, token, secret, password, credential, cookie, session, csrf, xsrf, signature, or bearer, or when key or auth appears as a separate word, as in api_key, X-Auth, or apiKey. Names such as keyword and author are not treated as secrets. Basic auth credentials are replaced with <USERNAME> and <PASSWORD>. Replace each placeholder before you run the command.

Example. A request has the header Authorization: Bearer eyJhbGciOi... and a JSON body. Copy as cURL puts this on your clipboard:

curl 'https://api.example.com/employees' \
-X POST \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"Asha"}'

The command has one flag per line, joined with \, so it stays readable and runs as pasted. The Content-Type: application/json header is there because Studio adds it for a raw JSON body, and the copy includes it so the command matches what Send sends.

Replace <TOKEN> with a real token before you run it. Copy as cURL with secrets copies the same command with the real token in place of <TOKEN>.

note

What is not available The caret is hidden for Message and Webhook tests, and while a request is running.

How you know it worked​

A toast confirms the copy. Paste the command into a terminal or editor to see it. If a variable can't be resolved, the last toast below replaces the others, even when secrets were also replaced or included.

ToastMeaning
cURL command copied.The command contains no secrets.
cURL command copied. Secrets are replaced with placeholders.Placeholders stand in for secret values.
cURL command copied with secrets included.The command contains real credentials.
cURL command copied. Couldn't resolve {{name}}, so they stay as placeholders.A variable has no value in the selected variable group. Set it, or edit the command before you run it.

When it does not work​

ProblemWhat to check
Couldn't copy the cURL command. Check your browser's clipboard permission and try again.Allow clipboard access for Studio in your browser, then select Copy as cURL again.
The caret next to Send is greyed outEnter a URL.
There is no caret next to SendSwitch to an HTTP or SOAP test. Message and Webhook tests do not offer this option.

Evaluate the result​

Do not treat a successful status alone as proof that the workflow is correct. Check that:

  • the response represents the expected business outcome;
  • required fields are present and correctly formatted;
  • no sensitive values appear in the response;
  • an invalid request returns a useful, controlled error;
  • repeated requests do not create unintended duplicate work;
  • downstream changes occurred only in the intended environment.

If the result is unexpected, use metrics and traces to follow the execution and identify the failing step.

Save a reusable test case​

  1. Give the test a name that states the scenario and expected outcome, such as Create employee - valid request.
  2. Select Save.
  3. When a matching test case already exists, save the input as an Example instead of creating a duplicate.
  4. Keep one example for the normal path and separate examples for important boundary or error cases.

Saved test cases should contain stable sample values. Replace short-lived tokens and environment-specific identifiers before another user runs the test.

Use examples and history​

  • Examples preserve useful variations of a test case without duplicating its purpose.
  • History lets you reopen a previous execution and compare its request and result with the current behavior.
  • A history entry is evidence from one run, not a permanent acceptance record. Keep formal release evidence in your team's approved system of record.

Troubleshoot a test​

ProblemWhat to check
Send is unavailableComplete the required URL, channel, body, or variables for the selected mode.
The request is unauthorizedRefresh the token, confirm the environment, and check the workflow's security setting.
The result is emptyConfirm that the workflow returns a response and inspect its trace.
The result differs between environmentsCompare deployment profiles, variables, resources, and schemas.
A saved test cannot runConfirm that its application, workflow, and deployed version still exist.

Next steps​

After the tests pass, record the scenarios used, review the deployment configuration, and continue with the team's release or promotion process.