Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Features in Functional Coverage Overview and Functional Coverage Details Report #3401

Closed
DanielFran opened this issue Feb 8, 2024 · 4 comments

Comments

@DanielFran
Copy link
Contributor

DanielFran commented Feb 8, 2024

What happened?

image
All tests scenarios run but in the report page some features are not listed on the report summary:

  • Functional Coverage Overview
    Example: missing Steering feature
    image

  • Functional Coverage Details
    Example: missing Steering feature
    image

Also identified that are missing links on the Test Failure Overview - Most Unstable Features section
Example: missing Steering feature link page
image

If I look at the Test Results, the Steering feature tests are listed
image

Also the same feature is missing on the Requirements overview, Capabilities and Features page

What did you expect to happen?

All features should appear

Serenity BDD version

4.1.0

JDK version

17

Execution environment

Linux
Chome browser
Using maven project

How to reproduce the bug.

Not sure how I can reproduce the issue

Pom.xml

<?xml version="1.0" encoding="UTF-8" ?>
<project
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
    <modelVersion>4.0.0</modelVersion>

    <groupId>xxx</groupId>
    <artifactId>xxx</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <description>xxx</description>

    <properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>

        <serenity.version>4.1.0</serenity.version>
        <junit5.version>5.10.2</junit5.version>
        <cucumber.version>7.15.0</cucumber.version>
        <rest-assured.version>5.4.0</rest-assured.version>
        <logback-classic.version>1.4.14</logback-classic.version>

        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
        <maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
    </properties>

    <!-- Dependency Management -->
    <dependencyManagement>
        <dependencies>
            <!-- Cucumber BOM -->
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-bom</artifactId>
                <version>${cucumber.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- JUnit BOM -->
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit5.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Dependencies -->
    <dependencies>
        <!-- Serenity -->
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-core</artifactId>
            <version>${serenity.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-cucumber</artifactId>
            <version>${serenity.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-rest-assured</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-junit5</artifactId>
            <version>${serenity.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- JUnit 5 -->
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Cucumber -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit-platform-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Rest Assured -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>${rest-assured.version}</version>
        </dependency>

        <!-- Logback -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback-classic.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/AcceptanceTestSuite.java</include>
                    </includes>
                    <properties>
                        <configurationParameters>cucumber.junit-platform.naming-strategy=long</configurationParameters>
                    </properties>
                    <systemPropertyVariables>
                        <junit.jupiter.extensions.autodetection.enabled>
                            true
                        </junit.jupiter.extensions.autodetection.enabled>
                    </systemPropertyVariables>
                    <parallel>classes</parallel>
                    <parallel>methods</parallel>
                    <useUnlimitedThreads>true</useUnlimitedThreads>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>${serenity.version}</version>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

junit-platform.properties:

cucumber.publish.enabled = false
cucumber.publish.quiet = true
cucumber.snippet-type = camelcase
cucumber.plugin = pretty,junit:target/cucumber-reports/cucumber.xml,timeline:target/test-results/timeline,io.cucumber.\
    core.plugin.SerenityReporter

AcceptanceTestSuite.java

@Suite(failIfNoTests = false)
@IncludeEngines("cucumber")
@SelectClasspathResource("/features")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "xxx.stepDefinitions")
public class AcceptanceTestSuite {}

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

@wakaleo
Copy link
Member

wakaleo commented Feb 8, 2024

It's possibly related to errors in the feature files - try running the check-gherkin goal before running the tests. Also, the SerenityReporter is deprecated, use the SerenityParallelReporter instead.

@DanielFran
Copy link
Contributor Author

DanielFran commented Feb 8, 2024

It's possibly related to errors in the feature files - try running the check-gherkin goal before running the tests. Also, the SerenityReporter is deprecated, use the SerenityParallelReporter instead.

Was not aware of this goal. I see that the issue is with duplicated scenario names

@wakaleo Since I do not want to run the tests in parallel, I just need to update this config?

cucumber.plugin=pretty,junit:target/cucumber-reports/cucumber.xml,timeline:target/test-results/timeline,io.cucumber.\
 core.plugin.SerenityReporterParallel

@wakaleo
Copy link
Member

wakaleo commented Feb 13, 2024

It's possibly related to errors in the feature files - try running the check-gherkin goal before running the tests. Also, the SerenityReporter is deprecated, use the SerenityParallelReporter instead.

Was not aware of this goal. I see that the issue is with duplicated scenario names

@wakaleo Since I do not want to run the tests in parallel, I just need to update this config?

cucumber.plugin=pretty,junit:target/cucumber-reports/cucumber.xml,timeline:target/test-results/timeline,io.cucumber.\
 core.plugin.SerenityReporterParallel

You can still the SerenityReporterParallel with non-parallel tests, but you can also use SerenityReporter.

@DanielFran
Copy link
Contributor Author

Thanks @wakaleo, everything is OK now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants