allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
730 stars 237 forks source link

Fix suite label duplication when using dynamic suite functions (Fixes #586) #746

Closed delatrie closed 1 year ago

delatrie commented 1 year ago

Context

Allure-pytest defines default suite labels: parentSuite (optional), suite and subSuite (optional). If an author of a test uses a decorator (e.g., @allure.suite) to assign a custom suite label to a test, allure-pytest doesn't add its default counterpart.

This PR extends this behavior to cover suites added dynamically (e.g., with allure.dynamic.suite) as well.

Checklist

Closes #586

suxb201 commented 9 months ago

The default suit is three-tiered. If I only want a two-tier test suite, there's currently no way to achieve this, right? Because subSuite and parentSuite are added by default.