Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » SWT_AWT bridge(problems testing RCP applications that integrate Swing components)
SWT_AWT bridge [message #755320] Tue, 08 November 2011 06:16 Go to next message
Greg B is currently offline Greg B
Messages: 1
Registered: November 2011
Junior Member
Our RCP application has Swing embedded within some SWT views using the SWT_AWT bridge.

Jubula currently appears to have difficulties interacting with any of the embedded Swing components, a couple of examples given below:


  1. The Observation Mode tool does not appear to register any events within the Swing components. You can click and manipulate the Swing controls and the Observation Mode collects nothing.
  2. The Object Mapping Mode tool does not appear to be able to collect any of the Swing components. You can only seem to collect the SWT container that contains the SWT_AWT bridge.
  3. I tried using unbound_modules_concrete[5.2]/Actions (basic)/Click/ub_grc_clickInComponent[NUMBER_OF_CLICKS] to send mouse clicks to an embedded Swing component, but during execution this gave rise to an Action Error "Timeout received before confirming the posted event".


I have had success using unbound_modules_concrete[5.2]/Actions (basic)/Click/ub_app_clickInActiveWindow[NUMBER_OF_CLICKS; MOUSE_BUTTON; X_POSITION; X_UNITS; Y_POSITION; Y_UNITS] however I would only want to employ that level of interaction as a last resort!

I'm not at all surprised the SWT_AWT bridge causes such problems. Does anyone else have any experience of these issues or suggestions for workarounds?

The Swing content of the SWT_AWT bridge is essentially a Java Applet.
One workaround I'm considering is to add a main() to each embedded Swing container with a mechanism for populating the data model via command-line arguments. These components can then be launched and tested as individual Swing AUTs.

Suggestions? Comments?

Re: SWT_AWT bridge [message #755493 is a reply to message #755320] Tue, 08 November 2011 16:22 Go to previous message
Oliver Goetz is currently offline Oliver Goetz
Messages: 96
Registered: May 2011
Member
Hi Greg,

you are right, it is the SWT-AWT-Bridge that is causing the problems you are experiencing since the bridge is not supported by Jubula.

Quote:
The Swing content of the SWT_AWT bridge is essentially a Java Applet.
One workaround I'm considering is to add a main() to each embedded Swing container with a mechanism for populating the data model via command-line arguments. These components can then be launched and tested as individual Swing AUTs.

This seems to be a possible workaround. To do so you can use Test Jobs. For further information check this link: http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node146.html
Regards
Oliver
Previous Topic:Using H2 Database
Next Topic:ComponentNotFoundException
Goto Forum:
  


Current Time: Thu Oct 30 19:04:29 GMT 2014

Powered by FUDForum. Page generated in 0.02064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software