Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Can SWTBot support pure SWT application(I'm going to test an application which was created using SWT rather than Eclipse. I wander if I can use SWTBot for the test.)
Can SWTBot support pure SWT application [message #869764] Fri, 04 May 2012 05:01 Go to next message
kyle yu is currently offline kyle yu
Messages: 1
Registered: May 2012
Junior Member
Dear all,

I'm going to test an application which was created using SWT rather than Eclipse. I wander if I can use SWTBot for the test.
I searched SWTBot user guide and sample code. All I get were for Eclipse based application.
Anyone can help me? Thanks in advance!
Re: Can SWTBot support pure SWT application [message #887212 is a reply to message #869764] Sat, 16 June 2012 03:57 Go to previous messageGo to next message
Timur Achmetow is currently offline Timur Achmetow
Messages: 38
Registered: April 2012
Member
Yes! You have to install the feature "SWTBot SWT Features" which includes SWTBot for SWT Testing.
Re: Can SWTBot support pure SWT application [message #898955 is a reply to message #869764] Sun, 29 July 2012 06:17 Go to previous messageGo to next message
Wolfgang Martin is currently offline Wolfgang Martin
Messages: 1
Registered: July 2012
Junior Member
I have a similar situation: I want to test a desktop application that uses the SWT library but none of the other eclipse features. I want to be completely independent from eclipse. Let's assume that I'm developing in Netbeans.

So:
* the application under test uses the SWT jar, but not RCP, the eclipse workbench
* I can't install eclipse features because I'm not using eclipse, at all.
* I want to run the tests independently from the IDE.

Also: I can't use a special TestRunner because I'm already using another one to support another library I'm using. So, @RunWith is not possible for me.
Re: Can SWTBot support pure SWT application [message #899341 is a reply to message #898955] Tue, 31 July 2012 09:59 Go to previous message
Mickael Istria is currently offline Mickael Istria
Messages: 737
Registered: July 2009
Location: Grenoble, France
Senior Member
On 07/29/2012 12:17 PM, Wolfgang Martin wrote:
> So:
> * the application under test uses the SWT jar, but not RCP, the eclipse
> workbench

The SWT part of SWTBot is independant from workbench and RCP. You can
use it in any SWT application.

> * I can't install eclipse features because I'm not using eclipse, at all.

Can you downalod the following jars and put them into your application
to use SWTBot:
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.eclipse.swtbot.swt.finder_2.0.5.20111003_1754-3676ac8-dev-e36.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.apache.log4j_1.2.13.v200903072027.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.eclipse.swtbot.junit4_x_2.0.5.20111003_1754-3676ac8-dev-e36.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.hamcrest_1.1.0.v20090501071000.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.hamcrest.library_1.1.0.v20090501071000.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.hamcrest.text_1.1.0.v20090501071000.jar
*
http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/plugins/org.hamcrest.integration_1.1.0.v20090501071000.jar

Feel free to open an enhancement request if you'd like to see a more
convenient packaging appear one day.

> * I want to run the tests independently from the IDE.

SWTBot is just an API on top of SWT, it's independant of JUnit or the
IDE you use. So no problem here.

> Also: I can't use a special TestRunner because I'm already using another
> one to support another library I'm using. So, @RunWith is not possible
> for me.

Using SWTBot TestRunner is not necessary, you can use a plain JUnit test.


--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:SWTBot/Contributing
Next Topic:@RunWith(SWTBotJunit4ClassRunner.class) won't catch screenshots on failure
Goto Forum:
  


Current Time: Mon Jul 28 18:43:29 EDT 2014

Powered by FUDForum. Page generated in 0.02029 seconds