[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: How to do GUI tests
|
Jochen schrieb:
Hi all,
I'm trying to figure out if there is a way to do JUnit tests of the user
interface part of my plug-in. Since some of the stuff that happens with
the various GUI contributions (in particular actions, commands, content
type filters, etc.) is not 100% trivial, I'd like to have some JUnit
tests, that simulate the user behavior, which would trigger execution of
the corresponding code.
I tried to find some tests for the org.eclipse.*.ui plugins, but none of
the things I could find were doing tests like that. So, I tried to
programmatically select the elements in the navigator view, for example,
and was hoping that that would trigger the corresponding
"selectionChanged" events. But I didn't even get that far, because
somehow I cannot even initialize the GUI properly, it seems to remain
stuck at the "Welcome" screen.
This won't work in SWT. You need to post those events using Display#post().
I'm a bit lost and would appreciate any pointers to what to look at.
Thanks a lot
You can
take:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.tests/
there a the main platform-UI tests. When testing RCP you'll need to use
a Launcher.
Tom
--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------