【问题标题】:Serenity Report not showing all the scenarios outline mentioned in feature file though taking all screenshot for all scenario outlineSerenity Report 未显示功能文件中提到的所有场景大纲,尽管为所有场景大纲截取了所有屏幕截图
【发布时间】:2020-11-22 20:50:38
【问题描述】:

报告仅包含@test2 场景大纲,但不包含@test1 场景大纲。 我检查了宁静报告文件夹,它也有@test1 场景大纲的截图。我不知道为什么会这样。当我使用“Scenario”而不是“Scenario Outline”运行相同的测试时,报告会正确生成。

功能文件:

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features = {"features"}, glue = {"stepdefinitons"},plugin={"pretty"})
public class serenity runner{
}

我在功能文件中有两个场景大纲

@test1
Scenario Outline: Verification of Login as user 1
Given I login in to app as user
When I give credentials
Then I see the details page
Examples:
|x|y|
|abc|asx|


@test2
Scenario Outline: Verification of testing user
Give I login into app2 as user
When I give credentials
Then I see user name and details application
Examples:
|z|w|
|fdgdfg|gfdg|

Pom configuration:-
<serenity.version>2.1.5</serenity.version>
<serenity.maven.version>2.1.5</serenity.maven.version>
<serenity.cucumber.version>1.9.50</serenity.cucumber.version>
<maven.compiler.version>3.8.1</maven.compiler.version>

Goals:
clean verify -Dcucumber.options="--tags '@test1 or test2'"

Results:
Tests run: 2, failures: 0, Errors: 0, skipped: 0

but Serenity tests result shows as below
SERENITY TESTS: SUCCESS
|Test executed | 1
|Test passed | 1
|Tests with errors | 0
|Tests ignored/skipped | 0

【问题讨论】:

    标签: java maven automation serenity-bdd cucumber-serenity


    【解决方案1】:

    我修改了我的项目并添加了功能文件,遵循 Cucumber/Serenity 约定。带有场景大纲的所有场景都显示在报告中。请创建如下项目:https://github.com/cliviu/serenity-cucumber5-starter.git。请参考git问题:-https://github.com/serenity-bdd/serenity-core/issues/2190

    【讨论】:

      猜你喜欢
      • 2018-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-12
      • 2020-07-11
      • 1970-01-01
      • 2017-11-21
      • 1970-01-01
      相关资源
      最近更新 更多