IInvokedMethodListener not being passed to TestRunner using RemoteTestNG

6 views
Skip to first unread message

bpedman

unread,
Oct 15, 2009, 5:41:34 PM10/15/09
to testng-dev
So, I am using TestNG with Eclipse. I wrote my own
InvokedMethodListener but it is not being picked up...I have tracked
down the reason. It properly picks up the listener during
configuration and builds a SuiteRunner with it. However, when
RemoteTestNG creates a new TestRunner it does not pass on the method
listeners.

I think that line 108 (I think) in RemoteTestNG when it is creating
the TestRunner needs to call the constructor with the list of invoked
method listeners rather than just doing new TestRunner(suite, xmlTest,
false);

Either that or it needs to go through and add all the listeners
afterward like it does with the default listeners.

Here is a stack trace if you want to follow what I am talking about
(the line numbers might be different in RemoteTestNG because I made
some modifications to try and track down the problem):
Thread [main] (Suspended (breakpoint at line 184 in TestRunner))
TestRunner.init(ISuite, XmlTest, String, IAnnotationFinder, boolean,
List<IInvokedMethodListener>) line: 184
TestRunner.<init>(ISuite, XmlTest, boolean) line: 155
RemoteTestNG$1.newTestRunner(ISuite, XmlTest) line: 108
RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(ISuite,
XmlTest) line: 160
SuiteRunner$ProxyTestRunnerFactory.newTestRunner(ISuite, XmlTest)
line: 529
SuiteRunner.privateRun() line: 250
SuiteRunner.run() line: 204
RemoteTestNG(TestNG).createAndRunSuiteRunners(XmlSuite) line: 912
RemoteTestNG(TestNG).runSuitesLocally() line: 876
RemoteTestNG(TestNG).run() line: 784
RemoteTestNG.run() line: 79
RemoteTestNG.main(String[]) line: 130

-Brandon
Reply all
Reply to author
Forward
0 new messages