Serenity BDD报告不显示带有示例的故事(嵌入式表格)

时间:2016-07-14 08:14:20

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

我在Serenity报告中出现的所有故事都有问题。

当我使用maven(mvn clean verify)运行它们时,我可以在输出中看到它们并且它们会遍历所有示例但是当我打开生成的报告时 它们不会出现在target\site\serenity文件夹中。

不知何故,报告插件错过了它们,有问题的故事是那些示例:

我有一个类TestSuit并运行所有故事,Steps在其他类中组织:

public class BddTestSuite extends SerenityStories {

private static final Logger LOGGER = LoggerFactory.getLogger(BddTestSuite.class);

@BeforeStories
public void setUp(){
    LOGGER.info(
        "\n===========================================================================" +
        "\n>>>>>>>>>>> STARTING THE INTEGRATION TEST-SUITE " +
        "\n===========================================================================");
    }
}

我的.story:

Narrative:
Short description

Scenario: Scenario title
Given a given with param1 <param1>
And a given with param2 <param2>
When a when with param3 <param3>
Then a then with param1 <param1>,  param2 <param2> and  param3 <param3>
Examples:
|param1|param2|param3|
|val11|val12|val13|
|val21|val22|val23|

我的pom.xml:

        <build>
                .
                .
                .
            <plugins>
                .
                .
                .
                <!--Running integration tests-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${failsafe.plugin.version}</version>
                    <configuration>
                        <includes>
                            <include>**/integration/**/*.java</include>
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--Building Serenity report for BDD stories (integration tests)-->
                <plugin>
                    <groupId>net.serenity-bdd.maven.plugins</groupId>
                    <artifactId>serenity-maven-plugin</artifactId>
                    <version>${serenity.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>net.serenity-bdd</groupId>
                            <artifactId>serenity-core</artifactId>
                            <version>${serenity.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>serenity-reports</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>

1 个答案:

答案 0 :(得分:0)

我已经通过将serenity-maven-plugin更新为1.1.42版本来修复它