Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Robot Exception: Window activation failed(Activation of the AUT fails with an Robot exception when using Xserver on Linux machine)
Robot Exception: Window activation failed [message #986789] Wed, 21 November 2012 16:05 Go to next message
Michael Zwick is currently offline Michael ZwickFriend
Messages: 5
Registered: February 2012
Junior Member
Hi,

I'd like to run my Jubula tests of a Swing application on the Linux build server in an virtual frame buffer Xvfb. For that I start the autagent and then the Jubula command line tool testexec. Starting the application and connecting to it seems to work fine, but activation of the AUT fails. The same works fine when using the ITE on my Windows client.
In ~/.jubula/logs/rc_swing.log a Robot Exception is reported (org.eclipse.jubula.rc.common.exception.RobotException: Window activation failed).

Any help or pointers to what might be going wrong are highly appreciated. Thanks,
Michael

Output on the console after starting testexec:
Wed Nov 21 16:47:08 CET 2012 AUT Agent: Connecting to "localhost:60000" ...
Wed Nov 21 16:47:09 CET 2012 AUT Agent: connection established.
Wed Nov 21 16:47:09 CET 2012 Database: Connecting as "jubula" to "jdbc:oracle:thin:@avalon.xxx.com:1521:JUBUDEV"...
Wed Nov 21 16:47:11 CET 2012 Database: Connection established.
Wed Nov 21 16:47:11 CET 2012 Database: Loading project "Analyzer" in version "1.0"...
Wed Nov 21 16:47:13 CET 2012 Database: Project loading completed.
Wed Nov 21 16:47:13 CET 2012 Project: Checking completeness
Wed Nov 21 16:47:13 CET 2012 Checking completeness of Test Suite "Analyzer Suite"...
Wed Nov 21 16:47:13 CET 2012 AUT: Starting AUT: Analyzer
AUT:SLF4J: Class path contains multiple SLF4J bindings.
AUT:SLF4J: Found binding in [jar:file:/nfs/homeserver/phylosopher/servers/test/jars/3rdParty.jar!/org/slf4j/impl/StaticLoggerBinder.class]
AUT:SLF4J: Found binding in [jar:file:/local0/phylosopher/test/Jubula/jubula_1.3.00071/server/plugins/ch.qos.logback.slf4j_1.0.0.v20120123-1500.jar!/org/slf4j/impl/StaticLoggerBinder.class]
AUT:SLF4J: See slf4j.org/codes.html#multiple_bindings for an explanation.
AUT:Version: 2.1.2
AUT:Linux (version 2.6.32.12-0.7-default for i386)
AUT:JRE 1.6.0_33 Java HotSpot(TM) Server VM 20.8-b03
AUT:Build: 2012-11-20 16:47 CET
AUT:Revision: 56542
AUT:Time: 2012-11-21 16:47:15 CET
AUT:
AUT:2012-11-21 16:47:15 CET [INFO ] Log Level set to DEBUG
AUT:2012-11-21 16:47:15 CET [INFO ] Signed Applet. All permissions granted.
AUT:2012-11-21 16:47:15 CET [INFO ] Successfully connected to database jdbc:oracle:thin:@xxx:1521:test
AUT:2012-11-21 16:47:17 CET [DEBUG] Executing statement: CacheableStatement: Get session parameter User Mode
...
Wed Nov 21 16:47:21 CET 2012 Start Test Suite: Analyzer Suite
Wed Nov 21 16:47:21 CET 2012 Executing Test Suite "Analyzer Suite"...
Wed Nov 21 16:47:21 CET 2012 Preparing execution of Test Suite "Analyzer Suite"...
Wed Nov 21 16:47:21 CET 2012 AUT: Connecting to "DNA_Analyzer_empty_patches"...
Wed Nov 21 16:47:22 CET 2012 AUT: Connection established.
Wed Nov 21 16:47:23 CET 2012 Resolving predefined Variables
Wed Nov 21 16:47:23 CET 2012 Resolving Test Steps to execute...
Wed Nov 21 16:47:24 CET 2012 Activating AUT...
Wed Nov 21 16:47:24 CET 2012 Test Suite "Analyzer Suite" execution...
Wed Nov 21 16:47:24 CET 2012 Test Case: Activate AUT default
Wed Nov 21 16:47:24 CET 2012 Test Case: Activate AUT with default specified in config
Wed Nov 21 16:47:24 CET 2012 Test Case: ub_app_activate
Wed Nov 21 16:47:24 CET 2012 Step: activate AUT
Wed Nov 21 16:47:24 CET 2012 Event Handler: Retry: Activation via titlbar
Wed Nov 21 16:47:24 CET 2012 Step: activate AUT
Wed Nov 21 16:47:24 CET 2012 Event Handler: Default Event Handler
Wed Nov 21 16:47:24 CET 2012 End of Test Suite
Wed Nov 21 16:47:24 CET 2012 Writing Report into Filesystem
Wed Nov 21 16:47:25 CET 2012 Writing Report to Database
Wed Nov 21 16:47:25 CET 2012 AUT: Disconnected.
Wed Nov 21 16:47:26 CET 2012 AUT Agent: connection closed.
Wed Nov 21 16:47:26 CET 2012 Exit: Code 1


rc_swing.log:
org.eclipse.jubula.rc.common.exception.RobotException: Window activation failed.
at org.eclipse.jubula.rc.swing.swing.driver.RobotAwtImpl.activateApplication(RobotAwtImpl.java:812) ~[org.eclipse.jubula.rc.swing_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.rc.common.commands.InitTestExecutionCommand.execute(InitTestExecutionCommand.java:47) ~[org.eclipse.jubula.rc.common_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.Communicator$ConnectionListener.received(Communicator.java:845) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection.fireMessageReceived(Connection.java:402) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection.access$3(Connection.java:391) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection$ReaderThread.run(Connection.java:454) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]

Re: Robot Exception: Window activation failed [message #987043 is a reply to message #986789] Fri, 23 November 2012 07:32 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 363
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Hi

well, we tried Xvfb a few years ago for our nightly test. We never got it to run reliable. There have been unexplained hangups, problem with keyboard input, totally different AUT behaviour and some others. We finally gave up and switched to VMware ESXi.

So you have been warned! Since there might have been improvements in Xvfb you can try but have to look into the following:

Make sure the keyboard type is well defined.

The standard window activation method is "Click in titlebar". For that to work there has to be a titlebar Wink. You have to start a window manager for the Xvfb. That is probably a good idea in itself since a lot of programs act really strange without a WM.

If you can't (or don't want to) run a WM change the default activation method to something different. Which is best is depending on your AUT.

HTH

Achim
Re: Robot Exception: Window activation failed [message #987343 is a reply to message #987043] Mon, 26 November 2012 08:55 Go to previous messageGo to next message
Michael Zwick is currently offline Michael ZwickFriend
Messages: 5
Registered: February 2012
Junior Member
Hi Achim,

thank you very much for sharing your experiences with Xvfb. Doesn't sound too promising, though.

I also noticed (in the mean-time) that it helps (sometimes) to start the X server with a window manager (WM). Can be done like

startx -- `which Xvfb` :1 -screen 0 1024x768x16 2>&1 >/dev/null &

or with xinit and specifying the WM directly. With this I at least did no longer see the Robot exception. Activating the AUT worked fine, too. So, this seems to be solved. I even got screen-shots after test failures. Still I will need to invest more time to see if it works reliably. Thanks again for the warnings.

It would definitely be interesting to learn more about how others run Jubula on their build servers. Do you all use VM?

Michael
Re: Robot Exception: Window activation failed [message #1580720 is a reply to message #987343] Fri, 23 January 2015 17:25 Go to previous messageGo to next message
a goettl is currently offline a goettlFriend
Messages: 14
Registered: December 2014
Junior Member
I am encountering a similar situation...I am able to successfully run my test suite via eclipse or command line using the test executor. But when I have a Hudson job start the job on a slave machine and the AUTAgent successfully starts and is able to and connect to the AUT. However, the test step to perform an InitTestExecutionCommand for an executeExternalCommand results in an error to activate the AUT due to RobotException: Window activation failed. The test report is able to take a screenshot and several test steps were reported as executing successfully prior to this failure. Only the step to executeExternalCommand is encountering this error. I am running Jubula_8.0.00170 on RHEL_5. The command in the executeExternalCommand is an alias to execute a shell script.
Re: Robot Exception: Window activation failed [message #1585424 is a reply to message #1580720] Mon, 26 January 2015 08:56 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1225
Registered: July 2009
Senior Member
Hi,

Thanks for your comment. Can you add anything from the logs (RC logs), as well as the HTML report for the failing test and information on what the external command does, where it should be called from etc?

Thanks!
Alex
Previous Topic:Jubula parallel tests executions
Next Topic:Checking Icons in general
Goto Forum:
  


Current Time: Fri Jan 30 04:58:24 GMT 2015

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

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