allure-python-commons
Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks
Description
## Allure Common API [](https://pypi.python.org/pypi/allure-python-commons) [](https://pypi.python.org/pypi/allure-python-commons) > The package contains classes and functions for users of Allure Report. It can > be used to enhance reports using an existing Allure adapter or to create new > adapters. [<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report") - Learn more about Allure Report at [https://allurereport.org](https://allurereport.org) - 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report - ❓ [Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community - 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – stay updated with our latest news and updates - 💬 [General Discussion](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community - 🖥️ [Live Demo](https://demo.allurereport.org/) — explore a live example of Allure Report in action --- ## User's API Install an adapter that suits your test framework. You can then add more information to the report by using functions from the `allure` module. ### Decorators API Use these functions as decorators of your own functions, e.g.: ```python import allure @allure.title("My test") def test_fn(): pass ``` The full list of decorators: - `allure.title` - `allure.description` - `allure.description_html` - `allure.label` - `allure.severity` - `allure.epic` - `allure.feature` - `allure.story` - `allure.suite` - `allure.parent_suite` - `allure.sub_suite` - `allure.tag` - `allure.id` - `allure.manual` - `allure.link` - `allure.issue` - `allure.testcase` - `allure.step` Refer to the adapter's documentation for the information about what decorators are supported and what functions they can be applied to. ### Runtime API Most of the functions of Runtime API can be accessed via `allure.dynamic.*`. Call them at runtime from your code. The full list includes: - `allure.dynamic.title` - `allure.dynamic.description` - `allure.dynamic.description_html` - `allure.dynamic.label` - `allure.dynamic.severity` - `allure.dynamic.epic` - `allure.dynamic.feature` - `allure.dynamic.story` - `allure.dynamic.suite` - `allure.dynamic.parent_suite` - `allure.dynamic.sub_suite` - `allure.dynamic.tag` - `allure.dynamic.id` - `allure.dynamic.manual` - `allure.dynamic.link` - `allure.dynamic.issue` - `allure.dynamic.testcase` - `allure.dynamic.parameter` - `allure.attach` - `allure.attach.file` - `allure.step` Refer to the adapter's documentation for the information about what functions are supported and where you can use them. ## Adapter API You may use `allure-pytest-commons` to build your own Allure adapter. The key elements of the corresponding API are: - `allure_python_commons.model2`: the object model of Allure Report. - `allure_python_commons.logger`: classes that are used to emit Allure Report objects (tests, containers, attachments): - `AllureFileLogger`: emits to the file system. - `AllureMemoryLogger`: collects the objects in memory. Useful for testing. - `allure_python_commons.lifecycle.AllureLifecycle`: an implementation of Allure lifecycle that doesn't isolate the state between threads. - `allure_python_commons.reporter.AllureReporter`: an implementation of Allure lifecycle that supports some multithreaded scenarios. A new version of the API is likely to be released in the future as we need a decent support for multithreaded and async-based concurrency (see [here](https://github.com/allure-framework/allure-python/issues/697) and [here](https://github.com/allure-framework/allure-python/issues/720)).
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 2.15.3 | Imported from PyPI (2.15.3) | Low | 4/21/2026 |
| 2.15.2 | * Set testCaseId for all test results produced by allure_robotframework (via #884) - @delatrie ## 👀 Links [Commits since 2.15.1](https://github.com/allure-framework/allure-python/compare/2.15.1...master) | Low | 11/28/2025 |
| 2.15.1 | * Set testCaseId for all test results produced by allure_behave (via #883) - @delatrie * Add workflow-wide gh actions permissions (via #875) - @epszaw ## 👀 Links [Commits since 2.15.0](https://github.com/allure-framework/allure-python/compare/2.15.0...master) | Low | 11/28/2025 |
| 2.15.0 | ## 🚀 New Features * feat: add titlePath to results generated by all allure-python integrations (via #870) - @delatrie ## 🐞 Bug Fixes * fix(pytest): properly include nested classes in fullName, historyId, testCaseId, and subSuite (via #869) - @delatrie ## 👀 Links [Commits since 2.14.3](https://github.com/allure-framework/allure-python/compare/2.14.3...master) | Low | 7/22/2025 |
| 2.14.3 | ## 🔬 Improvements * Don't convert built-in (reserved) pytest markers to allure tags (fix #817) (via #862) - @sharovd ## 🐞 Bug Fixes * fix(pytest): can't change a fixture's title in pytest 8.4 or later (via #866) - @delatrie ## 👀 Links [Commits since 2.14.2](https://github.com/allure-framework/allure-python/compare/2.14.2...master) | Low | 6/9/2025 |
| 2.14.2 | This release fixes a couple of issues with Allure Behave. ## 🐞 Bug Fixes * extra test results generated after consecutive in-process runs of Behave (#858, via #860) - @delatrie * AttributeError is raised if Allure Behave is set up via AllureHooks (#629, via #860) - @delatrie ## 👀 Links [Commits since 2.14.1](https://github.com/allure-framework/allure-python/compare/2.14.1...master) | Low | 5/6/2025 |
| 2.14.1 | * Set the correct detail message for passed steps (fix #835) (via #853) - @sharovd ## 👀 Links [Commits since 2.14.0](https://github.com/allure-framework/allure-python/compare/2.14.0...master) | Low | 4/28/2025 |
| 2.14.0 | ## 🚀 New Features * **allure-pytest-bdd:** the Allure API is now fully supported (implements #726 via #845) - @delatrie * **allure-pytest-bdd:** expected failures (xfail) are supported (via #845) - @delatrie * **allure-pytest-bdd:** steps can be renamed at runtime with `@allure.title` (implements #737 via #845) - @delatrie * **allure-pytest-bdd:** gherkin tags are converted to test result tags (via #845) - @delatrie * **allure-pytest-bdd:** fill test result descriptions from feature and | Low | 4/3/2025 |
| 2.13.5 | ## 🐞 Bug fixes * Replace version comparison with duck-style checks (fix #802) (via #803) - @delatrie ## 👀 Links [Commits since 2.13.4](https://github.com/allure-framework/allure-python/compare/2.13.4...master) | Low | 4/1/2024 |
| 2.13.4 | ## 🚀 New features * Add logs, stdout and stderr to the allure-pytest-bdd report (via #801) - @IvanBuruyane * Make allure-behave compatible with Behave v1.2.7.dev5 (implements #771 via #798) - @ercaronte > NOTE: > Use the following syntax to install a pre-release version of Behave 1.2.7: > ``` > pip install -U git+https://github.com/behave/behave@v1.2.7.dev5 > ``` ## 👻 Internal changes * Add run-name to release workflow (via #800) - @delatrie ## 👀 Links [Commits s | Low | 3/25/2024 |
| 2.13.3 | ## 🐞 Bug Fixes * Fix compatibility with pytest 8.1 (via #795) - @delatrie ## 🔬 Improvements * Add pytest ParameterSet.id placeholder for @allure.title formatter (via #787) - @betapl3b * Ignore --clean-alluredir when using --collectonly (via #753) - @ShurikMen ## 👻 Internal changes * Expected fail of lazy-fixture tests (via #793) - @delatrie * Replace direct type comparisons with isinstance (via #760) - @delatrie ## Documentation changes * Fix custom label doc: "allure-l | Low | 3/11/2024 |
| 2.13.2 | ## 🐞 Bug Fixes * Fix historyId calculation by allure-pytest (fix #743, #744) (via #745) - @delatrie * Fix suite label duplication when using dynamic suite functions (Fixes #586) (via #746) - @delatrie ## 👀 Links [Commits since 2.13.1](https://github.com/allure-framework/allure-python/compare/2.13.1...master) | Low | 4/26/2023 |
| 2.13.1 | ## 🐞 Bug Fixes * Fix squashed results when using rerunfailures (fixes #735) (via #736) - @delatrie * Fix regression: allure_pytest.utils.allure_title crashes if obj attr doesn't exist (Fixes #733) (via #734) - @delatrie ## 👀 Links [Commits since 2.13.0](https://github.com/allure-framework/allure-python/compare/2.13.0...master) | Low | 3/16/2023 |
| 2.13.0 | * Close test results in the `pytest_runtest_protocol` hook instead of `pytest_runtest_logfinish` (via #732) - @delatrie * Make behave and robotframework allure tag syntax less strict (via #732) - @delatrie * Mark test as skipped if pytest.exit is called from its fixture (via #732) - @delatrie * General `allure.<link-type>[.<link-name>]:<link>` syntax for allure links in robotframework test case files (via #732) - @delatrie * `--clean-alluredir` now removes all alluredir's content recursive | Low | 3/1/2023 |
| 2.12.0 | * Add dynamic.parameter function (via #565) - @skhomuti * Add missing functions in dynamic package (via #703) - @daserok * Fix allure_full_name parsing when square bracers is in param contents (via #708) - @skhomuti * fixes links to the documentation (via #707) - @cheshi-mantu ## 👀 Links [Commits since 2.11.1](https://github.com/allure-framework/allure-python/compare/2.11.1...master) | Low | 11/23/2022 |
| 2.11.1 | * Fix duplicated fixtures after 2.11.0 release (via #696) - @skhomuti * Failed fixtures don't break test name templating from fixture values (via #694) - @skhomuti ## 👀 Links [Commits since 2.11.0](https://github.com/allure-framework/allure-python/compare/2.11.0...master) | Low | 10/12/2022 |
| 2.11.0 | * Add @allure.manual decorator to simplify ALLURE_MANUAL=True label setting (via #688) - @betapl3b * Fix robot step status on not executed steps (via #687) - @skhomuti * Add allure plugin name (via #686) - @ShurikMen * Fix missing dynamic called fixtures in reports (via #637) - @ShurikMen ## 👀 Links [Commits since 2.10.0](https://github.com/allure-framework/allure-python/compare/2.10.0...master) | Low | 10/6/2022 |
| 2.10.0 | * Fix readme and workflow mistakes (via #684) - @skhomuti * Update flake8 requirement from ==4.* to ==5.* in all packages (via #679) - @dependabot * Rework workflows (via #676) - @skhomuti * Drop python 3.6 support (via #675) - @skhomuti * Add support for steps and attachments in threads (via #647) - @skhomuti * Upgrade to GitHub-native Dependabot (via #587) - @dependabot-preview ## 👀 Links [Commits since 2.9.45](https://github.com/allure-framework/allure-python/compare/2.9.45...mast | Low | 8/22/2022 |
| 2.9.45 | Release 2.9.45 | Low | 10/15/2021 |
| 2.9.44 | Release 2.9.44 | Low | 9/29/2021 |
| 2.9.43 | Release 2.9.43 | Low | 6/2/2021 |
| 2.9.42 | Release 2.9.42 | Low | 5/24/2021 |
| 2.9.41 | Release 2.9.41 | Low | 5/19/2021 |
| 2.8.40 | * Support Dynamic.link and Dynamic.description for allure-behave (via #574) - @oatssss * Support for searching test by ID (via #571) - @MissiaL * Add optionally parent uuid for attach (via #575) - @skhomuti * Add support for robotframework==4.0 (via #576) - @skhomuti ## 👀 Links [Commits since 2.8.36](https://github.com/allure-framework/allure-python/compare/2.8.36...master) | Low | 3/22/2021 |
| 2.8.36 | * Fixed that not closed fixture step breaks location of next body steps (via #568) - @skhomuti ## 👀 Links [Commits since 2.8.35](https://github.com/allure-framework/allure-python/compare/2.8.35...master) | Low | 3/4/2021 |
| 2.8.35 | * Integration tests added to tox test target (via #562) - @rad96 * Fix non-existent attribute error for 'item' object in listener (via #567) - @vgorkavenko ## 👀 Links [Commits since 2.8.34](https://github.com/allure-framework/allure-python/compare/2.8.34...master) | Low | 3/2/2021 |
| 2.8.34 | * Fix testplan.json FileNotFoundError (via #564) - @sseliverstov ## 👀 Links [Commits since 2.8.33](https://github.com/allure-framework/allure-python/compare/2.8.33...master) | Low | 2/18/2021 |
| 2.8.33 | * Fix behave fullname (via #561) - @sseliverstov * Fixed tests filter by IDs and selectors from testplan (via #546) - @Stilver ## 👀 Links [Commits since 2.8.32](https://github.com/allure-framework/allure-python/compare/2.8.32...master) | Low | 2/4/2021 |
| 2.8.32 | * Fix missing fixtures in report when using lazy_fixture (via #548) - @dgusakov ## 👀 Links [Commits since 2.8.31](https://github.com/allure-framework/allure-python/compare/2.8.31...master) | Low | 1/25/2021 |
| 2.8.31 | * Fix non-existent attribute error (via #545) - @vgorkavenko ## 👀 Links [Commits since 2.8.30](https://github.com/allure-framework/allure-python/compare/2.8.30...master) | Low | 1/13/2021 |
| 2.8.30 | * Fix robot testplan (via #540) - @sseliverstov ## 👀 Links [Commits since 2.8.29](https://github.com/allure-framework/allure-python/compare/2.8.29...master) | Low | 1/13/2021 |
| 2.8.29 | * Robot test plan (via #538) - @sseliverstov ## 👀 Links [Commits since 2.8.24](https://github.com/allure-framework/allure-python/compare/2.8.24...master) | Low | 12/21/2020 |
| 2.8.24 | * Add type hint for decorated function (via #533) - @jackblk ## 👀 Links [Commits since 2.8.23](https://github.com/allure-framework/allure-python/compare/2.8.23...master) | Low | 12/7/2020 |
| 2.8.23 | * added @allure.title annotation support for fixtures (via #527) - @rad96 * Support for fixture values in test titles for pytest (via #530) - @rad96 * Add pytest-bdd and nose2 (via #525) - @sseliverstov ## 🚀 New Features * Allure test plan support for behave (via #531) - @sseliverstov ## 👀 Links [Commits since 2.8.22](https://github.com/allure-framework/allure-python/compare/2.8.22...master) | Low | 12/6/2020 |
| 2.8.22 | * Add fullName to Behave (via #524) - @sseliverstov * Fix typo in link_patter formatter (via #516) - @Bidonus * Add "unknown" status (via #523) - @janza ## 👀 Links [Commits since 2.8.21](https://github.com/allure-framework/allure-python/compare/2.8.21...master) | Low | 11/27/2020 |
| 2.8.21 | * Pytest-bdd fixes (via #522) - @sseliverstov * Change test plan env variable name (via #521) - @sseliverstov ## 👀 Links [Commits since 2.8.20](https://github.com/allure-framework/allure-python/compare/2.8.20...master) | Low | 11/20/2020 |
| 2.8.20 | * Add params to test name (via #520) - @sseliverstov * Now XFAIL messages contains reason same as XPASS (via #519) - @skhomuti * Add dynamic suite (via #510) - @tetienne ## 👀 Links [Commits since 2.8.19](https://github.com/allure-framework/allure-python/compare/2.8.19...master) | Low | 11/19/2020 |
| 2.8.19 | * Nose2 first version (via #513) - @sseliverstov * Improve codes readability -- avoid to use overly complex "filter" and "lambda". (via #501) - @luizyao ## 👀 Links [Commits since 2.8.18](https://github.com/allure-framework/allure-python/compare/2.8.18...master) | Low | 10/29/2020 |
| 2.8.18 | * added caller_id or uuid for robotframework thread name (via #500) - @skhomuti ## 👀 Links [Commits since 2.8.17](https://github.com/allure-framework/allure-python/compare/2.8.17...master) | Low | 8/14/2020 |
| 2.8.17 | * Get case error message instead of current message (via #493) - @skhomuti ## 👀 Links [Commits since 2.8.16](https://github.com/allure-framework/allure-python/compare/2.8.16...master) | Low | 7/24/2020 |
| 2.8.16 | * show pytest.mark markers with args and kwargs in report tags section … (via #492) - @ornichola ## 👀 Links [Commits since 2.8.15](https://github.com/allure-framework/allure-python/compare/2.8.15...master) | Low | 5/26/2020 |
| 2.8.15 | * Added dynamic links for robotframework (via #489) - @skhomuti ## 👀 Links [Commits since 2.8.14](https://github.com/allure-framework/allure-python/compare/2.8.14...master) | Low | 5/20/2020 |
| 2.8.14 | * Added allure.labels deco for robotframework (via #487) - @skhomuti ## 👀 Links [Commits since 2.8.13](https://github.com/allure-framework/allure-python/compare/2.8.13...master) | Low | 5/18/2020 |
| 2.8.13 | * Change testplan format (via #482) - @sseliverstov ## 👀 Links [Commits since 2.8.12](https://github.com/allure-framework/allure-python/compare/2.8.12...master) | Low | 4/7/2020 |
| 2.8.12 | * Select tests by fullName (via #478) - @sseliverstov ## 🐞 Bug Fixes * Fix behave hooks by adding Configuration object instead of dict (via #479) - @middagj ## 👀 Links [Commits since 2.8.11](https://github.com/allure-framework/allure-python/compare/2.8.11...master) | Low | 3/17/2020 |
| 2.8.11 | * add attachment to an allure report for allure-pytest-bdd (via #469) - @fundakol ## 👀 Links [Commits since 2.8.10](https://github.com/allure-framework/allure-python/compare/2.8.10...master) | Low | 2/24/2020 |
| 2.8.10 | * Update release.yaml (via #467) - @sseliverstov * Sync Fork from Upstream Repo (via #3) - @sthagen * Use user-data to pass link patterns to Allure-Behave (via #464) - @kowalcj0 ## 👀 Links [Commits since 2.8.9](https://github.com/allure-framework/allure-python/compare/2.8.9...master) | Low | 2/11/2020 |
| 2.8.9 | Release 2.8.9 | Low | 2/4/2020 |
| 2.8.8 | * Add pull request to build workflow (via #461) - @sseliverstov * Add release drafter workflow (via #460) - @sseliverstov ## 🐞 Bug Fixes * fix for 'allure-pytest-bdd' report marks feature as 'Fail' even when all steps pass (via #462) - @fundakol ## 👀 Links [Commits since 2.8.7](https://github.com/allure-framework/allure-python/compare/2.8.7...master) | Low | 2/4/2020 |
| 2.8.7 | Release 2.8.7 | Low | 1/25/2020 |
