user3000780
user3000780

Reputation: 31

Maven command not producing TestNG reports to test-output/junitreports

Without configuring, I've been able to produce TestNG test results to the test-output/junitreports directory using Eclipse and running a TestNG run configuration.

However, when running my the same tests during my maven build (using the same test suite file), these test results are not produced. How would I configure my maven test project to output the same way I see Eclipse+TestNG outputting the results?

Upvotes: 0

Views: 1056

Answers (1)

user3000780
user3000780

Reputation: 31

I was able to perform this output with the configuration in my test project pom.xml

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.17</version>
                    <configuration>
                        **<reportsDirectory>./test-output</reportsDirectory>**
                        <skipTests>false</skipTests>
                        <suiteXmlFiles>
                            <suiteXmlFile>${testSuiteFile}</suiteXmlFile>
                        </suiteXmlFiles>
                    </configuration>
                </plugin>

Upvotes: 2

Related Questions