TestRunner is not picking up in Cucumber Reports - mvn build is not generating Cucumber reports

27 Views Asked by At

Pom .xml

<plugin>
                    <groupId>net.masterthought</groupId>
                    <artifactId>maven-cucumber-reporting</artifactId>
                    <version>5.5.0</version>
                    <executions>
                        <execution>
                            <id>execution</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <projectName>CustomeProjectNAme</projectName>
                                <outputDirectory>${project.build.directory}/cucumber-report-html</outputDirectory>
                                <inputDirectory>${project.build.directory}</inputDirectory> <!-- this is where the cucumber.json files is saved -->
                                <jsonFiles>
                                    <param>cucumber.json</param> <!-- the name/regex of the cucumber report json file -->
                                </jsonFiles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M8</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                            <configuration>
                                <includes>
                                    <include>**/*TestRunner.java</include>
                                </includes>
                            </configuration>
                        </execution>
                    </executions>

                </plugin>
            </plugins>
        </build>

TestRunner class

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




@RunWith(Cucumber.class)
@CucumberOptions(
        features = "src/integration-test/resources/features",
        glue = {"test.test.test"},
        plugin = {"pretty",
                "json:target/cucumber-reports/cucumber.json"},
        monochrome = true
)
public class TestRunner {

    static {

        System.out.println("Executing TestRunner++++++++++****************");
    }

}

When I run the report manaully TestRunner.java -I am getting the Cucumber-Report

But When I do mvn clean -U install verify- its not generating Cucumber Report under target folder

Please share your thoughts and I would really appreciate any leads

0

There are 0 best solutions below