This message was deleted.
# develocity
s
This message was deleted.
l
I've opened an issue on our internal board to investigate this.
👍🏾 1
d
We could reproduce the problem and are working on a fix for this (the problem only occurs in cases where multiple suites are being used and the classes involved have
@AfterClass
methods).
👍🏾 1
s
I have similar issue (but not sure about the root cause), the stacktrace is
Copy code
com.gradle.maven.scan.extension.test.config.TestCapturingException: Unexpected failure while capturing test events for Gradle Enterprise
	at com.gradle.maven.scan.extension.test.config.TestCapturingException.a(SourceFile:12)
	at com.gradle.maven.scan.extension.test.listener.testng.ExceptionWrappingTestNGListener.onAfterClass(SourceFile:77)
	at org.testng.internal.invokers.TestMethodWorker.invokeListenersOnAfterClass(TestMethodWorker.java:235)
	at org.testng.internal.invokers.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:214)
	at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:131)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.testng.TestRunner.privateRun(TestRunner.java:848)
	at org.testng.TestRunner.run(TestRunner.java:621)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:437)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:397)
	at org.testng.SuiteRunner.run(SuiteRunner.java:336)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1280)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1200)
	at org.testng.TestNG.runSuites(TestNG.java:1114)
	at org.testng.TestNG.run(TestNG.java:1082)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Objects.java:208)
	at com.gradle.maven.scan.extension.test.listener.testng.g.onAfterClass(SourceFile:246)
	at com.gradle.maven.scan.extension.test.listener.testng.ExceptionWrappingTestNGListener.onAfterClass(SourceFile:75)
	... 24 more
The problem is that it happens with private company projects. I can expose some details, e.g. it’s
TestNG 7.8.0
and
maven-surefire-plugin
2.22.2
Well, I’ve probably located this, there is a disabled test and if I enable it the test fails (but not the extension):
Copy code
import org.testng.annotations.Test;

@Test(enabled = false)
public class ImageWidgetControllerModelTest {
a
i can confirm that my issue was resolved with version 1.17.2
s
Thx. Probably that’s the separate issue, as I use
1.17.2
😞
m
@Sergey Chernov We’re currently working on a fix for an issue where the stack trace looks similar. Could you please provide a few more details on what TestNG features
ImageWidgetControllerModelTest
uses? Is
@Test(priority = …)
used? If you don’t want to provide this info here, please submit a support ticket via https://support.gradle.com/hc/en-us.
s
Nothing special. The test class looks like
Copy code
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
...
@Test(enabled = false)
public class ImageWidgetControllerModelTest { // no super-class
...
    @BeforeMethod
    public void beforeMethod() {
...
    }
...
// not annotated! (not required in TestNG)
    public void testMethod1() {
...
}