You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempt to run tests with TestNG installed in the classpath, I get the following error
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:57)
at org.testng.ITestObjectFactory.newInstance(itestobjectfactory.java:10)
....
How to reproduce
Install TestNG with required dependencies and run a test.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
17
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
It works correctly if I run the test via a Test Runner, but if I right click and select run file or test file it throws that error.
I narrowed it down to the TestNGAntTask in the build-impl.XML file where the listeners attribute has the VerboseReporter package listed - if I remove that it works.
I've been able to reproduce this on two separate machines.
All libraries are in the classpath:
Error message:
Couldn't find a constructor in class org.testng.reporters.VerboseReporter
at org.testng.internal.objects.InstanceCreator.newInstance(InstanceCreator.java:57)
at org.testng.ITestObjectFactory.newInstance(ITestObjectFactory.java:10)
at org.testng.TestNG.setListenerClasses(TestNG.java:684)
at org.testng.TestNG.configure(TestNG.java:1549)
at org.testng.TestNG.privateMain(TestNG.java:1431)
at org.testng.TestNG.main(TestNG.java:1404)
This is there the VerboseReporter is referenced in the build-impl.xml
Activity
matty-r commentedon Nov 22, 2023
I've been able to reproduce this on two separate machines.
All libraries are in the classpath:
Error message:
This is there the VerboseReporter is referenced in the build-impl.xml
bdrx312 commentedon Dec 6, 2024
I have also run into this error when trying to use testng 7.10.2 and testng-ant 1.0.0. Is is there any solution or work around for this?