Forum Discussion

mortenb123's avatar
mortenb123
Contributor
5 years ago

testexecute from scheduler possible to activate desktop session

Until recently we have been running tests inside an always open vmware player guest host, but is there a way for testexecute to activate a desktop session from task scheduler. Running directly from task scheduler gives me a session locked.

Company domain polices prevents me from overriding power and sleep.

  • AlexKaras's avatar
    AlexKaras
    5 years ago

    mortenb123 :

    Hi,

     

    I did not use SessionCreator, so wondering whether created session closes when test run is over or remains open?

    If the latter, you may consider scenario to open a user session using SessionCreator and run some dummy test. Then use your CI tool to start real test run in the already existing session as usual.

     

    • mortenb123's avatar
      mortenb123
      Contributor

      Thanks Reshail , even as local administrator (laps) I only have 3 entries in

      Group policies: Computer Configuration\Administrative Templates\System\Logon

      which only relates to running scripts on login.

       

    • mortenb123's avatar
      mortenb123
      Contributor

      thanks hkim5, session-creator does not propagate other parameters to the tests, we have lots of parameters we forward to the test complete environment.

      I never got it to run, it does not have the /run parameter, my tests never starts.

       

      I have command line scripts for both testcomplete and testexecute and they both need the /run parameter to actually start.

       

      Below are my startup scripts, as you see there are a lots of own parameters that we pick up with a parser and put into Project.Variables,

      session parameters like /UseSameSession /useSessionN should be built into the testexecute binary. because this is what is started form task-scheduler.

       

      start from test execute:

       

      & "C:\\Program Files (x86)\\SmartBear\\TestExecute 14\\x64\\Bin\\TestExecute.exe" "C:\\SharedArea\\TestAutomation_test4\\TestProject\\LraTestProjectSuite.pjs" /r /p:EpicIteration /lraenvironment:SemiReal /lrapath:"C:\\SharedArea\\TestAutomation_test4\\TestedApp" /lrapathlocal:"C:\\SharedArea\\TestAutomation_test4\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\local-test4.config" /lrapathbuypass:"C:\\SharedArea\\TestAutomation_test4\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\buypass-test4.config" /lrapathmixed:"C:\\SharedArea\\TestAutomation_test4\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\mixed-test4.config" /e /el:"C:\\SharedArea\\reports\\SemiReal\\Win10-202003061024\\index.mht" /testUsersDatafilePath:"C:\\SharedArea\\TestAutomation_test4\\TestProject\\Stores\\Files\\mobjtest-test4.json" /executionTime:"202003061024" /ErrorLog:"C:\\SharedArea\\reports\\SemiReal\\Win10-202003061024\\errors.log" /ForceConversion /SilentMode

       

       

      start from test complete:

      & "C:\\Program Files (x86)\\SmartBear\\TestComplete 14\\x64\\Bin\\TestComplete.exe"C:\\SharedArea\\TestAutomation_8065\\TestProject\\LraTestProjectSuite.pjs /r /p:EpicIteration /lraenvironment:SemiReal /lrapath:"C:\\SharedArea\\TestAutomation_8065\\TestedApp" /lrapathlocal:"C:\\SharedArea\\TestAutomation_8065\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\local-test22.config" /lrapathbuypass:"C:\\SharedArea\\TestAutomation_8065\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\buypass-test22.config" /lrapathmixed:"C:\\SharedArea\\TestAutomation_8065\\TestedApp\\LraClient.exe /appconfig:TestConfigs\\mixed-test22.config" /e /el:"C:\\SharedArea\\reports\\SemiReal\\Win10-2020.03.06_10-24-50\\index.html" /testUsersDatafilePath:"C:\\SharedArea\\TestAutomation_8065\\TestProject\\Stores\\Files\\mobj-test22.json" /executionTime::"2020.03.06_10-24-50" /ErrorLog:"C:\\SharedArea\\reports\\SemiReal\\Win10-2020.03.06_10-24-50\\errors.log" /ForceConversion /SilentMode /exit

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        mortenb123 :

        Hi,

         

        I did not use SessionCreator, so wondering whether created session closes when test run is over or remains open?

        If the latter, you may consider scenario to open a user session using SessionCreator and run some dummy test. Then use your CI tool to start real test run in the already existing session as usual.