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

Maven cucumber reporting stopped working on update to Selenium 4.14.1 from Selenium 4.13.0 #1114

Open
SeleniumNinja opened this issue Oct 30, 2023 · 3 comments

Comments

@SeleniumNinja
Copy link

SeleniumNinja commented Oct 30, 2023

After update to selenium 4.14.1 from selenium 4.13.0 cucumber reporting masterthought maven-cucumber-reporting stopped generating reports with a use of maven command: mvn verify -Dcucumber.filter.tags=@desktop. On selenium 4.13.0 everything was fine.

In target folder /jsonReport both files are empty:

cucumber-report.html
cucumber-report.json

This is test runner class

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(features="src/test/java/features",
        plugin = {"pretty", "json:target/jsonReports/cucumber-report.json",
                "html:target/jsonReports/cucumber-report.html"},
        glue= {"stepDefs"},
        stepNotifications = true,
        monochrome = true
        )
public class TestRunner {
}

I am using in POM

<dependency>
    <groupId>net.masterthought</groupId>
    <artifactId>maven-cucumber-reporting</artifactId>
    <version>5.7.6</version>
</dependency>
@SeleniumNinja SeleniumNinja changed the title Maven cucumber reporting stopped working on update to Seleniu, 4.14.1 from Selenium 4.13.0 Maven cucumber reporting stopped working on update to Selenium 4.14.1 from Selenium 4.13.0 Oct 30, 2023
@SeleniumNinja
Copy link
Author

are there any other dependencies requreid in POM to have this reports generated ?

@damianszczepanik
Copy link
Owner

pom.xml is the only requirement for the project

@gitissuepost
Copy link

@SeleniumNinja - With my limited understanding on your POM, I hope you have a plugin setup for your execution which will generate this report. I am using mvn plugin for this reporting and it was working fine with all previous versions of Selenium4. We are currently on 4.25 and the maven plugin doesn't complaint while generating the report unless the json file is huge.

Earlier we were generating the report through java code depending on the dependency you have highlighted but later we migrate to the plugin to transfer all these heavy lifting to plugin to take care which will align automatically will future enhancements/optimizations/upgrades from the tool.

Below is the plugin def I am using, in case you are not using the plugin yet.

<plugin> <groupId>net.masterthought</groupId> <artifactId>maven-cucumber-reporting</artifactId> <version>${plugin.maven-cucumber-reporting}</version> <executions> <execution> <id>report</id> <phase>post-integration-test</phase> <goals> <goal>generate</goal> </goals> <configuration> <projectName>${project.name}</projectName> <!-- optional, per documentation set this to "true" to bypass generation of Cucumber Reports entirely, defaults to false if not specified --> <skip>false</skip> <!-- output directory for the generated report --> <outputDirectory>${project.build.directory}</outputDirectory> <!-- optional, defaults to outputDirectory if not specified --> <inputDirectory>${project.build.directory}/json-reports</inputDirectory> <jsonFiles> <!-- supports wildcard or name pattern --> <param>**/*.json</param> </jsonFiles> <!-- optional, defaults to outputDirectory if not specified --> <classificationDirectory>${project.build.directory}</classificationDirectory> <!-- optional, set true to group features by its Ids --> <mergeFeaturesById>false</mergeFeaturesById> <!-- optional, set true to get a final report with latest results of the same test from different test runs --> <mergeFeaturesWithRetest>false</mergeFeaturesWithRetest> <!-- optional, set true to fail build on test failures --> <checkBuildResult>false</checkBuildResult> </configuration> </execution> </executions> </plugin>
Refer maven-cucumber-reporting for more details.

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

3 participants