Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-836

TestNG - listeners problem (no report generated)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: 0.9
  • Fix Version/s: 0.9-rc-1

Description

no report is generated by TestNG listeners (other than default listeners)

test {
useTestNG()
options.listeners << 'org.uncommons.reportng.HTMLReporter'
options.listeners << 'org.uncommons.reportng.JUnitXMLReporter'
//useDefaultListeners = false
}

see attached project

it used to work with 0.8 (but with slightly different syntax)

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    testng_listeners.zip
    02/Mar/10 4:35 PM
    3 kB
    Tomek Kaczanowski
    1. Java Source File
      testng/src/test/.../testing/SimpleTest.java 0.3 kB
    2. File
      testng/build.gradle 0.4 kB
    Download Zip
    Show
    Zip Archive
    testng_listeners.zip
    02/Mar/10 4:35 PM
    3 kB
    Tomek Kaczanowski

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
Hide
Permalink
Adam Murdoch added a comment - 03/Mar/10 6:38 PM

Reportng is using the system ClassLoader to locate its reporting resources (AbstractReporter.java line 122). This won't work if Reportng is not loaded by the system ClassLoader.

Gradle no longer loads classes under test using the system ClassLoader, and so Reportng is failing.

Reportng should use whichever ClassLoader it has been loaded with to locate its resources, such as, for example, using getClass().getClassLoader() or even Thread.currentThread().getContextClassLoader().

Show
Adam Murdoch added a comment - 03/Mar/10 6:38 PM Reportng is using the system ClassLoader to locate its reporting resources (AbstractReporter.java line 122). This won't work if Reportng is not loaded by the system ClassLoader. Gradle no longer loads classes under test using the system ClassLoader, and so Reportng is failing. Reportng should use whichever ClassLoader it has been loaded with to locate its resources, such as, for example, using getClass().getClassLoader() or even Thread.currentThread().getContextClassLoader().
Hide
Permalink
Daniel Dyer added a comment - 09/Mar/10 5:58 PM

I'm the author of ReportNG. Somebody pointed me to this issue. I'll take a look at it shortly. Assuming the change doesn't cause any other problems it will be in the upcoming 1.1 release.

Show
Daniel Dyer added a comment - 09/Mar/10 5:58 PM I'm the author of ReportNG. Somebody pointed me to this issue. I'll take a look at it shortly. Assuming the change doesn't cause any other problems it will be in the upcoming 1.1 release.
Hide
Permalink
Daniel Dyer added a comment - 09/Mar/10 6:41 PM

By "somebody" I of course meant Tomek, reporter of the issue. Sorry, the Java.net mailing lists baffle me sometimes. I've committed a fix to ReportNG's Subversion. So if you need it right away, you can check it out and build from source. Version 1.1 will be released soon (current best guess about a week, but that's subject to change).

Show
Daniel Dyer added a comment - 09/Mar/10 6:41 PM By "somebody" I of course meant Tomek, reporter of the issue. Sorry, the Java.net mailing lists baffle me sometimes. I've committed a fix to ReportNG's Subversion. So if you need it right away, you can check it out and build from source. Version 1.1 will be released soon (current best guess about a week, but that's subject to change).
Hide
Permalink
Hans Dockter added a comment - 10/Mar/10 4:36 PM

Excellent. Thanks a lot.

Show
Hans Dockter added a comment - 10/Mar/10 4:36 PM Excellent. Thanks a lot.
Hide
Permalink
Tomek Kaczanowski added a comment - 12/Jul/10 5:26 PM

This works now with ReportNG 1.1.1

Cookbook updated: http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-addreporters

The issue can be closed as fixed.

Show
Tomek Kaczanowski added a comment - 12/Jul/10 5:26 PM This works now with ReportNG 1.1.1 Cookbook updated: http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-addreporters The issue can be closed as fixed.

People

  • Assignee:
    Hans Dockter
    Reporter:
    Tomek Kaczanowski
Vote (0)
Watch (0)

Dates

  • Created:
    02/Mar/10 4:35 PM
    Updated:
    04/Jan/13 5:10 AM
    Resolved:
    24/Nov/10 2:26 PM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.