Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Headless build thoughts
Headless build thoughts [message #510748] Thu, 28 January 2010 09:36
Mickael Istria is currently offline Mickael Istria
Messages: 738
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

I am trying to have my SWTBot tests automated during my build (that uses ant). I'd like to build in them the same feature as my standard plugin tests.
I noticed that SWTBot provides a org.eclipse.swtbot.ant.optional.junit3 bundle for unit tests, which seems to be exactly the same thing that the platform's org.eclipse.ant.optional.junit bundle.

From there and from conflicts between JUnit3 and JUnit4, I've been investigating around headless test automation and here are some questions and comments about things I found confusing:
* are actually org.eclipse.swtbot.ant.optional.junit3 and org.eclipse.ant.optional.junit the same?
* If yes, why don't you distribute the platform org.eclipse.ant.optional.junit bundle instead of org.eclipse.swtbot.ant.optional.junit3 in your test framework?
* Actually, my SWTBot tests are using JUnit4 whereas my PDE tests are using JUnit3. org.eclipse.ant.optional.junit and org.eclipse.swtbot.ant.optional.junit4 are not compatible. The only solution I found is to use the new bundle org.junit 4.8 from Orbit and to remove org.eclipse.swtbot.ant.optional.junit4. However, this new bundle (org.junit) conflicts with the current release of JDT, but this is already fixed and should be available with next M-build. Did you already think about using this new bundle + org.eclipse.ant.optional.junit instead of org.eclipse.swtbot.ant.optional.* in the future?
* Do you plan to include test framework (also) in your update-site? IMHO, installing it with command-line or UI from an update-site is much easier than using a zip.

I am trying to update wiki documentation as I progress on these topics. I'll be glad to help you as much as I can!

Regards,
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: Headless build thoughts [message #510777 is a reply to message #510748] Thu, 28 January 2010 05:32 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 1/28/10 6:36 AM, Mickael Istria wrote:
> Hi,
>
> I am trying to have my SWTBot tests automated during my build (that uses
> ant). I'd like to build in them the same feature as my standard plugin
> tests.
> I noticed that SWTBot provides a org.eclipse.swtbot.ant.optional.junit3
> bundle for unit tests, which seems to be exactly the same thing that the
> platform's org.eclipse.ant.optional.junit bundle.
>
> From there and from conflicts between JUnit3 and JUnit4, I've been
> investigating around headless test automation and here are some
> questions and comments about things I found confusing:
> * are actually org.eclipse.swtbot.ant.optional.junit3 and
> org.eclipse.ant.optional.junit the same?

Yes!

> * If yes, why don't you distribute the platform
> org.eclipse.ant.optional.junit bundle instead of
> org.eclipse.swtbot.ant.optional.junit3 in your test framework?

I've done this for internal consistency and so that SWTBot is self
contained. You may use either of them. I'm unsure of what would happen
if you leave both of them in your target.

> * Actually, my SWTBot tests are using JUnit4 whereas my PDE tests are
> using JUnit3. org.eclipse.ant.optional.junit and
> org.eclipse.swtbot.ant.optional.junit4 are not compatible. The only
> solution I found is to use the new bundle org.junit 4.8 from Orbit and
> to remove org.eclipse.swtbot.ant.optional.junit4. However, this new
> bundle (org.junit) conflicts with the current release of JDT, but this
> is already fixed and should be available with next M-build. Did you
> already think about using this new bundle +
> org.eclipse.ant.optional.junit instead of
> org.eclipse.swtbot.ant.optional.* in the future?

I'm aware that the next M build will use a system where junit3/junit4
tests can co-exist. SWTBot will still need to be backward-compatible for
previous releases of eclipse. I'll continue to release the two fragments
for eclipse 3.4/3.5 users. Eclipse 3.6 users may not need to download this.

> * Do you plan to include test framework (also) in your update-site?
> IMHO, installing it with command-line or UI from an update-site is much
> easier than using a zip.

It certainly makes sense! Please open a bug and I'll look into it :)

> I am trying to update wiki documentation as I progress on these topics.
> I'll be glad to help you as much as I can!

That's great! Feel free to ask questions if that helps.

-- Ketan
Previous Topic:Where can I find headless test bundles?
Next Topic:EclipseSpy in a RCP application
Goto Forum:
  


Current Time: Sat Aug 02 02:47:59 EDT 2014

Powered by FUDForum. Page generated in 0.03662 seconds