Turn a workflow into an API test suite
Draft an API suite from a workflow's system steps in one click, so each step reads Verified once its test passes.
In short
A workflow's steps with an API call become saved requests and an API Tester suite with happy-path, error and missing-input cases. This is the "API and tests" row of "Create the plan"; each step then reads Verified once its test passes, or Failing when it fails.
Before you start
- Who: creating the suite needs Edit on the workflow and the right to add to the API Tester project. Anyone who can open the workflow sees what it would hold.
- Plan: Designer and API Tester must both be on your plan.
- First: give the action steps an "API call" and each error path its status (see /help/designer/create-the-plan).
Draft a suite
- In each action step's "Building it" section, give it an "API call" - a method, a path and a "Success status" - and each error path the "Status it answers".
- Press "Create the plan" in the toolbar.
- Under "API and tests", choose the "Project" or "Make a new project". Switch "Cards" off if you want only the tests.
- Read the endpoints and the tests line, such as "1 suite ยท 23 cases (9 happy path, 11 error branch, 3 missing input)", and press "Make it".
- Press "Open suite" and run it - against the mock first if the code does not exist yet.
What each case holds
- A saved request for each endpoint the steps call; one already in the project is reused ("Already in the project").
- You get one suite named after the workflow. It has a happy-path case for each step, a case for each error path with its status, and a case for each required input left out.
- The step's inputs as example values. A password field starts empty and secret.
- The plan keeps the cases matched to the design: change the workflow and "Sync the plan".
Good to know
- The new cases are added to their steps as references in one change you can undo.
- Anyone who may open the workflow sees what the suite would hold. Creating it needs edit rights on the workflow and the right to add to the project, in the workspace you are working in.
- An endpoint you may not open is listed as unavailable and gets no case.
If something goes wrong
- "No system step of this workflow calls an endpoint you can open. Add an endpoint to a step first."
- "API Tester is not on for you here, so a suite cannot be made."
- "Choose the project the suite goes into."
Related
- /help/designer/design-a-workflow
- /help/api-testing/test-suites
- /help/designer/export-and-implementation-prompt