---
title: Pytest-BDD configuration
description: Configuration for Allure Pytest-BDD | Change allure-results directory
---

# Allure Pytest-BDD configuration

The [Allure Pytest-BDD](/docs/pytestbdd/) integration 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`](https://docs.pytest.org/en/latest/reference/reference.html#confval-addopts) configuration option. It must be declared in the project's configuration file.

**pyproject.toml:**
```toml
[tool.pytest.ini_options]
addopts = [
    "--alluredir", "allure-results",
    "--clean-alluredir"
]
```

**pytest.ini:**
```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](/docs/how-it-works/). If the directory does not exist, it will be created.

## --clean-alluredir

If set, the directory specified by [`--alluredir`](#--alluredir-directory) 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.
