Search code examples
windowsjenkinsui-testingslavewhite-framework

Automating TestStack.White UI Testing in Windows Slave using Jenkins


First of all, I apologize if I am wasting your time, because it looks like a simple step which I am not able to figure out even after some research.

Ok, here is what I am trying to achieve, I have written some UI tests using TestStack.White, I would like to execute this on a Jenkins Slave as different user, since the application behaves differently based on the roles that are assigned to them in Active Directory.

So after doing a bit of lookup on google I found the following links which are relevant to what I am trying to achieve.

It looks like that I have to install TightVNC on Jenkins slave and should connect to slave from Jenkins Master and execute tests on slave.

Which brings me to my first question, how do I exactly achieve this from a Jenkins job?

About logging in as different users, I understand I can use to "autologon.exe" to achieve this. So just wondering how I can do this on the Windows Slave from Jenkins Master. My company doesn't allow SSH to Windows instances (slave machines), I cannot remotely execute SSH from Jenkins Master.

I understand that I may not be looking at this correctly, so any help would be much appreciated.

Thanks in advance for your time and advice.


Solution

  • Thanks all for your comments and answers, basically this is what I did to get it working for me,

    1. Establish VNC connection with a VNC Client on Jenkins slave, this was done manually not through Jenkins.
    2. Use an app called "Caffeine" to prevent windows from locking out, it simulates a key up event on F15 (every xx seconds) so there is no interruption with testing task in my project.
    3. Launch JNLP connection to the Jenkins Master and "Caffeine" app as a part of windows logon through VNC Connection.
    4. Close out of the VNC connection (not logging off), this was done manually not through Jenkins.
    5. Let the build run as different users using PSExec on the slaves.

    This seems to be working fine so far, I didn't reply sooner since I wanted to monitor the jobs for a few days before posting my reply here.