Appearance
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.