Allure Pytest Default Results
raw JSON → 0.1.4 verified Mon Apr 27 auth: no python
Generates default 'unknown' results for Allure Report when test cases are not executed (e.g., skipped by markers or filters). Version 0.1.4, stable with no active development; useful for CI pipelines where test selection may miss some scenarios.
pip install allure-pytest-default-results Common errors
error ModuleNotFoundError: No module named 'allure_pytest_default_results' ↓
cause The package is not installed or the environment is wrong.
fix
Run
pip install allure-pytest-default-results and verify with pip list | grep allure. error pytest: error: unrecognized arguments: --alluredir ↓
cause Missing `allure-pytest` dependency, not the default results plugin.
fix
Install
allure-pytest separately: pip install allure-pytest. Warnings
gotcha The plugin does NOT generate results for tests that are deselected by markers (`-m`) or keywords (`-k`) but were collected; it only handles tests that are completely not collected (e.g., due to `--run-no` or non-matching patterns). ↓
fix Ensure you understand collection vs. selection. Use `--co` (collect only) to verify which tests are collected.
gotcha If you have multiple conftest.py files with conflicting plugin registrations, the default results may not be generated. The plugin must be loaded before any test collection. ↓
fix Make sure the plugin is installed and registered (check `pytest --traceconfig` for `allure-pytest-default-results`).
Imports
- allure_default_results wrong
import allure_default_resultscorrectfrom allure_pytest_default_results import allure_default_results
Quickstart
# conftest.py
import pytest
import allure
from allure_pytest_default_results import allure_default_results
# The plugin automatically generates default results for tests that are not executed.
# To see it in action, run pytest with filtered tests:
# pytest --alluredir=allure-results -k "not test_example"
def test_example():
allure.attach("sample", name="test", attachment_type=allure.attachment_type.TEXT)
assert True