SkillAgentSearch skills...

Pabot

Parallel executor for Robot Framework test cases.

Install / Use

/learn @mkorpela/Pabot
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Pabot

中文版

Version Downloads

<img src="https://raw.githubusercontent.com/mkorpela/pabot/master/pabot.png" width="100">

A parallel executor for Robot Framework tests. With Pabot you can split one execution into multiple and save test execution time.

Pabot presentation at robocon.io 2018

Table of Contents


Installation:

Pabot can be installed in the following ways:

From PyPI

pip install -U robotframework-pabot

From source (standard install)

Clone this repository and run:

python setup.py install

From source (editable / development mode)

Clone this repository and run:

pip install --editable .

Note

Starting from Pabot version 5.2.0, the Pabot installation only requires Robot Framework to function.

The previously used dependency natsort has been replaced with a pure Python implementation.

In addition, robotframework-stacktrace has been moved to an optional dependency. If it is installed, Pabot will continue to use it when running sub-Robot processes to improve fail/error logging both in Pabot’s own log file and on the command line.

You can install the optional stacktrace support with:

pip install -U robotframework-pabot[stacktrace]

Basic use

Split execution to suite files.

 pabot [path to tests]

Split execution on test level.

 pabot --testlevelsplit [path to tests]

Run same tests with two different configurations.

 pabot --argumentfile1 first.args --argumentfile2 second.args [path to tests]

For more complex cases please read onward.

Contact

Join Pabot Slack channel in Robot Framework slack. Get invite to Robot Framework slack.

Contributing to the project

There are several ways you can help in improving this tool:

  • Report an issue or an improvement idea to the issue tracker
  • Contribute by programming and making a pull request (easiest way is to work on an issue from the issue tracker)

Before contributing, please read our detailed contributing guidelines:

Command-line options

<!-- NOTE: The sections inside these docstring markers are also used in Pabot's --help output. Currently, the following transformations are applied: - Remove Markdown links but keep the text - Remove ** and backticks ` If you modify this part, make sure the Markdown section still looks clean and readable in the --help output. --> <!-- START DOCSTRING -->
pabot [--verbose|--testlevelsplit|--command .. --end-command|
        --processes num|--no-pabotlib|--pabotlibhost host|--pabotlibport port|
        --processtimeout num|
        --shard i/n|
        --artifacts extensions|--artifactsinsubfolders|
        --resourcefile file|--argumentfile[num] file|--suitesfrom file
        --ordering file [static|dynamic] [skip|run_all]|
        --chunk|
        --pabotprerunmodifier modifier|
        --no-rebot|
        --pabotconsole [verbose|dotted|quiet|none]|
        --help|--version]
      [robot options] [path ...]

PabotLib remote server is started by default to enable locking and resource distribution between parallel test executions.

Supports all Robot Framework command line options and also following pabot options:

--verbose
More output from the parallel execution.

--testlevelsplit
Split execution on test level instead of default suite level. If .pabotsuitenames contains both tests and suites then this will only affect new suites and split only them. Leaving this flag out when both suites and tests in .pabotsuitenames file will also only affect new suites and add them as suite files.

--command [ACTUAL COMMANDS TO START ROBOT EXECUTOR] --end-command
RF script for situations where robot is not used directly.

--processes [NUMBER OF PROCESSES]
How many parallel executors to use (default max of 2 and cpu count). Special option "all" will use as many processes as there are executable suites or tests.

--no-pabotlib
Disable the PabotLib remote server if you don't need locking or resource distribution features.

--pabotlibhost [HOSTNAME]
Connect to an already running instance of the PabotLib remote server at the given host (disables the local PabotLib server start). For example, to connect to a remote PabotLib server running on another machine:

  pabot --pabotlibhost 192.168.1.123 --pabotlibport 8271 tests/

The remote server can also be started and executed separately from pabot instances:

  python -m pabot.pabotlib <path_to_resourcefile> <host> <port>
  python -m pabot.pabotlib resource.txt 192.168.1.123 8271

This enables sharing a resource with multiple Robot Framework instances.

Additional details:

  • The default value for --pabotlibhost is 127.0.0.1.
  • If you provide a hostname other than 127.0.0.1, the local PabotLib server startup is automatically disabled.

--pabotlibport [PORT]
Port number of the PabotLib remote server (default is 8270). See --pabotlibhost for more information.

Behavior with port and host settings:

  • If you set the port value to 0 and --pabotlibhost is 127.0.0.1 (default), a free port on localhost will be assigned automatically.

--processtimeout [TIMEOUT]
Maximum time in seconds to wait for a process before killing it. If not set, there's no timeout.

--shard [INDEX]/[TOTAL]
Optionally split execution into smaller pieces. This can be used for distributing testing to multiple machines.

--artifacts [FILE EXTENSIONS]
List of file extensions (comma separated). Defines which files (screenshots, videos etc.) from separate reporting directories would be copied and included in a final report. Possible links to copied files in RF log would be updated (only relative paths supported). The default value is png.

Examples:

 --artifacts png,mp4,txt

The artifact naming conventions are described in the README.md section: Output Files Generated by Pabot.

--artifactsinsubfolders
Copy artifacts located not only directly in the RF output dir, but also in it's sub-folders.

--resourcefile [FILEPATH]
Indicator for a file that can contain shared variables for distributing resources. This needs to be used together with pabotlib option. Resource file syntax is same as Windows ini files where a section is a shared set of variables.

--argumentfile[INTEGER] [FILEPATH]
Run same suites with multiple argumentfile options.

For example:

 --argumentfile1 arg1.txt --argumentfile2 arg2.txt

--suitesfrom [FILEPATH TO OUTPUTXML]
Optionally read suites from output.xml file. Failed suites will run first and longer running ones will be executed before shorter ones.

--ordering [FILEPATH] [MODE] [FAILURE POLICY]
Optionally give execution order from a file. See README.md section: Controlling execution order, mode and level of parallelism

  • MODE (optional): [ static (default) | dynamic ]
  • FAILURE POLICY (optional, only in dynamic mode): [ skip | run_all (default) ]

--chunk
Optionally chunk tests to PROCESSES number of robot runs. This can save time because all the suites will share the same setups and teardowns. Note that chunking is skipped if an ordering file is provided. The ordering file may contain significantly complex execution orders, in which case consolidation into chunks is not possible.

--pabotprerunmodifier [PRERUNMODIFIER MODULE OR CLASS]
Like Robot Framework's --prerunmodifier, but executed only once in the pabot's main process after all other --prerunmodifiers. But unlike the regular --prerunmodifier command, --pabotprerunmodifier is not executed again in each pabot subprocesses. Depending on the intended use, this may be desirable as well as more efficient. Can be used, for example, to modify the list of tests to be performed.

--no-rebot
If specified, the tests will execute as usual, but Rebot will not be called to merge the logs. This option is designed for scenarios where Rebot should be run later due to large log files, ensuring better memory and resource availability. Subprocess results are stored in the pabot_results folder.

--pabotconsole [MODE] The --pabotconsole option controls how much output is printed to the console. Note that all Pabot’s own messages are always logged to pabot_manager.log, regardless of the selected console mode.

The available options are:

  • verbos
View on GitHub
GitHub Stars505
CategoryDevelopment
Updated26d ago
Forks161

Languages

Python

Security Score

100/100

Audited on Feb 26, 2026

No findings