Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Running headless in virtual machine
icon5.gif  Running headless in virtual machine [message #723218] Thu, 08 September 2011 04:57 Go to next message
Sebastian Hegewald is currently offline Sebastian HegewaldFriend
Messages: 6
Registered: September 2011
Junior Member
Hi,

we run our Jubula test cases inside a virtual machine (Windows 7).
The test executor is triggerd by an Jenkins job.

The tests are successful as long as somebody is connected to the virtual machine, e.g. via MS Remote Desktop.
If there is nobody connected the tests run, however they are not successful. The screenshots Jubula takes if an error occurs are completely black.

Is it possible to run the tests inside the virtual machine without the requirement to be connected to it?

Thanks
Sebastian
Re: Running headless in virtual machine [message #723221 is a reply to message #723218] Thu, 08 September 2011 05:24 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 357
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

What Hypervisor are you running? We use VMware ESXi for our own tests and there are no problems running them without connections.

Achim
Re: Running headless in virtual machine [message #723306 is a reply to message #723221] Thu, 08 September 2011 09:42 Go to previous messageGo to next message
Sebastian Hegewald is currently offline Sebastian HegewaldFriend
Messages: 6
Registered: September 2011
Junior Member
Achim wrote on Thu, 08 September 2011 01:24
What Hypervisor are you running? We use VMware ESXi for our own tests and there are no problems running them without connections.

Achim


We are running VMware ESXi 4.1. Energy saving option inside the virtual machine are disabled.
Re: Running headless in virtual machine [message #724331 is a reply to message #723218] Mon, 12 September 2011 06:26 Go to previous messageGo to next message
Sebastian Hegewald is currently offline Sebastian HegewaldFriend
Messages: 6
Registered: September 2011
Junior Member
I tried different Windows systems inside the virtual machine (Windows 7 Enterprise 64bit, Windows Server 2008 64bit and Windows XP SP3 32bit), but always the same the tests fail and the screenshots are only black screens.

Any ideas?

Thanks
Sebastian


Re: Running headless in virtual machine [message #724459 is a reply to message #724331] Mon, 12 September 2011 12:10 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 357
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Sorry, no idea what's going on there. As I said above that is close to our own setup. I don't know if there is a configuration option in ESXi which would prevent disconnected VMs from GUI interaction.

There are a few things to consider:


  • The Hudson/Jenkins connector can't be run as a service. Starting it via ssh might work depending on your setup. The best solutions is to autologin a test account and start the Hudson/Jenkins connector during login.
  • Start the AUTagent(s) from inside the Hudson/Jenkins job (and don't forget to stop them when the job is done).
  • You may get better performance starting the test executor on your Hudson/Jenkins master.


I'm not sure that any of the above points are the cause for your particular problem. Just check them and let's see if anything gets better if you change the setup.

Achim
Re: Running headless in virtual machine [message #739228 is a reply to message #723218] Mon, 17 October 2011 08:29 Go to previous messageGo to next message
R. Oldenburg is currently offline R. OldenburgFriend
Messages: 24
Registered: September 2011
Junior Member
Hi all,

we encountered the same annoying behaviour.
Our solution currently is to connect to the vm on a "native" console.

When connected per "remote desktop" all tests do work.
When leaving the "remote desktop session" then all tests result in a failure, with all their screenshots being completely black.

When connecting to the "native" console i.e. through vmware vsphere client all tests do work, even when the vsphere client has been closed in the meanwhile. (Obviously this way the native session is kept open, so this supposedly will be the reason for it to work).

Hope that helps...

Regards,
R.Oldenburg
Re: Running headless in virtual machine [message #742171 is a reply to message #739228] Thu, 20 October 2011 08:46 Go to previous messageGo to next message
Jens Theess is currently offline Jens TheessFriend
Messages: 5
Registered: August 2011
Junior Member
Like most ui testing tools, Jubula needs an active desktop session to work correctly. This means that your tests need to be run as a user with access to the desktop (i.e. not as a service) and that the desktop must not be locked.

Most Windows versions only allow one active desktop session at a time. This means that when you log in using RDP, the local desktop will be locked. Once you terminate the RDP session, it's desktop session is also terminated. At this point, there's no active desktop session anymore. Also, when the RDP window is minimized on the client, the desktop on the server does not redraw by default. There's a work-around for this using a registry setting, which unfortunately must be set on the client side.

We do the following:

  • Use autologin to log in the user running the tests.
  • Disallow RDP sessions.
  • Use VNC (TightVNC) or the remoting capability of our VM server (XenServer) to watch tests remotely.


Greeting,
Jens
Re: Running headless in virtual machine [message #742742 is a reply to message #742171] Thu, 20 October 2011 19:39 Go to previous messageGo to next message
R. Oldenburg is currently offline R. OldenburgFriend
Messages: 24
Registered: September 2011
Junior Member
We used "TweakUI" to set up automatic login with an dedicated user running the autagent service. This service needs the "interactive" flag to be allowed to use the currently open native session.
Autagent can be wrapped as a win service by using http://kenai.com/projects/winsw/pages/Home

Another trick for Win systems:
There are some "enhancements" Wink that allow more than one active sessions on today's windows systems.
Google is your friend.

That way it is still possible to connect via rdp with another user.
Regards,
R.O.
Re: Running headless in virtual machine [message #1090690 is a reply to message #723218] Tue, 20 August 2013 14:01 Go to previous messageGo to next message
Bob Jagger is currently offline Bob JaggerFriend
Messages: 4
Registered: June 2013
Junior Member
long time ago, but i'm now facing exactly the same problem like it is written at #1 (Windows Server 2008 R2 running).

Maybe there are now new information or preferred techniques known, which can help me?!

I also can't really interpret the solution with the native console at vSphere Client.


I hope someone can help me Smile
Re: Running headless in virtual machine [message #1092289 is a reply to message #1090690] Thu, 22 August 2013 15:16 Go to previous message
Tom Brus is currently offline Tom BrusFriend
Messages: 25
Registered: February 2011
Junior Member
We had exactly the same problem, windows is geared towards human user interaction, not auto/batch processing.

What I finally did is write and run a deamon on our linux box that brings up an rdp session to the windows box continuously. The rdp on linux runs in an X frame buffer in memory so it is completely human-less. You can then even make screen shots from the in-memory 'screen', either manually or at a certain interval. I did not manage to pull off video although it should technically be possible. Both machine run in AWS by the way.

The only downside is that when you connect to the windows machine by rdp manually you will be kicked after a while by the daemon. You can of course stop the daemon before a manual connect but that is more hassle.

If people are interested I could load the code up to github...

Tom
Previous Topic:Click at the current mouse position!
Next Topic:Problem with Component Names
Goto Forum:
  


Current Time: Sat Dec 20 20:12:59 GMT 2014

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

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