Working on the Command Line
The robotcode command brings RobotCode to the terminal, to CI pipelines and to scripts. It runs in the Python environment of your project, next to Robot Framework and your libraries, and reads the project's robot.toml files and the profiles you select with -p, as RobotCode does in VS Code and PyCharm. To install it, see Get Started on the Command Line; the CLI reference lists every command and option.
Which command for which task
Section titled “Which command for which task”| Task | Command | Guide |
|---|---|---|
| Run the tests or tasks | robotcode robot, or its alias robotcode run |
robot.toml on the Command Line |
| See which suites, tests, tasks and tags a run would pick up, without running anything | robotcode discover |
Discovering Tests, Tasks and Suites |
| Check the code for problems, also in a CI pipeline | robotcode analyze code |
Analyzing Code |
| Find out what a finished run contained and why tests failed | robotcode results |
Analyzing Run Results |
| Try keywords line by line | robotcode repl |
Interactive Robot Framework with robotcode repl |
| Debug a run in the terminal | robotcode robot-debug |
Command-line debugging with robotcode robot-debug |
| Read the documentation of a library or resource file | robotcode doc |
Browsing Library Documentation |
Run the tests through a command such as xvfb-run |
robotcode --wrapper …, or the setting wrapper |
Running Tests Through a Wrapper |
| See the configuration and the profiles a command gets | robotcode config, robotcode profiles |
Troubleshooting robot.toml |
The options of robotcode itself, such as -p for a profile, go before the name of the command, the options of the command after it; see Where the options go. AI agents can work through the same commands; Working with AI Agents sets up RobotCode's chat plugin for them.
Pages of this guide
Section titled “Pages of this guide”Discovering Tests, Tasks and SuitesList the suites, tests, tasks, tags and source files Robot Framework would pick up with robotcode discover, without running anything, as a tree or as JSON.
Analyzing CodeRun static analysis with robotcode analyze code, tune severities and exit codes, and produce JSON, SARIF, GitHub or GitLab reports for CI pipelines.
Analyzing Run ResultsSummarize, list, walk, aggregate and diff Robot Framework run results with robotcode results in the terminal or CI, using filters, search and JSON output.
Interactive Robot Framework with robotcode replCall Robot Framework keywords line by line in robotcode repl: import libraries, keep variables across lines, run REPL scripts, capture a log and debug.
Command-line debugging with robotcode robot-debugDebug Robot Framework suites in the terminal with robotcode robot-debug: break on a line, keyword or failure, step, and inspect the stack and variables.
Browsing Library DocumentationShow the documentation of a library, resource file or suite file with robotcode doc, as Markdown, as JSON or in a terminal viewer, with the project's configuration.
Running Tests Through a WrapperRun tests through a wrapper command like xvfb-run or your own script, set in robot.toml or on the CLI, to bring the test environment up and tear it down.
Released under the Apache-2.0. Copyright © 2022-present Daniel Biehl