Here's another interesting story about type of problems we've to deal at Browserling and Testling. This story is about how we implemented Windows user session cycling for Testling.

Here's what it is.

We run JavaScript tests on Windows for days straight and Windows sessions become really unstable after a while. When that happens we start getting errors such as Internet Explorer timing out randomly although everything is fine:


Internet Explorer cannot display the website

Or remote desktop connection gets messed up and I'm no longer able to get into the server:


Remote Desktop can't connect to the remote computer

Or Chrome starts to randomly crash:


Aww snap

None of these errors happen when the Windows session is fresh, so to work around these issues we implemented a Windows session cycler that simply logs out the user that runs tests, and logs it back in again every 6 hours. The implementation is pretty straight forward and just uses the standard Windows command line tools for managing users, such as users.exe and logoff.exe, as well as rdesktop.exe.

The user cycler is about a 100 line program but here's how it basically works:

user_id = find user id of testling user using users.exe
call <logout.exe user_id>
wait until user has been logged off
login testling user again using rdesktop.exe

The testling user's startup script initializes the testing environment and tests continue running after a short interruption.

A better solution would be to boot a clean Windows instance for every test but we're not there yet. Until next time.

Comments

February 12, 2014, 08:37

I'm diverting with this content and I take into consideration I'll advantage from this study. give thanks you really a great deal.

Allen Peterson Permalink
February 25, 2014, 12:39

IT professionals and students always deal with tough programming. When they are going to introduce their program before others then it is very necessary for them to get prepared their assignments and presentations. If you think you are unable to complete it on time then you can ask to write essays for me to the professional writers and on the next way get the well written papers.

March 05, 2014, 09:14

Yes that is a good idea to start...

March 23, 2014, 02:37

Great post which help me lot..
thanks...

April 12, 2014, 11:16

I wanna appreciate you for this great effort.

April 15, 2014, 06:10

that is very great idea start i will take help from this post i really happy from.

Leave a new comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.

Advertisements