Forum Discussion

syedsafvan's avatar
syedsafvan
Contributor
16 years ago

Over Night Test Runs

I want to be able to run my tests over night in multiple environments. For this purpose I have created a batch file to trigger the test run and scheduled it in each environment.



Because I want to run on multiple environments I chose to RDP into each of them from my local machine (test development machine) one after another and get the runs finished. For this I scheduled all the RDP connections into each environment on my local machine.




Now as I said in beginning, the intention is a over night run and I want to come and check the results in the morning.

I know that TC does not interact with the GUI if the machine is locked and the suggestions that are given for this are either to RDP into the locked machine or to use virtual machine. 




What if the the machine that is attempting to RDP itself is locked? Obviously I cant keep my machine unlocked over night plus the companies security policies would not like that.




What do I do now? - I want the over-night run with out any human intervention when all the machines are locked. (Overnight run in true sense).







11 Replies

  • Hi Daniel,



    The details on how to organize overnight test runs depend on how your build and test processese organized and test environment.



    But I'll try to explain in general how to do that.



    1) Create a batch file that will execute test (and optinally make some preparation operations like update test sources from version control, copy latest builds, kill existing testexecute processes as they will prevent launching tests etc, you can also add logoff in the end to completely log off from the test machine after test).

    2) create an .rdp file on another machine, it should connect to your test machine via rdp:

    Start->Run - mstsc, or Start->All Programs ->Accessories -> Remote Desctop Connection. Make all settings you need (mark the password to be saved) and then save the rdp file  - 'save as'. Make sure that doubleclicking that file invokes remmote desktop automatically

    You can just set 'start program on connection' there to launch batch file from the step1, but it didn't work for me everyehere (at least it didn't on Vista and Windows 7 due to some strange bug), so if it won't for you you may use psexec utility to launch process remotely in the rdp session.

    3) Create batch file that launches this rdp file, and then (optionally, if 'launch program on connection' won't work) executes your test in remote session interactively with psexec (you should specify correct session number after 'i' parameter there).  

    4) Put it on schedule e.g using standard windows task scheduler.



    In my case the tests are triggered from build server after the nightly builds are ready - I made this with a separate automated build studio macro, but that's already another story...



    Regards,

    Pavel