Open hunterabhi212223 opened 5 months ago
You should find some configuration that is useful for you https://github.com/damianszczepanik/cucumber-reporting/tree/master/src/main/java/net/masterthought/cucumber/reducers
I guess reducing method ReducingMethod.MERGE_FEATURES_WITH_RETEST
can be used to merge results into a single html file.
The https://github.com/damianszczepanik/cucumber-reporting/blob/20f378d26e918e05a3945ae282ac52c88d4108bd/src/main/java/net/masterthought/cucumber/reducers/ReportFeatureWithRetestMerger.java#L109C68-L109C109
It is similar to #1044
@hunterabhi212223
I am running 2 cucumber runner files. One will run all the tests and failed feature will store in a rerun.text file. 2nd runner will be used to rerun failed feature only. In this case i am getting two different json files. is there any way that i can configure to get single HTML report
Jenkins file creating two json files but failing to genarate reports
Build.gradle
plugins { id 'java' }
repositories { mavenCentral() }
dependencies { testImplementation 'io.cucumber:cucumber-java:6.10.4' testImplementation 'io.cucumber:cucumber-junit:6.10.4' testImplementation 'junit:junit:4.13.2' implementation 'net.masterthought:cucumber-reporting:5.8.1' // Maven Cucumber Reporting implementation 'net.masterthought:maven-cucumber-reporting:5.8.1'
}
test { // Configure rerun.txt file generation // This example is for Cucumber systemProperty 'cucumber.options', "--rerun-file=${buildDir}/rerun.txt" }
// Define task to generate HTML reports using Maven Cucumber Reporting task generateCucumberReports(type: Exec) { // Ensure this task runs after tests are executed dependsOn test
def classpath = configurations.runtimeClasspath.collect { it.absolutePath }.join(':')
}
//reports.junitXml.destination = file("$buildDir/test-results/test")
// Ensure the generateCucumberReports task runs after tests test.finalizedBy generateCucumberReports
test { useJUnit() }
wrapper { gradleVersion = '8.8' //version required }
Jenkins file
pipeline { agent any
}