allure-framework / allure-framework/allure-python

Allure doesn't include information appended to Scenario or Feature description in before statements

Aperta
#279 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug contribute theme:behave
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

#### What is the current behavior?
If you include modify a Feature or Scenario description text in Behave's before_feature or before_scenario this is not reflected in the allure result.

#### Steps:
I've added something like this to my environment.py file
```
def before_feature(context, feature):
if 'server' in context.config.userdata:
feature.name += ' on ' + context.config.userdata['server'] + ' environment.'

def before_scenario(context, scenario):
if 'browser' in context.tags:
context.driver = webdriver.Chrome()
scenario.name += ' in ' + context.driver.capabilities['browserName'] + ' ' + context.driver.capabilities['version']
```
Then running with something like `behave -D server="testing" qa/functional/features/`

#### What is the expected behavior?
The feature should have ` on testing environment.` added to it on the allure report. And the scenario should have something like ` in chrome 68.0.3440.84` appended to the end of the name. Currently the allure report includes the feature and scenario descriptions without the appended information. Behave will include this appended information if I do not run with the formatter.

#### What is the motivation / use case for changing the behavior?
I'm trying to edit the Scenario and feature names without using Tables.

#### Please tell us about your environment:
- Allure version: 2.6.0
- Test framework: behave==1.2.6
- Allure adaptor: allure-behave==2.50

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dagli hook di environment.py mostrati nell’issue e dall’integrazione allure-behave utilizzata con behave==1.2.6. Riproduci il problema con `behave -D server="testing" qa/functional/features/` e confronta il report con e senza il formatter. Il lavoro è completato quando i nomi di Feature e Scenario aggiunti compaiono nel report Allure.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.