allure-framework / allure-framework/allure-python

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

未关闭
#433 5 条评论 0 个 reaction 已指派 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 摘要。