Details
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)
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().