1"use strict";(self.webpackChunkembedded_workflow_builder_docs=self.webpackChunkembedded_workflow_builder_docs||[]).push([["2334"],{69738(e,t,n){n.r(t),n.d(t,{metadata:()=>r,default:()=>d,frontMatter:()=>i,contentTitle:()=>l,toc:()=>h,assets:()=>a});var r=JSON.parse('{"id":"testing","title":"Testing Workflows","description":"Test your Workflow within the Workflow Builder","source":"@site/docs/testing.md","sourceDirName":".","slug":"/testing","permalink":"/testing","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Testing Workflows","description":"Test your Workflow within the Workflow Builder"},"sidebar":"docs","previous":{"title":"Triggering Workflows","permalink":"/triggering"},"next":{"title":"Enabling Workflows","permalink":"/enabling"}}'),o=n(74848),s=n(28453);let i={title:"Testing Workflows",description:"Test your Workflow within the Workflow Builder"},l,a={},h=[{value:"The test runner drawer",id:"the-test-runner-drawer",level:2},{value:"Running a test of your Workflow",id:"running-a-test-of-your-workflow",level:2},{value:"Running a test with a webhook request",id:"running-a-test-with-a-webhook-request",level:3},{value:"Test run results and logs",id:"test-run-results-and-logs",level:2},{value:"Replaying test invocations",id:"replaying-test-invocations",level:2}];function u(e){let t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"As you build your Workflow, you can test it to ensure that it works as expected.\nThis article describes how to test your Workflow within the Workflow Builder."}),"\n",(0,o.jsx)(t.h2,{id:"the-test-runner-drawer",children:"The test runner drawer"}),"\n",(0,o.jsxs)(t.p,{children:["The test runner drawer appears at the bottom of the Workflow Builder when you click ",(0,o.jsx)(t.strong,{children:"Test"})," or ",(0,o.jsx)(t.strong,{children:"Run history"}),".\nWithin the drawer, you can see the results of test runs of your Workflow (both runs triggered by the ",(0,o.jsx)(t.strong,{children:"Test"})," button and runs triggered by a ",(0,o.jsx)(t.a,{href:"/triggering#what-is-a-webhook",children:"webhook request"}),")."]}),"\n",(0,o.jsx)(t.h2,{id:"running-a-test-of-your-workflow",children:"Running a test of your Workflow"}),"\n",(0,o.jsxs)(t.p,{children:["To run a test of your Workflow, click the ",(0,o.jsx)(t.strong,{children:"Test"})," button at the bottom of the Workflow Builder.\nThis will open the test runner drawer and start a new test run of your Workflow.\nYou can also click the ",(0,o.jsx)(t.strong,{children:"Run history"})," button to open the test runner drawer without starting a new test run."]}),"\n",(0,o.jsx)(t.h3,{id:"running-a-test-with-a-webhook-request",children:"Running a test with a webhook request"}),"\n",(0,o.jsx)(t.p,{children:"If your Workflow is triggered by a webhook request, you can run a test with a test payload in one of two ways:"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Click the ",(0,o.jsx)(t.strong,{children:"trigger"})," of your Workflow and then open the ",(0,o.jsx)(t.strong,{children:"Test"})," tab.\nClick the ",(0,o.jsx)(t.strong,{children:"Trigger Payload"})," button and specify a payload.\nThe next time you click the ",(0,o.jsx)(t.strong,{children:"Run"})," button, the test run will use that payload as the webhook request."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Trigger Payload",src:n(3072).A+"",width:"600",height:"540"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["In your trigger's ",(0,o.jsx)(t.strong,{children:"Test"})," tab, expand ",(0,o.jsx)(t.strong,{children:"Webhook URLs"}),".\nYour ",(0,o.jsx)(t.strong,{children:"Test URL"})," represents the webhook URL of your test Workflow (the Workflow you see in the Workflow Builder) and ",(0,o.jsx)(t.strong,{children:"Live URL"})," represents the URL of your workflow when you ",(0,o.jsx)(t.a,{href:"/enabling",children:"enable"})," it."]}),"\n",(0,o.jsxs)(t.p,{children:["Use a tool like ",(0,o.jsx)(t.a,{href:"https://www.postman.com/",children:"Postman"})," or ",(0,o.jsx)(t.a,{href:"https://curl.se/",children:"cURL"})," to send a POST request to your URL with a test payload."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"test-run-results-and-logs",children:"Test run results and logs"}),"\n",(0,o.jsx)(t.p,{children:"You can observe the results of your test runs in the test runner drawer.\nSelect a test run and then select a step of your Workflow to see the results of that step.\nYou can also see the logs for each step, which can help you debug any issues that arise during the test run."}),"\n",(0,o.jsx)(t.h2,{id:"replaying-test-invocations",children:"Replaying test invocations"}),"\n",(0,o.jsx)(t.p,{children:"If your Workflow relies on data sent from a third-party service, you can replay a test invocation to simulate the same data being sent again.\nThat way, you don't have to configure the third-party service to send the data again, and you can test how your modified Workflow handles that same payload."}),"\n",(0,o.jsxs)(t.p,{children:["Mouse over the test invocation you'd like to replay and click the circular ",(0,o.jsx)(t.strong,{children:"Replay Test Run"})," arrow icon that appears."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Replay Test Run",src:n(16867).A+"",width:"623",he
1ight:"314"})})]})}function d(e={}){let{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},16867(e,t,n){n.d(t,{A:()=>r});let r=n.p+"assets/images/replay-test-run-8a4f00e25185aba5e157146f88a031dc.png"},3072(e,t,n){n.d(t,{A:()=>r});let r=n.p+"assets/images/trigger-payload-942639306f30351c0cb55dcd1a3d8903.png"},28453(e,t,n){n.d(t,{R:()=>i,x:()=>l});var r=n(96540);let o={},s=r.createContext(o);function i(e){let t=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.