Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot Jenkins Integration for SWT Standalone App
SWTBot Jenkins Integration for SWT Standalone App [message #741733] Wed, 19 October 2011 21:06 Go to next message
Steve  is currently offline Steve Friend
Messages: 2
Registered: October 2011
Junior Member
Hi, I wrote an application that is NOT a plug-in. It uses SWT and runs outside of eclipse as a standalone application. I downloaded SWTBot, wrote a SWTBot test case that sure-enough runs just fine inside of eclipse when I right-click on it and select "Run as...JUnit test" (so far, so good). Now I want to be able to run it as part of our build process, but when I tried to follow the documentation on running it in headless mode using ant, it complains that I have not specified the name of a plug-in. My SWT app is NOT a plugin. So, I encapsulated my test cases inside of a plug-in according to the SWTBot 5-min video, putting my SWT app (the one I want to test that's in another eclipse project) on my SWTBot plug-in's build path...and again..when I run it inside eclipse it runs just fine, BUT when I go to export the plug-in, it says (understandably) that it cannot resolve the classes from my standalone app (the one in the other eclipse project, the one i want to test with SWTBot). My next attempt was going to be to include the standalone app's jar file in the SWTBot plugin, export the plug-in, and then use the headless ant target (with my SWTBot test plugin name). But I'm not even sure that will work. Isn't there a better way for me to do this? Re-including the jar file in the plugin and re-exporting the plugin just so I can use the headless ant target each time we have a build seems ridicuously complicated and impractible. How am I supposed to integrate SWTBot with a standalone SWT app that's not a plugin or RCP(?) for inclusion in Jenkins?
Re: SWTBot Jenkins Integration for SWT Standalone App [message #745868 is a reply to message #741733] Sun, 23 October 2011 03:34 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
The SWTBot instructions to run as a headless ant script are meant for
plugin based tests. Since you're using plain old SWT+SWTBot you'd need
something similar to the script that SWTBot uses (http://goo.gl/RD4JT)

You basically need to write another java project(not plugin project) in
your workspace that contains your test sources and dependencies.

You'd of-course need some
stuff(http://ant.apache.org/manual/Tasks/javac.html) to compile your
tests before you run the tests.

-- Ketan

On 10/20/11 2:36 AM, Steve wrote:
> Hi, I wrote an application that is NOT a plug-in. It uses SWT and runs
> outside of eclipse as a standalone application. I downloaded SWTBot,
> wrote a SWTBot test case that sure-enough runs just fine inside of
> eclipse when I right-click on it and select "Run as...JUnit test" (so
> far, so good). Now I want to be able to run it as part of our build
> process, but when I tried to follow the documentation on running it in
> headless mode using ant, it complains that I have not specified the name
> of a plug-in. My SWT app is NOT a plugin. So, I encapsulated my test
> cases inside of a plug-in according to the SWTBot 5-min video, putting
> my SWT app (the one I want to test that's in another eclipse project) on
> my SWTBot plug-in's build path...and again..when I run it inside eclipse
> it runs just fine, BUT when I go to export the plug-in, it says
> (understandably) that it cannot resolve the classes from my standalone
> app (the one in the other eclipse project, the one i want to test with
> SWTBot). My next attempt was going to be to include the standalone app's
> jar file in the SWTBot plugin, export the plug-in, and then use the
> headless ant target (with my SWTBot test plugin name). But I'm not even
> sure that will work. Isn't there a better way for me to do this?
> Re-including the jar file in the plugin and re-exporting the plugin just
> so I can use the headless ant target each time we have a build seems
> ridicuously complicated and impractible. How am I supposed to integrate
> SWTBot with a standalone SWT app that's not a plugin or RCP(?) for
> inclusion in Jenkins?
Re: SWTBot Jenkins Integration for SWT Standalone App [message #753795 is a reply to message #745868] Fri, 28 October 2011 19:27 Go to previous message
Steve  is currently offline Steve Friend
Messages: 2
Registered: October 2011
Junior Member
Thanks Ketan for your help! Things seem to be working fine. Smile
Previous Topic:multiple selections from tree + context menu
Next Topic:how to capture the coolitem click on editor
Goto Forum:
  


Current Time: Fri Apr 26 11:07:02 GMT 2024

Powered by FUDForum. Page generated in 0.03253 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top