allure-framework / allure-framework/allure-python

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

未关闭
#279 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug contribute theme:behave
主要语言
Python
星标
815
派生
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 hooks 以及与 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 摘要。