Page 1 of 1

Support for login and logout of windows

Posted: Thu May 08, 2014 2:14 pm
by yflint
Hi,
I hope I'm posting in the right area in the forum.
I am looking for a way to support tests that include logout and login to windows.
I want to conduct tests on one windows user and then logout and login with another user and run the same tests again.
Thank you

Re: Support for login and logout of windows

Posted: Mon May 12, 2014 4:15 pm
by Support Team
Hi yflint,

In my opinion no test software is able to logout and then login on the same machine since the test application will be closed after logging out. but it may be able to split the test up.
One part could make the login and logout by using remote control and the other part could run on the specific application to execute the specific machine related steps.
So it may work when you remote connect to the machine somehow start the test and login and then logout by using image based automation, but this is not really recommended but maybe the only chance to automate such a scenario.

Regards,
Markus

Re: Support for login and logout of windows

Posted: Mon May 12, 2014 4:47 pm
by krstcs
I agree with Markus. It is not possible, given the way Windows is designed, to do this with any UI automation system.

I would recommend that you look into using a continuous integration solution such as Jenkins. You can set Jenkins to run your test, then run a batch file (powershell works well) that logs the user off. You can have another script that is run on a different system that uses remote desktop to log into the systems before the next test. Try using "rdp.exe" (do a search for it) as it will allow passing username/password into the rdp session for login.

The process would look like this in the Jenkins job(s):

1. (Job 1) On master (Windows) system, run "rdp.exe /v:<address or hostname of test system> /u:<username> /p:<password>". (You can parameterize the address/username/password in the job.)
2. (Job 2) On the system under test, run your test application.
3. (Job 2) On the system under test, run the logoff script.
4. Repeat 1-3 as needed for users.