Eclipse RCP applications mostly are cross-platform by its nature. So should be UI tests. Tests created on Windows desktop should replay well on Linux Continuous Integration server. It is important to execute your test base on different operating systems to ensure application quality on all platforms.


On Mac OS X, most shortcuts differ from Windows and Linux in the way that they use Command instead of Control. So even a trivial file save operation might be non-portable. To workaround this, Q7 records all shortcuts in terms of abstract SWT modifiers, so this script works on all supported operating systems:

    get-editor "" | get-text-viewer | key-type "M1+s"


Buttons without text can be identified by tooltip text. However, if tooltip contains keyboard shortcut, then its text becomes platform-dependent:

Q7 Runtime replaces default shortcut formatter, so that text becomes the same on all platforms:

Main Menu

While ensuring test portability, we pay attention even to small details. Main menu on Mac OS X differs from Windows and Linux – menu items for preferences and about dialogs are not in Window -> Preferences and Help -> About:

To make tests interacting with these menu items portable, we created two special commands – get-preferences-menu and get-about-menu:

get-about-menu | click
get-preferences-menu | click

Native dialogs

Q7 supports all platform native dialogs in platform-independent fashion. Instead of dealing with native UIs, Q7 virtualise native dialogs during test execution by providing data, which has been captured during test recoding.

Good for Operating Systems, what about Web (RAP)?

Q7 tests not only executes well on any supported operating systems. For single sourced RCP and RAP applications you can run the same test against your RCP and RAP deployments without any changes. And yes, all Q7 features work for RAP, just run your RAP application and start recording your tests.