|Re: TestSuite execution problem [message #527420 is a reply to message #527217]
||Thu, 15 April 2010 08:35
| Urtzi Odriozola
Registered: March 2010
|Pascal G wrote on Wed, 14 April 2010 09:55|
|Urtzi Odriozola wrote:|
> I've got a little problem with SWTBot test execution when I wanna
> execute more than one test cases. For that purpose I use a test runner
> given by Ketan:
> http://github.com/ketan/swtbot/blob/master/org.eclipse.swtbo t.eclipse.finder.test/src/org/eclipse/swtbot/eclipse/finder/ AllTests.java
> The point is that I wanna run each TestCase in a clear enviroment
> (workbench) for not being in conflict each individual TestCase with the
> Anyone knows how to run all the TestCases but each one in a clean
> workbench environment?
> Thank in advance.
It depends on what you mean by clean workbench... for me, a clean
workbench is one with the proper perspective open and the example
project provided by my plugin open. It strongly depends on your test cases.
To achieve a "clean workbench", simply make sure that every test case
has a proper tearDown() (or @After annotated if you are using JUnit4)
that clean up the mess that the test case just made. Let's take an
example: you have a test case that create a new java project using the
new java project wizard. The tearDown() method should close the wizard
if it's still open (because an error happened and the test case did not
properly finish) and delete the created project. This way, you are back
to the same state you were at the beginning of your test.
Hope this helps.
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/
*Because performance matters.*
Ok, I understand. And yes, definitely you catch out my idea of "clean workbench".
I thought that there was a simpler way of clean up the mess of my TestCases. I think that doing like you said, you do much effort because you have to write a test 2 times (the second one backwards...).
For example, when I run my tests individually, each test starts in a fresh workbench even if they messed the configuration before. But if I run all my test like I explained above, this not happens.
Thank you for your contribution!
Powered by FUDForum
. Page generated in 0.02055 seconds