Primal
Primal

Reputation: 33

Maven project does not generate testng results within test-output folder from selenium project

I have created maven project with selenium and TestNG. When I run the project using pom file it does not generate TestNG results (test-output folder). But when I run the project as testng.xml->(right click) run as -> TestNG suite, it generates the results

Upvotes: 2

Views: 7660

Answers (3)

Rohit Sharma
Rohit Sharma

Reputation: 56

In Run from testNg.xml directly -By default in maven project html reports get created into test-output folder

In case we run from pom.xml using surefire plugin - Reports will get created into target\surefire-reports.

Upvotes: 4

irfan
irfan

Reputation: 896

As you are running testng tests from Maven (Surefire), your output folder will be target instead of test-output as defined by the surefire plugin, so if you are looking for file testng-results.xml or any other testng files then check at \target\surefire-reports\testng-results.xml

Upvotes: 1

undetected Selenium
undetected Selenium

Reputation: 193058

While working with multiple frameworks e.g. TestNG, Maven, Gradle due to synchronization issues within your IDE sometimes the test-output folder doesn't gets populated with the intended test results/output and the output tends to remain buffered. In these cases once the Test Execution gets completed Refresh the Maven Project and your test-output folder would get populated with the intended results/output.

Upvotes: 2

Related Questions