[英]Serenity Report not showing all the scenarios outline mentioned in feature file though taking all screenshot for all scenario outline
報告僅包含 @test2 場景大綱,但不包含 @test1 場景大綱。 我檢查了寧靜報告文件夾,它也有@test1 場景大綱的截圖。 我不知道為什么會這樣。 當我使用“場景”而不是“場景大綱”運行相同的測試時,報告正在正確生成。
功能文件:
@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
我修改了我的項目並添加了功能文件,遵循 Cucumber/Serenity 約定。 帶有場景大綱的所有場景都顯示在報告中。 請創建如下項目: https://github.com/cliviu/serenity-cucumber5-starter.git 。 請參考 git 問題:- https://github.com/serenity-bdd/serenity-core/issues/2190
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.