This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 261302 - Mylyn UI tests should be able to make use of SWTBot
Summary: Mylyn UI tests should be able to make use of SWTBot
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Mylyn Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 262947
Blocks: 261369
  Show dependency tree
 
Reported: 2009-01-15 23:06 EST by David Green CLA
Modified: 2009-08-20 02:08 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2009-01-15 23:06:52 EST
"SWTBot":http://www.eclipse.org/swtbot is a great way to test the UI.  It's now part of Eclipse.org, which makes me think that we should consider using it.  I have experience with SWTBot and have found that it adds huge value to UI tests.

While the SWTBot build is still somewhat immature, when it's easy to consume let's start using it.

For an interesting read on SWTBot take a look at this article: "Eclipse GUI Testing Is Viable With SWTBot":http://greensopinion.blogspot.com/2008/09/eclipse-gui-testing-is-viable-with.html
Comment 1 Steffen Pingel CLA 2009-01-15 23:25:09 EST
That sounds great! I personally don't have any experience with SWTBot. David, would you be willing to contribute an examplatory UI test?
Comment 2 David Green CLA 2009-01-16 00:03:31 EST
(In reply to comment #1)
> That sounds great! I personally don't have any experience with SWTBot. David,
> would you be willing to contribute an examplatory UI test?

Of course!  As soon as we can link in the SWTBot binaries, I can put together some tests that demonstrate typical test scenarios, such as clicking menus, opening editors, exercising wizards, etc.

How does Mylyn normally consume 3rd party plug-ins, like Ant for example?
Comment 3 Steffen Pingel CLA 2009-01-16 00:23:34 EST
Ant is provided by the SDK. Other 3rd party bundles are included from the Orbit cvs. Is SWTBot available from an update site or from source?
Comment 4 David Green CLA 2009-01-16 01:04:43 EST
(In reply to comment #3)
> Ant is provided by the SDK. Other 3rd party bundles are included from the Orbit
> cvs. Is SWTBot available from an update site or from source?

Currently SWTBot is available from source, however they're still waiting for at least one dependency to make it into Orbit.
Comment 5 Ketan Padegaonkar CLA 2009-01-16 03:19:42 EST
I'd be willing to contribute some tests and some basic structure for an initial framework that Mylyn can consume.

In case Mylyn wishes to use SWTBot, I'd recommend that you start getting IP approval, since you'll be depending on hamcrest for writing SWTBot tests.

Some links that may help:
http://dev.eclipse.org/ipzilla/show_bug.cgi?id=2860 and https://dev.eclipse.org/ipzilla/show_bug.cgi?id=2907
Comment 6 David Green CLA 2009-01-16 12:10:06 EST
(In reply to comment #5)
> I'd be willing to contribute some tests and some basic structure for an initial
> framework that Mylyn can consume.

Ketan, that's fabulous!  Perhaps Mylyn could be an exemplar for other Eclipse.org projects in adopting SWTBot.

Looks like there may be some dependency issues with JUnit4 and hamcrest (bug 254608).  Will this be a problem for us if we're consuming SWTBot and hamcrest using JUnit 3.x?
Comment 7 Ketan Padegaonkar CLA 2009-01-16 12:48:22 EST
(In reply to comment #6)
> Ketan, that's fabulous!  Perhaps Mylyn could be an exemplar for other
> Eclipse.org projects in adopting SWTBot.

That's good to hear.

> Looks like there may be some dependency issues with JUnit4 and hamcrest (bug
> 254608).  Will this be a problem for us if we're consuming SWTBot and hamcrest
> using JUnit 3.x?

It would not be a problem with either junit 3.8.x or 4.x. Part of hamcrest (v.1.1) is packaged in the upstream JUnit jar available from junit.org. This was made into a the JUnit bundle, the bundle exports the hamcrest packages as version 4.5, the same as the junit version.

It should not be a problem as long as you're depending on a hamcrest bundle (v 1.1), and not depending on a particular package, since there may be no guarantee about what hamcrest version you get.

Also you'll need to stick to junit 3.8.x if you plan on running the tests as part of your build, since the eclipse-test-framework has no support for junit4 (bug 153429).
Comment 8 Steffen Pingel CLA 2009-01-16 16:00:43 EST
Thanks Ketan. I have added myself to the CQs. Once those are approved we can request reuse for Mylyn.
Comment 9 Steffen Pingel CLA 2009-08-20 02:08:58 EDT
Mylyn is now using (but not distributing) SWTbot for UI tests.