Open RiJo opened 5 months ago
Root cause of this issue was because of this PR https://github.com/testng-team/testng/pull/3060
@RiJo - Until this issue is fixed, can you please try adding
<properties>
<property>
<name>listenerfactory</name>
<value>your.fully.qualified.classname.goes.here</value>
</property>
</properties>
This should ensure that your listener factory gets invoked when you run your tests using maven.
For running tests via intellij you can set this configurmation via the Test runner params
Thanks for the quick response!
It is not possible for me to add custom parameters and/or properties as the TestNG tests are part of a larger system. I will stay on version 7.8.0 until the issue has been addressed. Thanks!
TestNG Version
7.10.2
Worked as expected in 7.8.0
Expected behavior
When a ITestNGListenerFactory implementation is registered via
@Listeners
annotation, ITestNGListenerFactory#createListener should be invoked before any@Test
annotated methods are invoked.Actual behavior
ITestNGListenerFactory#createListener is never invoked.
Is the issue reproducible on runner?
Test case sample
Factory is part of test class:
Independent factory
@Listeners(CustomFactory.class) public class FactoryListenerTest {
}