allure-framework / allure-framework/allure-python

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

オープン
#279 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug contribute theme:behave
主要言語
Python
スター
814
フォーク
260
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Issue に示されている environment.py のフックと、behave==1.2.6 で使用される allure-behave 統合から始めます。`behave -D server="testing" qa/functional/features/` で再現し、formatter ありとなしでレポートを比較します。追加された Feature 名と Scenario 名が Allure レポートに表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
testing-qa
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。