Orchestration
Playbooks
Test Console
13 min
the turbine canvas includes a test console within the playbook canvas, allowing end to end testing of entire playbooks and their trigger flows this console displays each automation step to indicate whether a run succeeds or fails you can test using real data or custom test data, offering a flexible environment for playbook verification the test console is used for testing entire playbooks for testing individual actions, use the test tab within the action configuration dialog accessing the test console to open the test console, click the test icon on the playbook canvas understanding the test console layout after opening the test console, you'll see the flow being tested on the left side this layout provides a clear view of each automation step to the right, there are three main tabs runs displays the date and timestamp for each test run, indicating whether it was successful or failed you can expand each run to view detailed information about trigger data, action data, and published results test data allows input modification for custom testing the available options depend on the trigger type webhook triggers select from past events or enter custom json record event triggers select from historical records flow event triggers enter custom json schedule triggers no test data required (test runs immediately) yaml (available when feature flag is enabled) displays the playbook definition in yaml format icons next to each run provide a quick status icon description indicates a failed test indicates a successful test example of a successful test run in this example, the test console displays a successful run of flow 1 on january 8, 2024, at 4 44 pm (utc) for additional metadata about the flow and individual steps, such as trigger data, action data, and published results, expand each section using the collapse icons if a run is marked with test , it indicates a console test run example of a failed test run in this example, flow 1 has failed the console shows a detailed view at january 8, 2024, 7 20 pm (utc) to investigate the failure, scroll down to the step with the fail status and expand it for more information failed action view in the expanded view, the message field provides specific information to help identify and resolve the issue failure message running tests with custom data the test console supports different test data options depending on the trigger type webhook triggers for webhook triggers, you can test with past events or custom json select the test data tab choose a data source from the data source dropdown past event select from the event dropdown, which defaults to the most recent event you can select past events for testing historical scenarios custom json opens a blank text editor where you can enter custom json for testing after configuring your test data, click test to execute the run navigate to the runs tab to view the results of the most recent test test data tab with custom json flow event triggers for flow event triggers, you can enter custom json data directly in the test data tab the json should match the expected event data structure for your flow event schedule triggers schedule triggers do not require test data simply click test to run the playbook immediately testing with record event triggers for flows that use a record event trigger , the test console provides the option to test with historical records this feature is beneficial for verifying the playbook's behavior with data that has been processed before, ensuring that any changes to the flow work as expected in real world scenarios configuring record event test data in the test data tab, a list of historical records is displayed with columns such as tracking id , time created , and additional application specific fields you can customize which columns are displayed click the column filter icon (☰) in the records table header use the filter input to search for specific columns select up to 5 additional columns to display (in addition to tracking id and time created) click apply to update the table columns record event trigger with historical records selecting record event action type for record event triggers, you can also select the event action type record create simulates a record creation event record update simulates a record update event this dropdown appears in the action buttons area when testing record event triggers running the test to run the test select the record you want to use for testing by clicking the checkbox next to the tracking id (optional) select the event action type (record create or record update) from the dropdown click test to initiate the flow with the selected historical record data note you cannot directly modify the record data for these tests the test console will use the selected record exactly as it was originally processed this functionality is useful for debugging, troubleshooting, and validating flow behavior with actual historical data, ensuring the playbook operates correctly across different scenarios re running tests you can re run a previous test from the runs tab select a test run from the list click the run again button to re execute the test with the same data that was used in the original run this is useful for verifying that changes to your playbook work correctly with the same test data, or for debugging issues that occurred in a previous run using custom json in the test console custom json can be used with webhook triggers and flow event triggers follow these steps open the test console click the test console icon on the playbook canvas to open the console navigate to test data tab click the test data tab select custom json as the data source for webhook triggers select custom json from the data source dropdown for flow event triggers the json editor is available directly enter custom json data in the json editor, enter the specific data you want to test with this data should match the expected input format for your playbook for example for webhook triggers the json should match the webhook payload structure (e g , {"body" { }, "headers" { }} ) for flow event triggers the json should match the event data schema defined for your flow event run the test after entering the json data, click the test button to execute the playbook with the specified input the playbook will process this custom input, and the results can be observed in the runs tab review the results go to the runs tab to view the output of the playbook with your custom json input you can expand each step in the flow to verify that the playbook processes the data as expected clear or modify json data if you need to make adjustments, you can edit the json directly in the editor or use the clear button to reset the input closing the test console to close the test console and return to a full canvas view, click the x icon in the upper right corner