rcp and junit test [message #514229] |
Fri, 12 February 2010 22:19 |
Eclipse User |
|
|
|
Originally posted by: nospam.somewhere.org
How can a implement a junit test for a rcp application?
My application uses eclipse/rcp and consists of several rcp plugin
projects. Some plugins are gui and others are non-gui. A single plugin
may reference other plugins.
My first step is to implement the junit in a rcp plugin project.
Now, google search found some interesting tools: tptp agr and swtbot.
Some comercial project are found, too. But my interest in costfree tools.
questions:
1. The tptp automated gui recorder sounds good, but the documentation is
very rare. The docs i found seems to be for an older version of eclipse.
I am not sure how to control this tool :-(
Any idea?
2. SWTBOT, the docs seem to be more complete but i havent used it. Do
you think it is a worthful alternative to tptp?
3. Are there other free testing tools available?
How do you implement junit tests for rcp based applications?
regards,
markus
|
|
|
|
Re: rcp and junit test [message #514416 is a reply to message #514229] |
Mon, 15 February 2010 09:27 |
|
Ceeper a écrit :
> 2. SWTBOT, the docs seem to be more complete but i havent used it. Do
> you think it is a worthful alternative to tptp?
I am a big fan of SWTBot, and I think it is worth trying. It makes writing user-level tests very easy. Moreover, it can be integrated in headless unit tests suite as easily as simple JUnit tests.
> How do you implement junit tests for rcp based applications?
Simply write some JUnit plugins tests (ie JUnit tests that have access to Eclipse runtime, UI and workbench classess). When writing them you can launch them from Eclipse as you would run simple JUnit tests.
If you want to test them in your built RCP application, you'll have to:
* Provide test, and dependency and Eclipse test framework in your application (for example as an additional feature).
* Run your test headless from inside of your application using the org.eclipse.test.uitestapplication (see http://www.eclipse.org/articles/Article-PDE-Automation/autom ation.html)
The difficulty here is to provide right dependencies so that your test will start.
--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
|
|
|
Powered by
FUDForum. Page generated in 0.01482 seconds