Allure Pytest-BDD configuration

The Allure Pytest-BDD adapter provides some additional configuration options that you can pass to pytest.

To pass an option, you can just add it to the command when running pytest. For example:

Bash
python -m pytest --alluredir allure-results --clean-alluredir

However, if you want some options to be applies for all pytest runs, add them to the pytest's addopts configuration option. It must be declared in the project's configuration file.

toml
[tool.pytest.ini_options] addopts = [ "--alluredir", "allure-results", "--clean-alluredir" ]
INI
[pytest] addopts = --alluredir allure-results --clean-alluredir

--alluredir ⟨DIRECTORY⟩

Path to the directory where Allure Pytest-BDD will save the test results, see How it works. If the directory does not exist, it will be created.

--clean-alluredir

If set, the directory specified by --alluredir will be cleaned before generating new test results.

By default, the existing data is kept intact, which allows combining results of multiple test runs into a single test report.

Powered by
logo

Join our newsletter

Join our community

We aim to make Allure Report as reliable and user-friendly as possible, and together with the community, we're here to help when problems arise.

© 2024 Qameta Software Inc. All rights reserved.