Workflow reference
#
OverviewThe Capter workflows are written in YAML. If you don't know YAML, check out Learn YAML in five minutes.
The workflow files should be located under .capter/
in your projects root folder.
#
Example workflow#
Rootname
#
This is the name of the workflow and will be displayed in the CLI output.
url
#
You can set the URL at the root level or per step. The root level URL will be used as the default, but the step one takes precedence.
method
#
You can set the method at the root level or per step. The root level method will be used as the default, but the step one takes precedence.
headers
#
Add headers to every request. These will merge with any headers defined in the step. This is a good place to put something like content type or authorization.
skip
#
Skips the workflow and all its steps.
env
#
Passing an object here will make it available together with the rest of the environment variables using a template tag:
steps
#
A step is basically a configuration for an HTTP request that the CLI will make when you run it. Each workflow needs to include one or more steps for it do actually do anything. See the step reference below. You pass the steps as a YAML array:
#
Stepname
#
This is the name of the step and will be displayed in the CLI output.
url
#
Where to make the request.
method
#
The method used when making the request.
Defaults to GET
.
The recommended way of setting the method is to directly add it in the url:
query
#
Adds a query to the url:
The above will generate https://fake-api.capter.io/products?id=1
.
headers
#
Add headers to the request:
If you send tokens for authorization for all steps in a workflow, it might make sense to put it at the root level instead.
#
Example JWT login flowbody
#
Add a body to the request:
skip
#
Skips the step.
assertions
#
A list of assertions that will run after the request gets a response:
See the Aassertion reference page.