Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10340

Email-ext plugin does not work with testng results(format)

      This plugin seem to work only with junit output report(xml) and Cobertura reports. It would be great if this can be made generic and be able to understand testng reports as well

          [JENKINS-10340] Email-ext plugin does not work with testng results(format)

          kutzi added a comment -

          This is an improvement request and not a bug.
          You can still configure TestNG to produce JUnit compatible output.

          kutzi added a comment - This is an improvement request and not a bug. You can still configure TestNG to produce JUnit compatible output.

          Just want to add couple of points here for TestNG:

          1. For TestNG, ${FAILED_TESTS} is giving No Tests Ran.

          2. The following results page is not read by this plug-in:
          ${FILE, path="http://server:port/jenkins/job/<job_name>/<build_number>/"} ---> Null Pointer exception is thrown....
          Please Note: Above URL is the place where the TestNG Results are displayed [We are unable to send this in the e-mail] --> presently users need to click on the link & then this data is shown!! [a bit of extra work]

          --> It would be great if we could send the data (as mentioned in the attachment) in the e-mail.

          Sandesh Prabhu M S added a comment - Just want to add couple of points here for TestNG: 1. For TestNG, ${FAILED_TESTS} is giving No Tests Ran. 2. The following results page is not read by this plug-in: ${FILE, path="http://server:port/jenkins/job/<job_name>/<build_number>/"} ---> Null Pointer exception is thrown.... Please Note: Above URL is the place where the TestNG Results are displayed [We are unable to send this in the e-mail] --> presently users need to click on the link & then this data is shown!! [a bit of extra work] --> It would be great if we could send the data (as mentioned in the attachment) in the e-mail.

          Kanstantsin Shautsou added a comment - - edited

          This plugin only sends emails, if you want send testng results - implement this in templates and send patch to review.

          The other interesting thing. I use default jelly html template but in one job it sends testng results, in other not, no ideas why (sources are same).

          Kanstantsin Shautsou added a comment - - edited This plugin only sends emails, if you want send testng results - implement this in templates and send patch to review. The other interesting thing. I use default jelly html template but in one job it sends testng results, in other not, no ideas why (sources are same).

          Alex Earl added a comment -

          The FILE token does not support URLs, it only supports FILES in the workspace.

          Alex Earl added a comment - The FILE token does not support URLs, it only supports FILES in the workspace.

          Alex Earl added a comment -

          It looks like this would be easy if the testng plugin inherited from the AbstractTestResultAction. (http://javadoc.jenkins-ci.org/hudson/tasks/test/AbstractTestResultAction.html)

          Alex Earl added a comment - It looks like this would be easy if the testng plugin inherited from the AbstractTestResultAction. ( http://javadoc.jenkins-ci.org/hudson/tasks/test/AbstractTestResultAction.html )

          Alex Earl added a comment -

          testng plugin needs to use the built-in way of reporting and associating test results with a build. http://javadoc.jenkins-ci.org/hudson/tasks/test/AbstractTestResultAction.html

          Alex Earl added a comment - testng plugin needs to use the built-in way of reporting and associating test results with a build. http://javadoc.jenkins-ci.org/hudson/tasks/test/AbstractTestResultAction.html

          zoltan luspai added a comment -

          Here is a workaround: because the Testng's ant task also generates the junit compatible reports we can use that for putting the failed tests to the emails. Just the Junit report publisher to the Jenkins project, and set the "Test report XMLs" to find the junit formatter xmls, like: "*/junitreports/.xml".
          Suddenly the failing tests will start to appear in the emails.

          Cheers,
          Zoltan

          zoltan luspai added a comment - Here is a workaround: because the Testng's ant task also generates the junit compatible reports we can use that for putting the failed tests to the emails. Just the Junit report publisher to the Jenkins project, and set the "Test report XMLs" to find the junit formatter xmls, like: "* /junitreports/ .xml". Suddenly the failing tests will start to appear in the emails. Cheers, Zoltan

          junit defines skipped tests as failed and provides wrong FAIL status to job.

          Kanstantsin Shautsou added a comment - junit defines skipped tests as failed and provides wrong FAIL status to job.

          Alex Earl added a comment -

          Feel free to submit a request to the testng plugin to inherit from AbstractTestResultAction. Until that happens this will remain "Won't Fix"

          Alex Earl added a comment - Feel free to submit a request to the testng plugin to inherit from AbstractTestResultAction. Until that happens this will remain "Won't Fix"

            Unassigned Unassigned
            hmahendrakumar Hari Mahendrakumar
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: