Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Starting SWT AUT(Error when starting SWT Application as AUT)
icon5.gif  Starting SWT AUT [message #689868] Tue, 28 June 2011 14:14 Go to next message
Stephan  is currently offline Stephan
Messages: 4
Registered: June 2011
Junior Member
Hi
I'm using Jubula standalone 0.9.0.qualifier.
I created a new test project and configured an existing SWT application I developed as an AUT (specifically I configured it to usw swt toolkit and configured the exe path to a batch file that starts the app).
I started the AUT agent, connected to it and then wanted to start the AUT (no test cases etc yet).
However, after a couple of seconds a window pops up:
An error occurred.
Reason:
5009: Aut start failed

The client log shows:
2011-06-28 15:57:07.657 [Connection.ReaderThread:Socket[addr=localhost/127.0.0.1,port=60000,localport=3093]] ERROR o.e.j.c.c.c.StartAUTServerStateCommand - AUTServer could not start: Error while starting AUT!

Any ideas?

Thanks for what looks like a very promising test tool!

Stephan
P.S. I tried the same with the example swt adder and had no problems starting it.
Re: Starting SWT AUT [message #690318 is a reply to message #689868] Wed, 29 June 2011 11:22 Go to previous messageGo to next message
Stephan  is currently offline Stephan
Messages: 4
Registered: June 2011
Junior Member
Is there anything I need to do, so that jubula (or the AUT agent?) can connect to my SWT application?
I read that for rcp apps a plugin is necessary (which one unzips). However, my app is not an rcp app.
Any logs I can enable to get to the bottom of this?

Stephan
Re: Starting SWT AUT [message #690322 is a reply to message #690318] Wed, 29 June 2011 11:28 Go to previous messageGo to next message
Francois Genolini is currently offline Francois Genolini
Messages: 14
Registered: June 2011
Location: UK, Aberdeen
Junior Member
You say that you have successfully managed to start at least one of the Jubula example AUTs. Because they work, then its your app that is not starting.

Does your app start from the command line?
Have you specified the JRE as well as your app?

The logs are in the user's home directory under .jubula/logs/aut_agent_0.log

[Updated on: Wed, 29 June 2011 11:32]

Report message to a moderator

Re: Starting SWT AUT [message #690958 is a reply to message #690322] Thu, 30 June 2011 13:18 Go to previous messageGo to next message
Stephan  is currently offline Stephan
Messages: 4
Registered: June 2011
Junior Member
Hi
The aut_agent logs are empty!
The client log contains:
2011-06-30 15:11:31.173 [main] WARN o.e.j.c.c.c.BaseConnection - send() called to an unconnected connection
2011-06-30 15:11:31.188 [main] ERROR o.e.jubula.client.core.ClientTest - org.eclipse.jubula.client.core.communication.BaseConnection$NotConnectedException: This connection is not connected
2011-06-30 15:11:45.611 [main] WARN o.e.j.c.c.c.BaseConnection - send() called to an unconnected connection
2011-06-30 15:11:45.611 [main] ERROR o.e.jubula.client.core.ClientTest - org.eclipse.jubula.client.core.communication.BaseConnection$NotConnectedException: This connection is not connected
2011-06-30 15:12:30.706 [Connection.ReaderThread:Socket[addr=localhost/127.0.0.1,port=60000,localport=1814]] ERROR o.e.j.c.c.c.StartAUTServerStateCommand - AUTServer could not start: Error while starting AUT!


The batch file I am trying to start as AUT (and I can start it manually) looks like this:

"C:\Program Files\Java\jdk1.6.0_19\jre\bin\javaw" -jar pedit.jar %1 %2 %3
The parameters are optional.
Re: Starting SWT AUT [message #690977 is a reply to message #690958] Thu, 30 June 2011 13:49 Go to previous messageGo to next message
Francois Genolini is currently offline Francois Genolini
Messages: 14
Registered: June 2011
Location: UK, Aberdeen
Junior Member
I have tried to do something similar to what you suggest, but mine works.

The difference seems to be that I have a few more lines at the start of my batch file:

D:
CD \Folder\Where\JAR\File\Is
"C:\Program Files\Java\jdk1.6.0_26\bin\javaw.exe" -jar name_of_jar_file.jar %1 %2 %3


As long as all the paths are known, this should work.

I have not managed to get the same error as you have, but I have others.

For example if deliberately specify the wrong jar file (typo, jar file not in class path because batch file started from another drive and folder...) I get the following error message in the client log:

[Connection.ReaderThread:Socket[addr=/myIP,port=60000,localport=63748]] ERROR o.e.j.c.c.c.StartAUTServerStateCommand - AUTServer could not start: invalid arguments


Also if I deliberately make my Java application fail and return error code -1 using System.exit(-1), I get an error message in the standalone ITE saying:

5009: AUT start failed
Establishing connection to AUT failed.
Please check the AUT configuration.

I also get an error message in the Client log:

[Connection.ReaderThread:Socket[addr=/myIP,port=60000,localport=64068]] ERROR o.e.j.c.c.c.StartAUTServerStateCommand - AUTServer could not start: unknown AUTServer exit code: '-1'


This all seems to work as designed and be rather good at error reporting Wink

[Updated on: Thu, 30 June 2011 14:24]

Report message to a moderator

Re: Starting SWT AUT [message #691061 is a reply to message #690958] Thu, 30 June 2011 15:59 Go to previous messageGo to next message
Eclipse User
Originally posted by:

On 2011-06-30 15:18:16 +0200, Stephan said:

> The batch file I am trying to start as AUT (and I can start it
> manually) looks like this:
>
> "C:\Program Files\Java\jdk1.6.0_19\jre\bin\javaw" -jar pedit.jar %1 %2 %3
> The parameters are optional.

Francois might be on to something. Did you set the the "AUT
Base/Working Directory" in the AUT configuration? jar files and all
other elements with relative path names on the classpath are looked up
using this directory as its base. The default for this directory is the
installation directory of the AUTAgent.

- Achim
Re: Starting SWT AUT [message #691389 is a reply to message #691061] Fri, 01 July 2011 11:06 Go to previous messageGo to next message
Stephan  is currently offline Stephan
Messages: 4
Registered: June 2011
Junior Member
Hi

Thanks for all the hints, but it looks like the settings are correct.
Here's a screen shot.
index.php/fa/3210/0/
I also tried specifying the jar itself instead of the batchfile, but same problem.

Maybe I can try to add some logging/debugging to the relevant source files,if you could point me in the right direction?

Stephan
Re: Starting SWT AUT [message #691429 is a reply to message #691389] Fri, 01 July 2011 12:56 Go to previous messageGo to next message
Francois Genolini is currently offline Francois Genolini
Messages: 14
Registered: June 2011
Location: UK, Aberdeen
Junior Member
Divide and conquer Wink
First just call your Jar without a batch file (specify JRE, JAR and class path).

If this works, then your software is OK, but there is somehow an issue with batch files.

If this does not work just add Java Logging API calls (and save to simple text file).

Call System.exit(-1) as the first instruction in your main.
You should get the same error message that I had earlier:
AUTServer could not start: unknown AUTServer exit code: '-1'

If you do not, then your JRE has an issue (your code is not even run), or some of your static initialisers do something really bad.
Try the latest JDK (1.6.0_26).

If you do have the expected error, then add info (or severe) Java Logging API messages gradually to your program.

[Updated on: Fri, 01 July 2011 12:57]

Report message to a moderator

Re: Starting SWT AUT [message #1009063 is a reply to message #689868] Thu, 14 February 2013 11:12 Go to previous messageGo to next message
Alexander Berger is currently offline Alexander Berger
Messages: 11
Registered: January 2013
Junior Member
Hi,

my SWT AUT don't start with Jubula 1.3.0 standalone(5009: AUT start failed).
With cmd the JAR file starts and also with doublclick on the JAR file it starts.

I create the JAR file with eclipse Juno (Right click on the Project-> Export...-> Runnable JAR file-> Select "Package required libraries into generated JAR"-> Finish".

The AUT Agent log shows nothing.
The Client Agent log shows: "2013-02-14 12:05:44.192 [Connection.ReaderThread:Socket[addr=localhost/127.0.0.1,port=60000,localport=50948]] ERROR o.e.j.c.c.c.StartAUTServerStateCommand - AUTServer could not start: Error while starting AUT!"

In the AUT configuration I only have selected the JAR file.
Re: Starting SWT AUT [message #1009431 is a reply to message #1009063] Fri, 15 February 2013 06:13 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1155
Registered: July 2009
Senior Member
Hi,

Aside from the rather excellent help above, the only things that come to mind are:
- are you 100% sure it is a pure SWT application, and not an Eclipse RCP application (sorry if this is a silly question, but the latter is more common than the former). If so, what version of Eclipse is it based on?
- bear in mind that the AUT config dialog should be a reflection of what you enter on the cmd. Anything (arguments etc) you enter there has to appear in the AUT config as well.

HTH,
Alex
Re: Starting SWT AUT [message #1009529 is a reply to message #689868] Fri, 15 February 2013 09:28 Go to previous messageGo to next message
Alexander Berger is currently offline Alexander Berger
Messages: 11
Registered: January 2013
Junior Member
Hi,

-yes it is a pure SWT application.(eclipse Juno32bit
Version: Juno Service Release 1 & Windows 7 64bit)
-in the AUT configuration I add the directory from the JAR file.
And my cmd command is "java -jar C:\Users\berger\Desktop\NatTable.jar", the JAR file runs with the cmd command.
Re: Starting SWT AUT [message #1012764 is a reply to message #1009529] Fri, 22 February 2013 07:45 Go to previous message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1155
Registered: July 2009
Senior Member
Hi,

I'm afraid I'm a bit stumped then. Unless the jar file is pointing to files that can't be reached from your installation, then I don't know what could be causing it. At this point, the only further thing I can suggest is that our support team could take a look at your application and its start mechanism - that would involve a support package. If you want more information, then send a mail to sales at bredex dot de.

Best regards,
Alex
Previous Topic:Selecting two objects by holding down CTRL
Next Topic:How to validate the test result with db/device data?
Goto Forum:
  


Current Time: Tue Sep 30 10:20:59 GMT 2014

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

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