JUnits, GUI Tests [message #48922] |
Mon, 02 March 2009 23:56  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #49800 is a reply to message #49740] |
Mon, 09 March 2009 00:59  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03555 seconds