Repository navigation
Closed
Description
Apache NetBeans version
Apache NetBeans 31
What happened
Using ant test or running individual tests in the IDE yields an error with an Ant project that uses the bundled TestNG libraries (added with Test Dependencies > Add Library...).
Language / Project Type / NetBeans Component
Ant project using TestNG
How to reproduce
- Create a new Ant project (
New Project...>Java with Ant>Java Application). KeepCreate Main Classchecked. - In the main class, click on the class name and select
Create Test Class [TestNG...in the hints. - Test the
testMainmethod.
Did this work correctly in an earlier version?
Apache NetBeans 30
Operating System
linux 7.1.8.arch1-3
JDK
OpenJDK 26.0.2.u10-1
Apache NetBeans packaging
Community provided installer, Third-party package
Anything else
It has broken with 31 because TestNG has been bumped up to 7.11. The current build-impl.xml isn't equipped to handle the new major version.
Test output:
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
Exception in thread "main" org.testng.TestNGException:
Couldn't find a constructor in class org.testng.reporters.VerboseReporter
at org.testng.internal.objects.InstanceCreator.newInstance(InstanceCreator.java:59)
at org.testng.ITestObjectFactory.newInstance(ITestObjectFactory.java:10)
at org.testng.internal.objects.SimpleObjectDispenser.dispense(SimpleObjectDispenser.java:61)
at org.testng.internal.objects.GuiceBasedObjectDispenser.dispenseObject(GuiceBasedObjectDispenser.java:41)
at org.testng.internal.objects.GuiceBasedObjectDispenser.dispense(GuiceBasedObjectDispenser.java:31)
at org.testng.internal.DefaultListenerFactory.createListener(DefaultListenerFactory.java:29)
at org.testng.TestNG.setListenerClasses(TestNG.java:698)
at org.testng.TestNG.configure(TestNG.java:1558)
at org.testng.TestNG.privateMain(TestNG.java:1421)
at org.testng.TestNG.main(TestNG.java:1394)
Are you willing to submit a pull request?
Yes
Activity
matthiasblaesing commentedon Aug 16, 2026
This is most probably a fallout from #9254. Grepping through the codebase indicates, that the problem might be much bigger (
grep -r org.testng.reporters.VerboseReporter * | grep -v "/test/").The minimal change I had to do to get basic execution working again was:
@sid-srini I think the hard part will be to find the other places that need love
sid-srini commentedon Aug 24, 2026
Thanks @matthiasblaesing for triaging this issue, along with the suggestions for fixes. I'm sorry that the PR #9254 included changes to the common ant templates, but did not include these junit snippets, xsl etc. I'll work on fixing such usages in various places asap.
Apologies for the breakage.
gem-bricks commentedon Sep 23, 2026
@matthiasblaesing I took a look at some parts of the code. Debugging TestNG tests may also break if TestNG is upgraded to version 8 in the future, as the
mainentrypoint as specified withj2seproject3:debugis deprecated and is planned to be removed with version 8. Maybe an adapter like this, compiled with the project (similar to howjava.j2semodulebuilds Ant tasks), could fix it.Although this is hacky and will also have to be implemented on a project type-by-type basis. Would it be best to start with a scoped pull request that only fixes
java.j2seprojectandjava.source.ant? I compiled the modules you made changes for and installed them as plugins, and all of the usual features are working fine for me.matthiasblaesing commentedon Sep 26, 2026
@gem-bricks I think that a partitial solution is ok. Of course a complete fix would be preferable, but each improvement counts. Before you start please have a look at #9641 so the work integrated there does not conflict with your changes.
gem-bricks commentedon Sep 26, 2026
@matthiasblaesing I'm okay with the changes with #9641. On second thought, fixing the potential test debugging issue is a bridge that will be crossed if TestNG removes that entry point and when NetBeans upgrades TestNG to 8.0, so I don't plan on working on it at the moment.