allure-framework / allure-framework/allure-python

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

Aperta
#778 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
bug theme:core
Lingua principale
Python
Stelle
814
Fork
260
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da allure_pytest.util.get_history_id e riproduci il problema con i due casi di test parametrizzati mostrati nel report. Verifica come viene utilizzato original_values per generare historyId. Il lavoro è completato quando entrambi i casi di test distinti compaiono nell’Allure report con history IDs separati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.