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:

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.

[tool.pytest.ini_options] addopts = [ "--alluredir", "allure-results", "--clean-alluredir" ]
[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.


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

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.