allure-framework / allure-framework/allure-python
--allure-link-pattern option don't filter any test.
- Ngôn ngữ chính
- Python
- Star
- 814
- Fork
- 260
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
#### 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
```
Hướng dẫn đóng góp
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- testing
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100