Tuesday, June 18, 2013

Running UI Tests from Jenkins

Usually Jenkins is run as a service while automated UI testing requires active user session.

We faced the problem when we implemented automated UI testing integration with Jenkins.

The solution we applied is installing jenkins.war in tomcat and run tomcat from a user session.

The problem isn't finished there. UI testing requires you always logged in and desktop unlocked.

We need to keep the session alive so that whenever a build starts it can interact with desktop.
We use VDI(Virtual Desktop Infrastructure) in Hyper-V which can keep a session always alive and unlocked.

But when we remotely connect to the session for some maintenance and disconnect again, the session gets locked again.
We used to manually unlock the session from the host server until we found the following solution in stackoverflow .

To keep to session alive after disconnection from Remove Desktop.
Enter following command in cmd prompt.
TSCON {sessionid | sessionname} /DEST:CONSOLE
You can get the sessionid or sessionname with following command
query session
 Example: TSCON 1 /DEST:CONSOLE
 

No comments:

Post a Comment