allure-framework / allure-framework/allure-python

using pytest.mark.parametrize will miss some testcase in report

Abierto
#778 2 comentarios 1 reacción 0 asignados Ver en GitHub
bug theme:core
Lenguaje dominante
Python
Estrellas
814
Forks
260
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

#### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza en allure_pytest.util.get_history_id y reproduce el problema con los dos casos de prueba parametrizados que se muestran en el informe. Comprueba cómo se usa original_values para generar historyId. El trabajo estará terminado cuando ambos casos de prueba distintos aparezcan en el Allure report con history IDs separados.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.