testng-team / testng-googlecode

DEPRECATED: Automatically exported from code.google.com/p/testng
0 stars 0 forks source link

RemoteTestNG does not run registered IInvokedMethodListeners #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup a IInvokedMethodListener class that just prints out something on
the before call
2. Run a TestNG test using the RemoteTestNG class providing the
IInvokedMethodListener as a listener via the -listener command line parameter
Ex: java org.testng.remote.RemoteTestNG -listener MyMethodListenerClass

What is the expected output? What do you see instead?
For each test method the listener methods should be called, instead none of
the methods are called.

What version of the product are you using? On what operating system?
5.9 on Windows XP

Please provide any additional information below.

A proposed fix is the following:

In org.testng.TestNG change:

  private List<IInvokedMethodListener> m_invokedMethodListeners
    = new ArrayList<IInvokedMethodListener>();

to 

  protected List<IInvokedMethodListener> m_invokedMethodListeners
    = new ArrayList<IInvokedMethodListener>();

And in org.testng.remote.RemoteTestNG change the newTestRunner method so
that the TestRunner is constructed with the list of
IInvokedMethodListeners, such as:

 TestRunner runner =
   new TestRunner(suite, xmlTest, suite.getOutputDirectory(),
suite.getAnnotationFinder(xmlTest.getAnnotations()),
              false /*skipFailedInvocationCounts */, m_invokedMethodListeners);

Original issue reported on code.google.com by eno...@gmail.com on 29 Apr 2009 at 10:51

GoogleCodeExporter commented 9 years ago
Forgot to mention this was on Java 1.5

Original comment by eno...@gmail.com on 29 Apr 2009 at 10:53