3

我对 Serenity 报告中显示的所有故事都有疑问。

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

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

我有一堂课是 aTestSuit并运行所有故事,并且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===========================================================================");
    }
}

我的故事:

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

1 回答 1

0

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

于 2016-11-04T14:27:35.230 回答