allure-framework / allure-framework/allure-python

Allure report doesn't take in correct number of tests when using parametrized tests where tests parameters are duplicated

Đang mở
#864 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
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ả

**Describe the Bug**
Allure report doesn't take in correct number of tests when using parametrized tests where tests parameters are duplicated.

**Steps to Reproduce**
1. Create a Python virtual env
2. Install allure-pytest
3. Create example tests to reproduce:

import pytest

@pytest.mark.parametrize(
'a, b',
[
(1, 1),
(1, 1)
]
)

def test_one(a, b):
assert a == b

4. Run tests using `pytest --clean-alluredir --alluredir=/tmp/allure-results`
5. Generate allure report `allure generate /tmp/allure-results/ --clean --output /tmp/allure-results/allure-report --single-file`
6. Open Allure report

**Expected Behaviour**
The report is generated without errors and the report shows 2 tests.

**Screenshots or Additional Context**
_Current version:_
![Image](https://github.com/user-attachments/assets/e2418901-a2b4-44cc-a171-2273408983be)
pip freeze:
allure-pytest==2.14.2
allure-python-commons==2.14.2
attrs==25.3.0
iniconfig==2.1.0
packaging==25.0
pluggy==1.6.0
pytest==8.3.5

_Version 2.9.44 (expected working result):_
![Image](https://github.com/user-attachments/assets/6d6cafe3-2899-4109-8a20-64e0c03a9028)
pip freeze:
allure-pytest==2.9.44
allure-python-commons==2.9.44
attrs==25.3.0
iniconfig==2.1.0
packaging==25.0
pluggy==1.6.0
pytest==8.3.5
six==1.17.0

**What Language are you using?**
Python 3.11.12

**What Framework/Allure Integration you are using?**
Pytest

**What version of Allure Integration you are using?**
2.34.0

**What version of Allure Report you are using?**
Latest

**Code of Conduct**
I agree to follow this project's Code of Conduct

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện vấn đề bằng ví dụ pytest được tham số hóa đã cung cấp và các lệnh --clean-alluredir và allure generate được liệt kê. So sánh báo cáo được tạo với phiên bản mong đợi và theo dõi cách các tham số trùng lặp được biểu diễn trong kết quả. Được xem là hoàn tất khi báo cáo được tạo không có lỗi và hiển thị 2 tests.

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-qa
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
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.