Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Jubula not working with Jenkins(Jubula integration with Jenkins)
Jubula not working with Jenkins [message #1768554] Thu, 20 July 2017 02:27 Go to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
We have a dedicated server for running tests using Jenkins. If I run the following command from a batch file:

testexec.exe -c calypsoTestsConfig.xml -port 52933 -dburl jdbc:h2:c:\DEVROOT\jubula\database\embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE

The tests run correctly. If I run the above line as a windows batch command step in Jenkins, the job stops at trying to load the UAT, after successfully connecting to the Jubula database.

The config file looks like this:

<configuration>
<project>Calypso Tests</project>
<version>1.0</version>
<autconfig>Calypso Tests@localhost</autconfig>
<autid>Calypso Tests</autid>
<dbuser>sa</dbuser>
<dbpw></dbpw>
<testsuite>Menus</testsuite>
</configuration>

Is someone able to shed some light on what is happening here please?
Re: Jubula not working with Jenkins [message #1768590 is a reply to message #1768554] Thu, 20 July 2017 11:27 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

can you post the output from the testexec so we can see the error message?

Thanks!
Alex
Re: Jubula not working with Jenkins [message #1768650 is a reply to message #1768590] Fri, 21 July 2017 01:17 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Alexandra, the attached log file shows the output from running testexec from a command line on the Jenkins server. It works fine (running Jenkins 1.6.4). When I run it as a windows batch command step in Jenkins, it stops when trying to load the UAT. It locks up at that point, no error messages are shown. The second log file is the output from Jenkins. I manually aborted the job.

Thanks for your help,

Bruce
  • Attachment: log.txt
    (Size: 8.72KB, Downloaded 53 times)
  • Attachment: log2.txt
    (Size: 3.62KB, Downloaded 55 times)
Re: Jubula not working with Jenkins [message #1768651 is a reply to message #1768590] Fri, 21 July 2017 01:18 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Alexandra, the attached log file shows the output from running testexec from a command line on the Jenkins server. It works fine (running Jenkins 1.6.4). When I run it as a windows batch command step in Jenkins, it stops when trying to load the UAT. It locks up at that point, no error messages are shown. The second log file is the output from Jenkins. I manually aborted the job.

Thanks for your help,

Bruce
Re: Jubula not working with Jenkins [message #1768660 is a reply to message #1768651] Fri, 21 July 2017 06:21 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hm. My first thought would be to check the AUT configuration to make sure that it can actually work (are you running the batch and command step on the same machine)?
Otherwise - when you watch the test execution, can you see that the AUT starts, or does nothing happen?

Best regards,
Alex
Re: Jubula not working with Jenkins [message #1769371 is a reply to message #1768660] Mon, 31 July 2017 06:59 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
The batch file is run on the same server and it works fine. When I run it with jenkins, it gets to the loading AUT step and just stops. No error messages are displayed.
Re: Jubula not working with Jenkins [message #1769849 is a reply to message #1769371] Fri, 04 August 2017 07:53 Go to previous messageGo to next message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 115
Registered: March 2012
Senior Member
I assume this is a RCP application?
In the logs i can see that you are copying the rc.rcp plugin somewhere and also that you are extracting your application at the beginning. Does this mean that you deploy the rc.rcp plugin into your Application? If this is the case, our rc.rcp plugin needs to be auto started by the application and therefore it must be set e.g. config.ini or must be installed in another way to it is started automatically[1] Maybe something with this is not completely correct at this moment.


[1] http://help.eclipse.org/oxygen/topic/org.eclipse.jubula.client.ua.help/content/html/userManual/toolkit/ch04s03s03.html
with regards
Marvin Mueller
Re: Jubula not working with Jenkins [message #1769950 is a reply to message #1769849] Mon, 07 August 2017 00:00 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Thanks for the response Marvin. It is indeed an RCP application. I can already run the application from a batch file on the Jenkins server. The tests work as they should when I manually run the batch file from a command prompt. When I run the batch file from a Jenkins job, it executes the exact same batch command to connect to the AUT but nothing happens, it just hangs there. The link you provided is not necessary as I already have been through that procedure and have a running AUT application.
Re: Jubula not working with Jenkins [message #1770053 is a reply to message #1769950] Mon, 07 August 2017 18:45 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 376
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Jubula needs a display, keyboard and mouse during test execution.

If you use a standard Jenkins installation the jobs will run without a display connection. You have to either start Jenkins as a normal program, i.e. not as a service, or you need to allow the Jenkins service to interact with the desktop which might or might not work as expected depending on your windows version, some graphics settings and the phase of the moon ;-)

Easiest way is to have a dedicated Jenkins slave, preferably on a virtual machine, which is started as a program and used exclusively to run tests.

I am not sure if there is a tutorial on how to do this. Alex, Marvin, any hints?
Re: Jubula not working with Jenkins [message #1770064 is a reply to message #1770053] Tue, 08 August 2017 05:35 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
We've got this: https://testing.bredex.de/test-machine-setup.html
:)
Re: Jubula not working with Jenkins [message #1770199 is a reply to message #1770064] Wed, 09 August 2017 04:55 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Thanks again people. We do have a dedicated server running our jenkins jobs. As I have said, I can log into the jenkins machine and run the batch job within a command window and it works fantastically. Here is the command that is run from the batch file:

"C:\Program Files\jubula_8.4.1.123\ite\testexec.exe" -c calypsoTestsConfig.xml -autconfig "Calypso Tests@localhost" -port 52933 -dburl jdbc:h2:c:\DEVROOT\jubula\database\embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE

When this is placed into a Jenkins build step, Jenkins runs up to this step and stops dead.
Re: Jubula not working with Jenkins [message #1771005 is a reply to message #1770199] Mon, 21 August 2017 06:31 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Is anyone looking into this issue?
Re: Jubula not working with Jenkins [message #1771007 is a reply to message #1771005] Mon, 21 August 2017 07:11 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 376
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Again, have you checked that the Jenkins server is running with access to the display, keyboard and mouse? If you use a standard Jenkins setup the service and all its jobs will run without a display connection which will make Jubula test execution fail.
Re: Jubula not working with Jenkins [message #1771102 is a reply to message #1771007] Mon, 21 August 2017 23:18 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
I'm not sure what you mean. As I have said, I can run the Jubula tests from a command line on the Jenkins server and it works. Is there a setting in Jubula that I have to use in order to get access to the display, keyboard and mouse? I couldn't see anything. Here is the windows command step in Jubula that is being executed:

"C:\Program Files\jubula_8.4.1.123\ite\testexec.exe" -c calypsoTestsConfig.xml -autconfig "Calypso Tests@localhost" -port 52933 -dburl jdbc:h2:c:\DEVROOT\jubula\database\embedded;MVCC=TRUE;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE
Re: Jubula not working with Jenkins [message #1773132 is a reply to message #1771102] Fri, 22 September 2017 06:30 Go to previous messageGo to next message
thuan pham is currently offline thuan phamFriend
Messages: 1
Registered: September 2017
Junior Member
I think that you should enable your jenkin to let it work with desktop application:
Open the Services module
Right-click on Jenkins and select "Properties"
On the "Log On" tab, run as "Local System account" and select the "Allow service to interact with desktop" checkbox
Re: Jubula not working with Jenkins [message #1776816 is a reply to message #1768554] Tue, 21 November 2017 21:21 Go to previous messageGo to next message
Lynette Hsieh is currently offline Lynette HsiehFriend
Messages: 7
Registered: February 2016
Junior Member
Hi Jubula team,

I am having the similar issues with running testexec with Jenkins.

Here is what I have:
I created a batch file that calls the testexec with a configuration file.
Everything seems to work fine until the Project completness check, then I get the error and the whole process fails.

I can run the same batch file on a slave machine (a physical Window 7 and 10 box) but not on the master (that is also a Windows 10 but on a VM vCloud)

I have setup the jenkins service to interact with the desktop as suggested and I still cannot get the testexec to run.

There are no jubula log files that would point me to where the problem is, i.e under C:\user\loggedInUser\.jubula. The console only give me the generic "AUT could not be started, because no valid Java JRE was specified"

Please advise how one can go about debugging this error.

Thanks!

Lynette
Re: Jubula not working with Jenkins [message #1776845 is a reply to message #1776816] Wed, 22 November 2017 08:51 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Lynette,

it sounds like the configuration you are trying to start is not available on your Windows 10 computer. I guess either the AUT is not where you've defined it in the AUT configuration, or some other path in the configuration is incorrect.
Check and see if the paths you've specified in the AUT configuration really are available and correct on the Windows 10 machine.

Hope that helps!
Alex
Re: Jubula not working with Jenkins [message #1776883 is a reply to message #1776845] Wed, 22 November 2017 13:52 Go to previous messageGo to next message
Lynette Hsieh is currently offline Lynette HsiehFriend
Messages: 7
Registered: February 2016
Junior Member
Hi Alex! Thanks for the reply.

I am a bit confuse as to why the AUT set up would be different if I am executing the same batch file that I can run from command line on the same Windows 10 box (VM).

What I mean is, I can run the same batch file (remoteExecute.bat) from Window's command prompt (running as the user not Admin) and it starts the whole process without issue whereas if I run the same batch file through Jenkins job (whether it be a pipeline or simple free style project) it fails with the same generic error from Jubula.

The funny thing is if I execute the same jenkins job on a slave machine (also another Windows 10 box but its an actual laptop not a VM) it works without problems.

Any other ideas as to what might be causing this issue?

Thanks!

Lynette
Re: Jubula not working with Jenkins [message #1777293 is a reply to message #1776883] Tue, 28 November 2017 08:42 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 115
Registered: March 2012
Senior Member
Hello Lynette,

It might be that the Jenkins setup has other environment Settings than the local commandline. This might lead to different behavior in the startup from applications. E.g. if youre are using the jenkins it might be that no correct java/JAVA HOME is set. Please verify that the jenkins slave environment is set up correctly.

with regards
Marvin Mueller
Previous Topic:why my tests connect to AUT timeout sometimes
Next Topic:Tracking UserID - Database
Goto Forum:
  


Current Time: Tue Sep 25 16:35:41 GMT 2018

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

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

Back to the top