0
votes

I have used Maven project with Selenium & TestNG to create automated scripts which I want to execute from Jenkins. In Jenkins I have added the TestNG plugin to publish the TestNG report. But it is not getting displayed. I'm getting the below mentioned error.

Error: TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: /target/surefire-reports/testng-results.xml Did not find any matching files. Finished: SUCCESS

Actual path of the TestNG report file: E:\STUDY_MATERIAL\JAVA\WORKSPACE\SeleneniumFrameWork\target\surefire-reports\testng-results.xml

I have tried the following options but didn't work out for me.

  1. Tried giving the full path of the TestNG report. Forward ans backward slash in the pattern.

  2. I have tried different other options by changing the TestNG result file path but it's working for me.

Please share some inputs on how to resolve this issue.

"testng-results.xml" file is available in workspace. But it's failed to display the report. I have attached screenshot of Jenkins workspace and Console Output.

Note: I am using Jenkins 2.7.0 in Windows 10.

Jenkins Workspace

I have attached the Job configuration details of Jenkins. Job Configuration Details

1
Can anyone please help me here to resolve this issue? I am not able to get the TestNG report displayed in Jenkins. It'll be really helpful if anyone can please share any tutorial/blog/site to check for the same. Thanks! - A.K

1 Answers

0
votes

Few checkpoints : 1. Check if testng is producing this file at the specified location : /target/surefire-reports/testng-results.xml 2. TestNG needs to be configured to generate xml report

  1. If this file is there, pass path in file locator as : target/surefire-reports/testng-results.xml See picture

Hopefully, you will get results on jenkins if everything mentioned above is correct.