Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Problem starting a test suite from command line
Problem starting a test suite from command line [message #774253] Tue, 03 January 2012 15:43 Go to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Hi,

I have stored my Jubula test cases in a PostGreSQL database and it works fine.
The problem is that I can't start my test suites via command line. This is needed to be able to run my Jubula test cases on our Jenkins build server.

I have tried this:

testexec -project "Jubula Test" -version "1.0" -testsuite "TEB" -autconfig "EBITool-7.0_TEB@localhost" -resultdir "D:/Jubula/Result" -language "sv_SE" -dbscheme "Jubula database" -dbuser "rskoog" -dbpw "XXX" -server "liono.scan.bombardier.com" -port "5432" -datadir "D:/Jubula/Test_Data"

but I get an error message saying that no database connection is available for name "Jubula database" and that the only available name is "Default Embedded (H2)" (see screenshot Jubula_Database_120103_2.jpg). I have also tried with dbscheme = "PostGreSQL", but without any luck. What should dbscheme be specified as? See screenshot Jubula_Database_120103_1.jpg for database preferences.

Is there any good insructions out there of how to run Jubula test suites on a build server? I have read the Jubula User Manual, but it didn't help.

Regards Richard
Re: Problem starting a test suite from command line [message #774267 is a reply to message #774253] Tue, 03 January 2012 16:06 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Hi,
have you tried to use the -data parameter? I think there is a thread that deals with a similar issue, I will continue looking for it. For all possible parameters using the testexec command check this link:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node260.html
Regards
Oliver
Re: Problem starting a test suite from command line [message #774558 is a reply to message #774267] Wed, 04 January 2012 07:08 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
-dbscheme is required as argument by "testexec", so I have to solve that problem first in some way.
Any ideas?

Regards Richard

[Updated on: Wed, 04 January 2012 07:08]

Report message to a moderator

Re: Problem starting a test suite from command line [message #774648 is a reply to message #774558] Wed, 04 January 2012 10:39 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Richard,

The reason that the dbscheme cannot be found is probably because the -data parameter is missing. The -data parameter specifies the workspace, which is the place checked for the database preferences.

Best regards,
Alex
Re: Problem starting a test suite from command line [message #774673 is a reply to message #774648] Wed, 04 January 2012 11:30 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Great! Now I got one step further.

Now I get "AUT agent: conection to server failed" (see screenshot Jubula_Database_120103_3.jpg). Is there any way to get some detailed information about what's causing the server connection problem?

One thing I have in mind is that I haven't specified the database name "jubula" anywhere (see Jubula_Database_120103_1.jpg) and what I can see there's no option to do that when calling "testexec". Isn't that necessary?

Regards Richard
Re: Problem starting a test suite from command line [message #774691 is a reply to message #774673] Wed, 04 January 2012 12:13 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The error message
Quote:
AUT agent: conection to server failed


means that the connection couldn't be made to to AUT Agent. Either you've not started one on the port you're using, or something else (perhaps the ITE? Wink ) is already connected to it.

Best regards,
Alex
Re: Problem starting a test suite from command line [message #775054 is a reply to message #774691] Thu, 05 January 2012 08:18 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Sorry but I can't get this to work.

This is what I try to run in command line (dbpw is replaced by XXX):
testexec -project "Jubula Test" -version "1.0" -testsuite "TEB" -autconfig "EBITool-7.0_TEB@localhost" -resultdir "D:/Jubula/Result" -language "sv_SE" -dbscheme "Jubula database" -dbuser "rskoog" -dbpw "XXX" -server "liono.scan.bombardier.com" -port "60000" -datadir "D:/Jubula/Test_Data" -data "D:/Jubula/Workspace"

but I still get "AUT Agent: connection to server failed". All according to screenshot Jubula_Database_120103_3.jpg.

I can't understand this because the connection to the AUT agent is up and running. I have connected via localhost without changing any port, so I guess that the port in command line should be 60000 (see screenshot Jubula_Database_120103_4.jpg).

Exactly what shall be done before I run command line? What shall be started and what shall not be started?

Regards Richard
Re: Problem starting a test suite from command line [message #775109 is a reply to message #775054] Thu, 05 January 2012 10:39 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The fact that you are already connected to the Agent process is the problem. The Agent only accepts one connection, and this is already in place. Disconnect from the Agent via the ITE and then the testexec process will be able to connect to the running Agent.

Regards,
Alex
Re: Problem starting a test suite from command line [message #775158 is a reply to message #775109] Thu, 05 January 2012 13:20 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Sorry to say it, but the ITE doesn't seem to connect to the running AUT Agent.

The procedure is:
1.) Start Jubula stand-alone version.
2.) Start the AUT Agent and check that port used is 60000.
3.) Run the following from command line:
testexec -project "Jubula Test" -version "1.0" -testsuite "TEB" -autconfig "EBITool-7.0_TEB@localhost" -resultdir "D:/Jubula/Result" -language "sv_SE" -dbscheme "Jubula database" -dbuser "rskoog" -dbpw "XXX" -server "liono.scan.bombardier.com" -port "60000" -datadir "D:/Jubula/Test_Data" -data "D:/Jubula/Workspace"

but absolutely nothing happens in Jubula!! Do I have to do something else?

I'm little stuck here...

Regards Richard
Re: Problem starting a test suite from command line [message #775205 is a reply to message #775158] Thu, 05 January 2012 15:00 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 376
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Try using

-server localhost

instead of

-server "liono.scan.bombardier.com"

for your AUTagent connection (assuming that the AUT should run on localhost). Maybe there is a typo in the hostname.

- Achim
Re: Problem starting a test suite from command line [message #775211 is a reply to message #775158] Thu, 05 January 2012 15:12 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Richard,

How are you checking that the port used is 60000 as described in the second step? Your attachment Jubula_Database_120103_4.jpg shows the ITE as being connected to the Agent. The testexec you are starting is also going to want to connect to that Agent, so this connection cannot still be in place when you want to start the testexec.

Bear in mind as well that nothing should happen in Jubula when the testexec connects to the Agent or runs the test. The testexec offers the same functions as the ITE for executing tests, but does not require or affect the GUI in any way.

I noticed from your command that you entered liono.scan.bombardier.com as the server. Is this the hostname for the AUT Agent? If not, then this could be a reason.

Regards,
Alex
Re: Problem starting a test suite from command line [message #776731 is a reply to message #775211] Mon, 09 January 2012 07:09 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Hi,

Thanks for all the help!! It was the "server name" that caused the problem. Now it works!

A last question...

I need to specify a work path when my ITE starts up. How can this be done when running a test suite from command line? This is before my ITE is fully started. My test suite hasn't started to execute in this stage, so I can't specify the path inside the test suite.

Regards Richard
Re: Problem starting a test suite from command line [message #776742 is a reply to message #776731] Mon, 09 January 2012 07:41 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

You could look at using environment variables or you could use the path you specify for the -datadir parameter to be the root path for files etc. in your test.

Regards,
Alex
Re: Problem starting a test suite from command line [message #776760 is a reply to message #776742] Mon, 09 January 2012 08:31 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
"Environment variables" or "-datadir" doesn't help in my case. There is a pop'up when starting up my ITE. In this pop'up I have to specify a path and then press the 'OK' button. After that the ITE will fully start. How can this be done when the test suite isn't yet started?

Regards Richard
Re: Problem starting a test suite from command line [message #776785 is a reply to message #776760] Mon, 09 January 2012 09:19 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Have a look at this topic on splash screens.

Regards,
Alex
Re: Problem starting a test suite from command line [message #776868 is a reply to message #776785] Mon, 09 January 2012 12:37 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Unfortunately it's not enough with the -data option. I have to press the 'OK' button too or press 'Enter' after specifying the path. But I guess that this is not possible due to that the pop'up appears before the test suite is up an running, or?

Regards Richard
Re: Problem starting a test suite from command line [message #777959 is a reply to message #776868] Wed, 11 January 2012 08:05 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
The -data option can be added to the AUT Configuration to give your AUT parameters it requires to start (e.g for Eclipse the Workspace choice) so that the splash screen doesn't appear at all.
If your splash screen is more complex, then you may have to add other information to the AUT arguments in the AUT configuration as well.
Re: Problem starting a test suite from command line [message #855078 is a reply to message #777959] Tue, 24 April 2012 13:55 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Alexandra Schladebeck wrote on Wed, 11 January 2012 03:05
The -data option can be added to the AUT Configuration to give your AUT parameters it requires to start (e.g for Eclipse the Workspace choice) so that the splash screen doesn't appear at all.
If your splash screen is more complex, then you may have to add other information to the AUT arguments in the AUT configuration as well.


Setting of the -data option in the AUT Configuration works and solves the problem with the splash screen, but how can this be solved if running "autrun" och "testexec" using "autid"? I can't find any parameter in "autrun" and "testexec", which can be used instead of "-data" in the AUT Configuration.

Regards Richard
Re: Problem starting a test suite from command line [message #855088 is a reply to message #855078] Tue, 24 April 2012 14:08 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

The -data parameter is documented for autrun as well. There is an open bug for this at the moment, but a workaround is documented.

HTH,
Alex
Re: Problem starting a test suite from command line [message #855148 is a reply to message #855088] Tue, 24 April 2012 15:07 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Most likely my fault, but I can't get the workaround to bite.

I'm running this:
autrun.exe -w D:\Jubula\Workspace -a "localhost" -p "60000" -rcp -k "sv_SE" -i "EBITool_AUTID" -e C:\Programs\Bombardier\EBITool-7.0\myebitoolscript.cmd -g "true"

The myebitoolscript.cmd looks like this:
ebitool.exe -data D:\Workspaces\EBITool\CMD_LINE

but I get the erros according to the attached snapshot.

This one works, but without setting the workspace due to bug 346572:
autrun.exe -w D:\Jubula\Workspace -a "localhost" -p "60000" -rcp -k "sv_SE" -i "EBITool_AUTID" -e C:\Programs\Bombardier\EBITool-7.0\ebitool.exe -data D:\Workspaces\EBITool\CMD_LINE -g "true"

Any ideas?

Regards Richard
  • Attachment: Jubula.jpg
    (Size: 29.17KB, Downloaded 310 times)
Re: Problem starting a test suite from command line [message #855880 is a reply to message #855148] Wed, 25 April 2012 07:19 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Could you try putting the -e argument and its parameter at the end of the command line? I believe that -e has to be the last argument, otherwise any following parameters are interpreted as being parameters of the AUT.

Does that help?
Alex
Re: Problem starting a test suite from command line [message #855992 is a reply to message #855880] Wed, 25 April 2012 09:14 Go to previous messageGo to next message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Unfortunately not Sad

I tried:
autrun.exe -w D:\Jubula\Workspace -a "localhost" -p "60000" -rcp -k "sv_SE" -i "EBITool_AUTID" -g "true" -e C:\Programs\Bombardier\EBITool-7.0\myebitoolscript.cmd

but with the same result. Does it really work for you to use the workaround?

Regards Richard
Re: Problem starting a test suite from command line [message #856027 is a reply to message #855992] Wed, 25 April 2012 09:51 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
I've seen the problem now. Your working directory is wrong. When you use -e without the .cmd, then you place the absolute path in front of the .exe. When you use the script, you enter the absolute path for the script, but inside the script you have a relative path - relative to the working directory. autrun is looking for your application under D:\Jubula\Workspace\ebitool.exe.

Best regards,
Alex
Re: Problem starting a test suite from command line [message #856129 is a reply to message #856027] Wed, 25 April 2012 11:49 Go to previous message
Richard Skoog is currently offline Richard SkoogFriend
Messages: 62
Registered: October 2011
Member
Thanks!! Works like a charm Smile
Previous Topic:Best way of running Jubula test cases in continuous integration enviroment
Next Topic:Text into XtextEditor
Goto Forum:
  


Current Time: Tue Apr 16 08:48:05 GMT 2024

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

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

Back to the top