2
votes

I run TestNG using Maven. I'm trying now to use Jenkins' testng-plugin to see the results.

When I run the tests in Eclipse, I get the file /test-output/testng-results.xml

However I don't see such a file in my Jenkins agent. Where can I find it? and if it is not created, how do I create it?

2
What do you see in workspace/target/surefire-reports? Also the console can also give you a clue. Are you running as mvn test? - niharika_neo

2 Answers

2
votes

You have to add the post-build action "Publish TestNG Results" of the job. And as the "testng xml report pattern", give **/target/surefire-reports/testng-results.xml. That should show the results in the job's page.

1
votes

Please configure project to use custom workspace by providing path of your test source location on remote machine.The reports will be generated inside your custom workspace folder only. Rest is just to add rest of the path in post build action ..\test-output\testng-results.xml