Forum Discussion

ztilleto_1's avatar
ztilleto_1
Contributor
15 years ago

Winlogin from Scheduled tests

Hey, 



I have a setup where I would like to run nightly tests on a server, however as the server auto locks itself, Testcomplete isn't able to run the tests on the applications. I would like to know if someone have made a login script through testcomplete, so you log on with a user? 



Thanks in advance. 

  • Hi Mike,





    I recommend that you use the Network Suite feature to run tests on a slave computer. In TestComplete 8, this feature allows logging in to slave machines automatically. You can find information on this feature in the Distributed Testing help topic.
  • Hi and thanks for the answer, however this will mean I need to have another machine running TestComplete that isn't locked for it to work?

    I will figure out what we can do in regards to this, if there is a possibility to have another machine set up to do master tests on slaves.

  • Hi Mike,





    Yes, you need to have another machine with TestComplete or TestExecute in this case.





    Another way is to schedule the execution of the batch file that applies the following REG file to the registry and reboots the computer:



    Windows Registry Editor Version 5.00





    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

    "DefaultDomainName"="DOMAIN"

    "DefaultUserName"="USERNAME"

    "PowerdownAfterShutdown"="1"

    "LogonType"=dword:00000000

    "ShowLogonOptions"=dword:00000001

    "AutoAdminLogon"="1"

    "AutoLogonCount"="1"

    "DefaultPassword"="PASSWORD"

    "AltDefaultUserName"=""

    "AltDefaultDomainName"=""





    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]

    "TestComplete Test"="\"c:\\Program Files\\Automated QA\\TestComplete 8\\Bin\\TestComplete.exe\" \"C:\\My Tests\\MyProjectSuite\\MyProjectSuite.pjs\" /r /e /SilentMode"






    Replace DOMAIN, USERNAME and PASSWORD with the credentials of the account you want to start your test with. Also, modify the command added to the RunOnce registry key to make it run the correct project.





    Let me know whether this works for you.
  • Hi David, 



    Plenty of things have been altered since this. We upgraded to TC 8 to start up with, and moved it all to a separate machine dedicated to this, and have it set up to work as it should. So thanks for all the help in regards to this problem.



    regards,

    Mike