allure-framework / allure-framework/allure-python
using pytest.mark.parametrize will miss some testcase in report
- 主要语言
- 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?
when i use `pytest.mark.parametrize` ,in specific data situations, i got same historyId for two diffent testcase, when report cameout, only one of two testcase show in report.
#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Code to repeat :
```python
data = [
["", "admin", 12345],
["admin", "", 12345],
]
@pytest.mark.parametrize("name, account, phone_number", data)
def test_add_member(name, account, phone_number):
print(name, account, phone_number)
```
#### What is the expected behavior?
expected got 2 testcase in report
#### What is the motivation / use case for changing the behavior?
#### Please tell us about your environment:
- Allure version: 2.19.0
- Test framework: pytest@7.2.2
- Allure adaptor: allure-pytest@2.13.2
#### Other information
Becourse in `allure_pytest.util.get_history_id`, only use values in original_values to generate historyId
Maybe use both name and value will solve the problem
贡献指南
调研方向
从 allure_pytest.util.get_history_id 开始,使用报告中所示的两个参数化测试用例重现该问题。检查 original_values 如何用于生成 historyId。当两个不同的测试用例都在 Allure report 中以独立的 history IDs 出现时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 52/100