🚀 xdist support
pytest-robotframework now supports running tests concurrently with [pytest-xdist](https://pypi.org/project/pytest-xdist/)!
when executing pytest with the `-n` argument, the plugin will launch a robot instance for each worker and automatically merge together the log files at the end.
âš breaking changes - new ways to specify robot arguments
via the command line
robot options can now be specified as pytest cli arguments using the `--robot-*` prefix. the deprecated `--robotargs` argument has been removed
before
pytest --robotargs="--variable foo:bar --outputdir baz"
after
pytest --robot-variable foo:bar --robot-outputdir baz
this is much safer as it does not allow you to specify arguments that would interfere with the functionality of the plugin. if you need to use a robot argument that is not available with a `--robot-*` see [the config section of the documentation](https://github.com/DetachHead/pytest-robotframework#config) for the pytest equivalent.
programmatically
the `pytest_robot_modify_args` hook has been replaced with the `pytest_robot_modify_options` hook which allows you to modify the robot options as a dict instead of a list of arguments. the options are more complete as they include default values and any options that were changed with the `ROBOT_OPTIONS` environment variable.
before
py
def pytest_robot_modify_args(session: Session, args: list[str], collect_only: bool):
if not collect_only:
args.extend(["variable", "foo:bar"])
after
py
from pytest_robotframework import RobotOptions
def pytest_robot_modify_options(session: Session, options: RobotOptions):
if not session.config.option.collectonly:
options["variable"].append("foo:bar")
**Full Changelog**: https://github.com/DetachHead/pytest-robotframework/compare/2.5.2...3.0.0