|
|
Re: Manage SWTBot and JUnit tests [message #515106 is a reply to message #515008] |
Wed, 17 February 2010 17:48 |
|
Hello,
I don't think that what you are trying to do is possible. Indeed your JUnit test probably require to run on a UIThread, whereas SWTBot test cannot be run from a UIThread, so that they probably cannot be launched by the same application.
Have you correctly set the @RunWith annotation on your SWTBot test class?
David CHAUTARD a écrit :
> Hello,
>
> I create a new package, in my test plugin, wich contains SWTBot tests.
> And when I run tests on my plugin with SWTBot, I have some problem
> "WidgetNotFoundException". While when I run my SWTBot TestSuite I have
> no problem.
>
> I don't know how to structure my plugin test for SWTBot tests and JUnit
> tests, and how to launch them. I think used Ant, but I don't know if it
> is the solution.
>
> David
--
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
|
Re: Manage SWTBot and JUnit tests [message #515349 is a reply to message #515223] |
Thu, 18 February 2010 13:58 |
|
> I add the @RunWith annotation in my SWTBot class, with
> @RunWith(SWTBotJunit4ClassRunner.class) and annotation for methods. But
> I always have the problem of "WidgetNotFoundException".
Does your test find the widget when running it manually from Eclipse?
> What is the launcher to use, JUnit or SWTBot?
I think SWTBot launcher is able to start "standard" JUnit tests too, but the contrary probably fails. Then I suggest you try with SWTBot JUnit launcher.
> Do you have an idea for my problem?
Sorry I don't have any idea. We previewed some time dedicated to writing a SWTBot test campaign soon. If we find any piece of answer, we will for sure tell you!
Meanwhile, good luck!
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
Powered by
FUDForum. Page generated in 0.03201 seconds