Test Framework for Eclipse RCP Application
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
精彩评论