Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » JUnits, GUI Tests
JUnits, GUI Tests [message #48922] Mon, 02 March 2009 23:56 Go to next message
Eclipse UserFriend
Hi,

I am creating an eclipse plugin.
I need to also do this using Test Driven Development.

A large part of my plugin code uses eclipse work bench elements -
IContaner, IProject, IJavaProject, IFolder and so on.

1) How do I structure my code so that I can unit test code thats involving
these elements without doing GUI testing?
2) How do I write GUI tests?

Raster
Re: JUnits, GUI Tests [message #49740 is a reply to message #48922] Sun, 08 March 2009 14:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Raster,

Sounds like the best solution would be to make two seperate plug-ins --
one which is for the model and one for the view (myplugin.model.** and
myplugin.ui.**, I suppose). Then, when you need to do any unit testing,
you can just use the model plug-in. Not sure about how to do GUI tests.

Cheers,
Chris


On 03/03/2009 4:56, Raster wrote:
> Hi,
>
> I am creating an eclipse plugin.
> I need to also do this using Test Driven Development.
>
> A large part of my plugin code uses eclipse work bench elements - IContaner,
IProject, IJavaProject, IFolder and so on.
>
> 1) How do I structure my code so that I can unit test code thats involving
these elements without doing GUI testing?
> 2) How do I write GUI tests?
>
> Raster
>
Re: JUnits, GUI Tests [message #49770 is a reply to message #49740] Sun, 08 March 2009 23:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Chris Dennett wrote:
> Hi Raster,
>
> Sounds like the best solution would be to make two seperate plug-ins --
> one which is for the model and one for the view (myplugin.model.** and
> myplugin.ui.**, I suppose). Then, when you need to do any unit testing,
> you can just use the model plug-in. Not sure about how to do GUI tests.

SWTBot to the rescue for GUI tests. It is designed to test the gui.

http://www.eclipse.org/swtbot

Dave
Re: JUnits, GUI Tests [message #49800 is a reply to message #49740] Mon, 09 March 2009 00:59 Go to previous message
Eclipse UserFriend
Thanks.
Lets say I do seperate the code into view and non-view parts how do I
ensure that the JUNIT test cases can run as part of the workbench in so
that they are able to access objects like IProject instances without me
needing to mock these objects.
Thanks again if you can reply to this too.
R
Re: JUnits, GUI Tests [message #592958 is a reply to message #48922] Sun, 08 March 2009 14:12 Go to previous message
Eclipse UserFriend
Hi Raster,

Sounds like the best solution would be to make two seperate plug-ins --
one which is for the model and one for the view (myplugin.model.** and
myplugin.ui.**, I suppose). Then, when you need to do any unit testing,
you can just use the model plug-in. Not sure about how to do GUI tests.

Cheers,
Chris


On 03/03/2009 4:56, Raster wrote:
> Hi,
>
> I am creating an eclipse plugin.
> I need to also do this using Test Driven Development.
>
> A large part of my plugin code uses eclipse work bench elements - IContaner,
IProject, IJavaProject, IFolder and so on.
>
> 1) How do I structure my code so that I can unit test code thats involving
these elements without doing GUI testing?
> 2) How do I write GUI tests?
>
> Raster
>
Re: JUnits, GUI Tests [message #592972 is a reply to message #49740] Sun, 08 March 2009 23:41 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Chris Dennett wrote:
> Hi Raster,
>
> Sounds like the best solution would be to make two seperate plug-ins --
> one which is for the model and one for the view (myplugin.model.** and
> myplugin.ui.**, I suppose). Then, when you need to do any unit testing,
> you can just use the model plug-in. Not sure about how to do GUI tests.

SWTBot to the rescue for GUI tests. It is designed to test the gui.

http://www.eclipse.org/swtbot

Dave
Re: JUnits, GUI Tests [message #592976 is a reply to message #49740] Mon, 09 March 2009 00:59 Go to previous message
Eclipse UserFriend
Thanks.
Lets say I do seperate the code into view and non-view parts how do I
ensure that the JUNIT test cases can run as part of the workbench in so
that they are able to access objects like IProject instances without me
needing to mock these objects.
Thanks again if you can reply to this too.
R
Previous Topic:How do I get the source code?
Next Topic:Eclipse Compare Framework
Goto Forum:
  


Current Time: Fri May 02 08:03:40 EDT 2025

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

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

Back to the top