Skip to main content

Automation ManagementAutomation Management Guide

Test an Advanced Playbook

Test an advanced playbook and ensure it's working as you expect, even before you deploy it.

You can test the entire playbook, test the playbook up to a specific step, an iteration of a loop, or specific steps only.

When you create an inline action, results of previous steps are suggested as inputs for subsequent steps under Step Input. To insert the results in the input definition, you must test the playbook or those steps. If you haven't tested the playbook or those specific steps, Require testing flow is indicated next to the step results.

Test an Entire Playbook

  1. In an advanced playbook, click Test flow.

    automationmanagement-advancedplaybook-testflow.png
  2. Enter test values for the playbook inputs:

    • For each input, enter a test value.

    • To view values used for previous runs, click Past Runs/Input library, then click automationmanagement-playbooks-advancedplaybook-closewindow.png to close the panel. Under Previous runs, select a run. To use the values from a previous run as your test values, click Use Input.

  3. Click Test flow or press command + return or Enter.

  4. Under Flow result, view the test progress in real time and which steps are currently being executed. Under Graph, the step currently being executed is yellow. If a step is successfully executed, it turns green; if a step fails, it turns red.

  5. View the results of the test run:

    • View whether the test run was a success or failure and how long it took to run.

    • Under Graph, view which steps were a success or a failure. To view the arguments, results, and test logs of a specific step, click the step. To view the steps without lines indicating their sequence, toggle dataflow on.

Test a Playbook Up to a Specific Step

Test a playbook up to and including a specific step.

  1. In an advanced playbook, select the step up to which you want to test the playbook.

  2. Click Test up to <step identifier>.

    automationmanagement-playbooks-advancedplaybook-testuptostep.png
  3. Enter test values for the playbook inputs:

    • For each input, enter a test value.

    • To view values used for previous runs, click Past Runs/Input library, then click automationmanagement-playbooks-advancedplaybook-closewindow.png to close the panel. Under Previous runs, select a run. To use the values from a previous run as your test values, click Use Input.

    • To use values from a POST API request, click Fill args from a request, then click automationmanagement-playbooks-advancedplaybook-closewindow.png to close the panel.

      Under Send a payload at, view the API endpoint URL to which the request is sent. Under CURL example, view the POST API request in CURL. Under Derived Schema, view the values extracted from the payload.

      To copy the values as your test arguments, click Copy as test args.

  4. Click Test flow or press command + return or Enter.

  5. Under Flow result, view the test progress in real time and which steps are currently being executed. Under Graph, the step currently being executed is yellow. If a step is successfully executed, it turns green; if a step fails, it turns red.

  6. View the results of the test run:

    • View whether the test run was a success or failure and how long it took to run.

    • Under Graph, view which steps were a success or a failure. To view the arguments, results, and test logs of a specific step, click the step. To view the steps without lines indicating their sequence, toggle dataflow on.

Test an Iteration of a Loop

Test a specific iteration of a for loop or while loop.

  1. In an advanced playbook, select the loop, then in the loop settings, click Test an iteration.

    automationmanagement-playbooks-advancedplaybook-testaniteration.png
  2. Specify the item in the list with which you want to test the loop:

    • (Optional) If you defined an index in the loop function, under index, enter the item index.

    • Under value, enter the item value.

  3. Click Test iteration or press command + return or Enter.

    Under Result, view the iteration result.

Test a Specific Step

Test a single step of the playbook to check your code or have the results of the step suggested as inputs for subsequent steps.

  1. In an advanced playbook, select the step, then navigate to the Test this step tab.

    automationmanagement-playbooks-advancedplaybook-testthisstep.png
  2. Review the test values. They are automatically pre-filled from the step inputs. To use other values for the test, enter different values.

  3. Click Run or press command + return or Enter. As the test runs, review the run logs. After the test completes, view the results.