Skip to main content

Workflows

Record a sequence of BAP commands and replay them later. Workflows are saved as YAML and support parameter substitution.

Record a Workflow

1

Start recording

All subsequent BAP commands will be captured.
2

Run your commands normally

bap goto https://shop.example.com --observe bap act fill:label:"Search"="headphones"
Saves the workflow as YAML to ~/.bap/workflows/qa-checkout.yml.

Run a Workflow

With parameter substitution:
string
required
Name of the saved workflow to run.
string
Parameter substitution in key=value format. Can be specified multiple times.
Output shows pass/fail status for each step:

List Workflows

Macros

Macros are reusable workflow fragments. Record them the same way:
Reference macros in workflows with macro: <name>.

Optimized Execution with bap run

For fastest execution, use bap run instead of bap workflow run. It compiles workflows into fused batches:
See the run command for details on compilation and cache warming.
bap workflow run executes steps sequentially as recorded. bap run compiles them into optimized batches with fusion, resulting in fewer server calls.