Traveller
Traveller

Reputation: 397

Serenity BDD report does not show stories with Examples (Embedded tables)

I have a problem with all my stories showing up in the Serenity report.

When I run them with maven (mvn clean verify) I can see them in the output and they run through all the examples but when I open the report that is generated in the target\site\serenity folder they do not appear there.

Somehow the report plugin misses them and the problematic stories are the ones with Examples:.

I have one class that is a TestSuit and runs all the stories and the Steps are organized in other classes:

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===========================================================================");
    }
}

my .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|

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

Upvotes: 3

Views: 2286

Answers (2)

Swapnesh
Swapnesh

Reputation: 1

Check the serenity.test.root in property file after I removed it my stories were shown

Upvotes: 0

Alla
Alla

Reputation: 26

I've fixed it by updating serenity-maven-plugin to 1.1.42 version

Upvotes: 0

Related Questions