allure-framework / allure-framework/allure-python
Excluding allure-labels in pytest run
- 主要言語
- Python
- スター
- 814
- フォーク
- 260
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
#### I'm submitting a ...
- [ ] feature request
#### What is the current behavior?
We have CLI param `--allure-label` and its possible to INCLUDE labels. Like `--allure-label method=AnyMethod` and it works
#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
But I decided to try to exclude from run tests with `@allure.manual(True)` decorator and came across a bunch of things:
1. You can't even include by label if your value (but it's default value) is a bool type. Example: if you set `--allure-label ALLURE_MANUAL=True` in CLI so it will deselect everything.
2. But I could find an interesting moment: if to write decorator like `@allure.manual('True')` and set the same `--allure-label ALLURE_MANUAL=True` in CLI -- it works and manual tests will be selected.
#### What is the expected behavior?
I want not just include labels, but also exclude. Something like `--allure-label "not ALLURE_MANUAL=True"`
#### What is the motivation / use case for changing the behavior?
We write tests as code and we dont need manual test cases in allure report. With this feature we will be able to run night tests and they will be closed automatically in allure testOps.
#### Please tell us about your environment:
- Allure version: 4.22.1
- Test framework: pytest==7.2.2
- Allure adaptor: allure-pytest==2.13.2
コントリビューションガイド
調査の方向性
まず、pytest アダプターが CLI パラメーター --allure-label をどのように解析し、allure.manual デコレーターの値と比較しているかを追跡します。既存の包含動作を確認し、"not ALLURE_MANUAL=True" のような除外式をどのように表現すべきかを判断します。boolean 値の label が一貫して機能し、一致する label を実行から除外できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, testing
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100