Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » org.eclipse.jdt.junit.ITestRunListener not called in Run As Junit Plugin Test
org.eclipse.jdt.junit.ITestRunListener not called in Run As Junit Plugin Test [message #304844] Thu, 15 June 2006 16:58 Go to next message
Eclipse UserFriend
I have a plugin that implements ITestRunListener. The plugin does
collect reports and updates report files when I run simple JUnit test cases.

I have a second project that runs JUnit test cases for other plugins. I
use the Run As -> Junit Plug-in Test menu to launch the test. When I
run the tests using the JUnit Plug-in Test method, my ITestRunListener
plugin does not get invoked. The plugin itself is loaded (I have traces
in start and stop methods of the plugin), but the ITestRunListener
methods are never invoked.

Is this a bug, or is there additional configuration I need to get my
listener registered in the eclipse workbench that is launched by the run
menu?

Michael Giroux
Re: org.eclipse.jdt.junit.ITestRunListener not called in Run As Junit Plugin Test [message #304859 is a reply to message #304844] Fri, 16 June 2006 08:19 Go to previous messageGo to next message
Eclipse UserFriend
> I have added a few more traces to my ITestRunListener plugin. I can see
> that the constructor for the plugin lifecycle class is invoked, but the
> constructor for the ITestRunListener class is never invoked.
>
> As I said in previous post, the ITestRunListener is properly registered in
> the main eclipse workbench. Any JUnit tests executed in the main workbench
> cause notifications to be sent through my listener. It is only when the
> workbench is started using the Run As ->JUnit Plug-in Test launch method
> that the listener is not being invoked.
>
> I could not find any documentation that describes this environment as a
> special case. I hope one of the JDT JUnit plugin developers is watching
> this and can offer some advice.
>
> Thanks
> Michael Giroux
Re: org.eclipse.jdt.junit.ITestRunListener not called in Run As Junit Plugin Test [message #304984 is a reply to message #304844] Tue, 20 June 2006 12:27 Go to previous message
Eclipse UserFriend
Mystery solved. It turns out that the listener is being loaded an
invoked in the eclipse instance that initiated the launch. As a result,
the test reports generated by my listener are being written to the
primary workspace.

My expectation was that the listener was instantiated in the launched
workspace, and that the reports would be in the associated workspace.

Michael
Previous Topic:Re: Calltips
Next Topic:How would I generate javadoc using Eclipse from the command line not from the workspace?
Goto Forum:
  


Current Time: Sun Nov 09 22:22:29 EST 2025

Powered by FUDForum. Page generated in 0.03952 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top