allure-framework / allure-framework/allure-python

--allure-link-pattern option don't filter any test.

オープン
#433 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
task:new feature theme:pytest
主要言語
Python
スター
814
フォーク
260
PR マージ指標
30日以内にマージされた PR はありません

説明

#### I'm submitting a ...
- [ X ] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.

#### What is the current behavior?

`--allure-link-pattern` option don't filter any test, and run the full suite.

#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

```python
import allure

@allure.testcase('https://redmine.xxx.com/issues/25','25')
def test_with_allure_link():
pass

def test_without_allure_link():
pass
```

```bash
(venv) bash-5.0$ python3 -m pytest --allure-link-pattern='testcase:https://redmine.xxx.com/issues/25'
======================================================================================= test session starts ========================================================================================
platform linux -- Python 3.7.4, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
rootdir: /home/xxx/PycharmProjects/sandbox/bugs
plugins: allure-pytest-2.7.0
collected 2 items

test_allure_link.py .. [100%]

===================================================================================== 2 passed in 0.02 seconds =====================================================================================
```

#### What is the expected behavior?
`--allure-link-pattern` should only run the test with the matching link decorator.

#### Please tell us about your environment:

- Allure version: 2.8.1
- Test framework: pytest@5.1.2 also tested on 5.1.0
- Allure adaptor: allure-pytest@2.8.4 also tested on 2.7.0

#### Other information

```bash
python3 -m pytest --allure-link-pattern='testcase:https://redmine.xxx.com/issues/25'
============================= test session starts ==============================
platform linux -- Python 3.7.4, pytest-5.1.2, py-1.8.0, pluggy-0.12.0
rootdir: /server/xxx, inifile: pytest.ini, testpaths: features/tests
plugins: allure-pytest-2.8.4
collected 2772 items / 2 deselected / 2770 selected
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Reproduce the behavior with the provided test_allure_link.py example and the pytest command using --allure-link-pattern. Start by tracing how allure-pytest registers the option and applies collection filtering; done means the linked test is selected while the unlinked test is deselected, with coverage for the reported case.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。