Local execution
The Step CLI can run an entire Automation Package on your own machine, without a Step server. It uses a local agent provisioning which provisions the required agents as separate processes. The Keywords therefore run in the same isolation, and against the same agents, locally and centrally.
An agent is started the first time a Plan needs it, and is then kept running and shared by all the Plans the command executes, until the command ends. Nothing has to be installed or configured for Java Keywords — the CLI ships the Java agent. Other Keyword types need their runtime on the machine, and are covered under Prerequisites.
Quick start
Run the ap execute command with the --local option from the folder containing your automation-package.yaml:
step ap execute --local
All Plans of the package run one after the other. The CLI shows their progress in a live report. If a Plan fails, the next Plans still run, but the command ends with an error.
Point at a package somewhere else with --package, and select a subset of the Plans with the same filtering options as a remote execution:
step ap execute --local --package=./my-package --includeCategories=Smoke
An Automation Package using a package library runs locally too:
step ap execute --local --library=./my-library.jar
Execution reports
Local executions create the same execution reports as remote executions. You choose them with --reportType, and the CLI saves them in the same report folder. Local executions also offer the live report. Without --reportType, the CLI shows the live report in the console.
step ap execute --local --reportType=live --reportType=junit
Live report
The live report shows the report tree of each execution while it runs. It starts with a line that names the Plan. Each line then shows the full path of one report node, from the Plan to the node. So you can read each line on its own, even when parallel branches mix their lines:
Live report of MyPlan:
↻ MyPlan : RUNNING...
✓ MyPlan > [BEFORE] > Echo(Setting up) : PASSED (12 ms)
↻ MyPlan > ThreadGroup : RUNNING...
↻ MyPlan > ThreadGroup > Thread 1 : RUNNING...
↻ MyPlan > ThreadGroup > Thread 1 > Session : RUNNING...
↻ MyPlan > ThreadGroup > Thread 1 > Session > Iteration 1 : RUNNING...
↻ MyPlan > ThreadGroup > Thread 1 > Session > Iteration 1 > MyKeyword : RUNNING...
✗ MyPlan > ThreadGroup > Thread 1 > Session > Iteration 1 > MyKeyword(Input={}, Output={}) : FAILED (2.1 s) Expected 'ok' but was 'ko'
...
✗ MyPlan : FAILED (2.4 s)
- The report shows each node when it ends, with its details, status, duration and potential errors.
- If a node contains other nodes, the report also shows it when it starts. It does the same for nodes that run longer than one second. This way, you notice Keywords that take a long time.
- The marker at the start of each line shows the status:
↻running,✓passed,✗failed or error,○any other status, such as skipped. - If the terminal supports colors, the markers use the same colors as the Step UI.
- If the terminal can’t display these markers, the CLI uses
~,v,xandoinstead. - When the live report goes to the console, the CLI suppresses log messages produced by the execution. This keeps the report readable. Use
--verboseto see the logs.
To save the live report to a file, use --reportType="live;output=file". The CLI writes the report of all the Plans to one file: live.txt.
Saving the attachments
With --saveAttachments, the CLI saves the attachments of the report nodes. Attachments are, for example, screenshots, error details, or the files that Keywords stream while they run. The CLI saves them in the attachments folder of the run. It uses one subfolder per Plan and per report node:
reports/20261103-101530-123456/
attachments/attachments.tsv
attachments/MyPlan/0001-Take_screenshot/page.png
The file attachments.tsv lists all the attachments. For each one, it includes the Plan, the report node, its status and the file. If an attachment was skipped, it provides the reason.
The live and tree reports show the location of each attachment under its node. Most terminals and IDEs show it as a link that you can open:
✗ MyPlan > MyKeyword(Input={}, Output={}) : TECHNICAL_ERROR (12 ms) Connection refused
attachment: file:///C:/work/reports/20261103-101530-123456/attachments/MyPlan/0001-MyKeyword/exception.log
Supported Keyword types
Which agent a Keyword runs on is decided by its type, and each agent has its own requirements on the machine:
| Keyword type | Runs on | Requirement on your machine |
|---|---|---|
| Composite | CLI | Nothing. Composite keywords run directly in the CLI as they would run directly on the Step Controller centrally |
| Java, Groovy, JavaScript | Java agent | Nothing. The agent is embedded in the CLI, and the Groovy and JavaScript engines are provided with it |
| Node.js | Node.js agent | node |
| C# / .NET (Enterprise) | .NET agent | An installed Step .NET agent |
| JMeter (Enterprise) | Java agent | JMeter, located by the JMETER_HOME environment variable |
| SoapUI (Enterprise) | Java agent | SoapUI, located by the SOAP_UI_HOME environment variable |
| SikuliX (Enterprise) | Java agent | SikuliX runtime file (sikulixide-x.y.z.jar) located by the SIKULIX_HOME environment variable |
| Oryon (Enterprise) | Java agent | Oryon, located by the ORYON_HOME environment variable |
| k6 (Enterprise) | Java agent | The k6 executable on the PATH |
| Cypress (Enterprise) | Java agent | node and npm, to install the Cypress project |
Two of these accept further optional environment variables, applied to local executions only: SOAP_UI_REPORT and SOAP_UI_FORCE_OSS for SoapUI, and ORYON_ERROR_HANDLER for Oryon.
When a Plan needs a Keyword type this machine cannot serve, the execution stops before anything runs, with a message naming the missing type and what to do about it:
This plan requires agent types which are not available for local execution: node.
The Node.js agent runs on Node.js, which is not installed on this machine.
Prerequisites
Java Keywords
Nothing to install. The Java agent is shipped inside the CLI and extracted on first use, into the workspace where it is kept for later runs. It is started as a separate process, with the same Java runtime the CLI is running on.
Use --localAgentJava to run an agent you installed yourself instead of the embedded one.
Node.js Keywords
node must be runnable from your PATH. The agent itself ships with the CLI, so nothing has to be installed and nothing is downloaded: it is extracted into the workspace on first use and reused afterwards.
To run a different one, point --localAgentNode at it. It accepts either shape an installed agent comes in: the step-node-agent package itself, which is what npm install -g step-node-agent and an unpacked archive leave behind, or a directory containing it in node_modules, which is what npm install ./step-node-agent-<version>.tgz leaves.
.NET Keywords
The .NET agent is a platform-specific binary distribution and is never installed by the CLI. Install the Step .NET agent for your platform and point the CLI at it, either with --localAgentDotNet or with the STEP_DOTNET_AGENT_HOME environment variable. Both accept the agent distribution directory or its bin directory.
Options
These options apply to local executions only. Like every CLI option, they can also be set in a configuration file, which is the most practical way to configure them once for a project.
--localAgentJava=<Path>the directory of an installed Step Java agent to use instead of the one embedded in the CLI--localAgentNode=<Path>the directory of an installed Step Node.js agent to use instead of the one embedded in the CLI. Either thestep-node-agentpackage itself, or a directory containing it innode_modules--localAgentDotNet=<Path>the directory of an installed Step .NET agent. Defaults to theSTEP_DOTNET_AGENT_HOMEenvironment variable--localAgentWorkDir=<Path>the directory the local agents are installed and run in. Defaults to a folder in the system temporary directory--localAgentMaxTokens=<Count>the number of Keywords one agent can run in parallel. Every agent is started with this many tokens, regardless of what the Plan requires: a Plan needing more runs its parallel steps in sequence beyond this number, and a warning is displayed. Default:5--localAgentStartTimeout=<Seconds>how long to wait for an agent to start and connect. Default:60--localAgentVmArgs=<Arg>an additional JVM argument for the Java agent. Repeat the option to pass several arguments, and wrap in double quotes any argument containing spaces
Example, in a stepcli.properties file:
localAgentDotNet=C:/step/dotnet-agent
localAgentMaxTokens=10
localAgentStartTimeout=120
Where the agents run
The CLI works in a single directory, step-cli-local-agents in the system temporary directory unless --localAgentWorkDir says otherwise. It holds two kinds of things:
- the agents and libraries the CLI installed, kept between runs — this is what spares you an installation on every execution;
- one throw-away directory per agent and per grid, deleted when the command ends.
A CLI that is killed never gets to clean up, so the throw-away directories left behind by a previous run are removed at the start of the next one. The installed agents are never swept.
How the agents are reused
There is one agent per agent type — one Java agent, one Node.js agent, and so on — no matter how many Plans the command executes:
- Started on first need. An agent is started when the first Plan requiring its type is executed. A package whose Plans only use Java Keywords never starts a Node.js agent.
- Shared by the following Plans. The next Plans run on the same agent rather than on a new one, which spares them its start-up time and keeps what the agent prepares between Keywords, such as the workspace and the installed dependencies of a Node.js Keyword project.
- Replaced if it dies. An agent that crashes or no longer responds is restarted before the next Plan requiring it. Its last output is printed as a warning.
- Stopped at the end of the command.
Seeing what the agents do
Local executions are quiet by default: the agents are started, used and stopped without printing anything of their own.
--verboseprints what the agents log, along with the applied configuration and the stack traces of errors.--debugimplies--verboseand additionally raises the Step loggers to debug level, in the CLI and in the agents.
Troubleshooting
This plan requires agent types which are not available for local execution: …
The Plan uses a Keyword type no agent on this machine can run. The message names each missing type, followed by what to install or configure for it. See Prerequisites.
An agent fails to start, or does not connect in time
The execution reports what the agent printed before it gave up, which is usually enough — a missing runtime, a port conflict, an unreadable configuration. Run again with --verbose for the agent’s full output. If the machine is simply slow, or an agent is being extracted or installed on first use, raise --localAgentStartTimeout.
Debugging a Java Keyword
Attach a debugger to the Java agent, which is where the Keyword actually runs (refer to your IDE debugger documentation for more details):
step ap execute --local --localAgentVmArgs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
Logging Customization
For advanced troubleshooting, you can customize the logging configuration by providing a custom Logback XML file.
-
For the CLI:
- Pass it as an environment variable:
JAVA_TOOL_OPTIONS=-Dlogback.configurationFile=<path/to/logback.xml> - Add the system property to
step.l4j.inialongsidestep.exe(create the file if it does not exist):
-Dlogback.configurationFile=<path/to/logback.xml>
- Pass it as an environment variable:
-
For the Java Agent:
- Pass the configuration using the CLI flag:
--localAgentVmArgs=-Dlogback.configurationFile=<path/to/logback.xml>
- Pass the configuration using the CLI flag: