Reputation: 33
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
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
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
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