Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » JUnits, GUI Tests
JUnits, GUI Tests [message #48922] Tue, 03 March 2009 04:56 Go to next message
Raster R is currently offline Raster RFriend
Messages: 77
Registered: July 2009
Member
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 18:12 Go to previous messageGo to next message
Chris Dennett is currently offline Chris DennettFriend
Messages: 5
Registered: July 2009
Junior Member
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] Mon, 09 March 2009 03: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 04:59 Go to previous message
Raster R is currently offline Raster RFriend
Messages: 77
Registered: July 2009
Member
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 18:12 Go to previous message
Chris Dennett is currently offline Chris DennettFriend
Messages: 5
Registered: July 2009
Junior Member
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] Mon, 09 March 2009 03: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 04:59 Go to previous message
Raster R is currently offline Raster RFriend
Messages: 77
Registered: July 2009
Member
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 Apr 19 19:03:18 GMT 2024

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

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

Back to the top