3

I have created a Maven Project Job/Item in my local jenkins server. And added jenkin's TestNG plugin to see the test reports

But the job is not displaying my TestNg resuls. I see the following error:
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Did not find any matching files.
Finished: SUCCESS

The actual location of the testng-results.xml: E:\AllStuffProfessional\EclipseWorkSpaces\MavenWorkSpace\MyMavenPrj\target\surefire-reports\testng-results.xml

I have
Home directory: C:\Users\abhijeet\.jenkins
under Manage Jenkins> Configure System

What i have tried so far :
1) I tried entering the complete path of the "testng-results.xml" in the jenkins job. I tried both forward-slash ans backward slash as file separator in the path. But still same error.

2) When i manually place the testng-results.xml (of previous build) in "C:\Users\abhijeet.jenkins" then jenkins finds the report but ignores it since its a old report. (I just wanted to check if the jenkins will atleast find the report)

3) Then, I modified pom.xml to place the report under Jenkins home directory directly but not working.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-report-plugin</artifactId>
    <version>2.19.1</version>
    <configuration>
        <outputDirectory>C:/Users/abhijeet/.jenkins/jobs/MavenTrial01/re</outputDirectory>
    </configuration>
</plugin>

HOw do i make jenkins locate this testng-results.xml??? Plz Help

Screenshot for reference:

enter image description here

Daniel
  • 1,364
  • 1
  • 19
  • 34
user2048204
  • 729
  • 4
  • 13
  • 27
  • I just added reporting directory to the surefire pluging. and now the reports are directly placed in the jenkin's job workspace. and i am seeing the desired results. Just le me know if this is not the right way to do it. or some better way is available. – user2048204 Apr 10 '16 at 09:43
  • Are you using a Maven Job Type for the job you have created? Does you build work on command line correctly ? – khmarbaise Apr 10 '16 at 13:16
  • @khmarbaise Question starts with "_I have created a Maven Project Job/Item_". – Gerold Broser Apr 10 '16 at 13:40
  • Have you seen [How to set up TestNG+Jenkins](http://stackoverflow.com/questions/25650361/how-to-set-up-testngjenkins) or [Jenkins Publish TestNG Results not working](http://stackoverflow.com/questions/26116894/jenkins-publish-testng-results-not-working) already? Maybe these help. And if they do please add an answer here what you exactly did to resolve your issue. – Gerold Broser Apr 10 '16 at 13:58

0 Answers0