7

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?

Lernkurve
  • 20,203
  • 28
  • 86
  • 118
TerenceJackson
  • 1,776
  • 15
  • 24

4 Answers4

6

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

Community
  • 1
  • 1
Paul Webster
  • 10,614
  • 1
  • 25
  • 32
2

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

kostja
  • 60,521
  • 48
  • 179
  • 224
  • @TerenceJackson you're welcome, BTW I seem to have missed the unit test part of your question. Testing the UI with SWTBot would automatically result in an integration test. It tests if certain UI input produces certain UI output, so a test could fail for more reasons than a missing button. The rest of your RCP application can be unit-tested with plain old JUnit. – kostja Apr 28 '11 at 16:23
1

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

Tonny Madsen
  • 12,628
  • 4
  • 31
  • 70
1

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

Slavus
  • 1,168
  • 12
  • 20