Repository navigation
Conversation
|
@delatrie Could you please take a look. It's mostly vibe coded given I haven't written a single python code line by hand during my career so it might require a bit more thorough review 😅 |
c76cb98 to
2634ba2
Compare
| Status](https://img.shields.io/pypi/v/allure-nose2)](https://pypi.python.org/pypi/allure-nose2) | ||
| [](https://pypi.python.org/pypi/allure-nose2) | ||
|
|
||
| ## Skipping muted tests |
There was a problem hiding this comment.
Let's keep README as is. The feature is too narrow and specific to document here.
| selected, deselected_by_testcase = select_by_testcase(items, config) | ||
| selected, deselected_by_labels = select_by_labels(selected, config) | ||
|
|
||
| muted_tests = get_testplan("excludedTests") |
There was a problem hiding this comment.
Here and in other integrations, explicitly excluded tests should not produce skipped test results (as in a normal test plan).
The reason is that we cannot guarantee skipped test results across all frameworks, since many only provide a deselection API to prevent tests from running alongside their setup/teardown code.
In pytest, we can use pytest.mark.skip, which automatically disables fixtures once all tests in their scopes are marked as skipped. But in many other cases, no such luxury exists, and we end up with two options:
- Skip dynamically, which executes setup/teardown, including per-test (before/after each) code.
- Skip prematurely with the deselection API, which avoids the entire lifecycle of the test.
Option 1 has a major drawback: the very code that caused us to exclude the test might get running.
Option 2 often doesn't tell us whether the excluded test even exists in the code.
For test plans, keeping setup/teardown code from running is more important. Similarly, it's more important (to me) for muted tests too.
Hence, we cannot introduce any major policy regarding muted tests based on the presence or absence of skipped test results at the Allure 3 or TestOps level.
Context
Support
mutedTestsin the JSON test plan for pytest, pytest-bdd, Behave, nose2, and Robot Framework. Tests that match an Allure ID or exact selector are skipped before their bodies run. When reported, they retainstatus: skippedandstatusDetails.muted: true.Muting respects runner filters and existing test-plan selection. The README documents selector formats and adapter behavior, and the test suite covers matching and adapter integration.
Checklist