Test Framework for Eclipse RCP Application - eclipse

I am new to Eclipse RCP and I'm looking for an open source framework to test my RCP application (especially the GUI). I want to run this tests as unit tests.
Can you suggest some good frameworks with which you made good experiences?

The eclipse platform builds come with an Junit Plug-in test framework that allows JUnit tests written as plugins to run in the context of an Eclipse or RCP app. The JUnit plugin tests could then use SWTBot as well as the standard platform API (open windows, show views, etc).
See http://www.eclipse.org/articles/Article-PDE-Automation/automation.html to get started.
See also Automating unit tests (junit) for Eclipse Plugin development

You may want to try SWTBot. It is made explicitly for the SWT UI. It is in incubation still but under active development.

I had a presentation on EclipseCon '11 about this subject: 10 Techniques to Test a Plug-in.

You coud try WindowTester Pro - this used to be a commercial product, but after Google bought it it open sourced it and now it it is free, it is good actually
http://code.google.com/javadevtools/wintester/html/index.html

Related

what tools use for GUI/functional testing of Eclipse RCP apps?

We are developing RCP Eclipse based application,currently for functional/GUI tests we use RCPTT tool although we are not fully satisfied with it.
What are the other options beside SwtBot for GUI testing (on multiplatform Linux/Windows)? Abby,TFTP,Jubula are discontinued or not maintained any more.
Since i cannot write a comment yet:
Jubula is still in development and maintainedgit repository. Bugs are fixed and new Features are implemented. The last release was from may 2017 but the next release is planned before eastern 2018.
The Jubula ITE(Integrated Testing Environment) can be used or the newer Java API in which you also could write tests with java.

Use Eclipse Classic to develop Eclipse RCP application

I've been using Eclipse Classic for developing applications in Java installing plugins as I need. Now I'm thinking to develop an application using Eclipse RCP UI. I've read some tutorials online but they suggest to use Eclipse for RCP/RAP developers.
I've looked at this Eclipse Packages Compare page but I haven't quite figured out why I can't use Eclipse Classic to develop Eclipse RCP applications.
What plugins do I have to install to use Eclipse Classic for Eclipse RCP application development?
There is very little (practical) difference between those two packages. Classic (AKA, Eclipse SDK) includes more source code for the Eclipse bundles themselves, such as JDT and PDE, which can actually be useful when developing your own plugins and RCP apps); RCP/RAP obviously includes RAP, which is critical if you need it but pointless if you don't. RCP also includes EGit (again, nice if you need it) and the XML Tools.
I often start with the SDK (Classic) package and add stuff as I need it. There has even been talk of dropping the RCP package altogether, although it still hangs around.
What plugins do I have to install to use Eclipse Classic for Eclipse RCP application development?
Trust me, you're much better off unziping Eclipse for RCP/RAP developers in a different directory, and using that to develop your RCP application.
You're lucky that adding Eclipse plug-ins to your Eclipse Classic hasn't destroyed your Java development environment.

JUnit plugin integration

Is there a way to integrate in an Eclipse RCP project the JUnit Window? I am planning on creating a test script runner and I want JUnit window to be in my application.
Sure, but not as you expect it. The JUnit view is contributed by org.eclipse.jdt.junit (which you can see by hitting Shift-Alt-F1 with that view being active). So you need to include that as a dependency in your plugin (or in your product definition, if you have one).
The bad news: I have not checked the dependencies for that plugin, and those dependencies will probably take most of the JDT into your application also, which is probably not desired.

Continuous integration & eclipse plugin development

I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would there be any plugins that makes that easier? Can those tests launch eclipse in headless mode or something on the CI server? Pointers would be much appreciated.
I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/, and it worked really well. We also use Hudson, and since Tycho is Maven-based, Hudson integration was trivial and worked simply by calling Maven, which Hudson supports out of the box.
As far as I know, Buckminster tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds.
maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/

RCP based on plugins or features?

I have an RCP application based on plugins because I started this app from a simple Mail example.
I am now wondering what is the difference between an RCP application based on features compare to one based on plugins ?
For information, my RCP will maybe require some advanced features such as headless build, or self update. May be this can impact on the choice of using plugins or features as basis?
Since features are just a collection of plugins (aka, a "packaging" process), you should be able to do in a PDE headless build what you can do with the PDE GUI.
The PDE build page does mention:
Building plug-ins, fragments or features consists of the 3 stages: fetch, generate scripts and build that are described bellow.
You could have some issue for modified plugin, but building features or a final product should work.
Very useful tutorial from ibm for memory leaks in rcp:
http://www.ibm.com/developerworks/library/j-rcp2/index.html