I could only create a hack with confidence. if you want, you can use:
- you need to create a Junit report from Cucumber to some folder (1) 'oucumber'
- copy the assurance reports (excluding the Cucmber report created with the assurance) to a certain (2) "surefire-reports-fixed" folder where the cucumber generated the report.
- copy cucumber junit-report from (1) to (2)
- jenkins should use the (2) 'surefire-reports-fixed' folder
Examples of changes in Maven:
<plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>change-bad-cucumber-test-file</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/target/surefire-reports-fixed</outputDirectory> <resources> <resource> <directory>${basedir}/target/cucumber</directory> </resource> <resource> <directory>${basedir}/target/surefire-reports</directory> <excludes> <exclude>**/*CucumberTest.*</exclude> </excludes> </resource> </resources> </configuration> </execution> </executions> </plugin>
changes in CucumberTest.java:
@RunWith(Cucumber.class) @Cucumber.Options(format = { "pretty", "junit:target/cucumber/TEST-packageHereToClass.CucumberTest.xml", "json:target/cucumber.json" }) public class CucumberTest { ... }
in jenkins set the correct folder for tests for (2) "surefire-reports-fixed- <" /
source share