allure-framework / allure-framework/allure-python

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

Ouverte
#279 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug contribute theme:behave
Langage dominant
Python
Étoiles
814
Forks
260
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par les hooks de environment.py présentés dans l’issue et par l’intégration allure-behave utilisée avec behave==1.2.6. Reproduisez le problème avec `behave -D server="testing" qa/functional/features/` et comparez le rapport avec et sans le formatter. C’est terminé lorsque les noms de Feature et de Scenario ajoutés apparaissent dans le rapport Allure.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
testing-qa
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.