cancel
Showing results for 
Search instead for 
Did you mean: 

testexecute from scheduler possible to activate desktop session

SOLVED
Highlighted
Contributor

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: testexecute from scheduler possible to activate desktop session

@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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

5 REPLIES 5
Highlighted
Contributor

Re: testexecute from scheduler possible to activate desktop session

Hi,

You do need an interactive user session to run testcomplete/execute. We use jenkins to do what you're trying to achieve but you will still need a interactive user. 

I am not sure if this will help you but you could try this with a second user 

https://answers.microsoft.com/en-us/windows/forum/all/how-to-switch-user-without-logging-out/d657c65...

Highlighted
Staff

Re: testexecute from scheduler possible to activate desktop session

TestComplete's sessioncreater feature might be what you're looking for

https://support.smartbear.com/testcomplete/docs/working-with/automating/session-creator/index.html

Hope this helps.

Best,
Justin Kim
Highlighted
Contributor

Re: testexecute from scheduler possible to activate desktop session

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.

 

Highlighted
Contributor

Re: testexecute from scheduler possible to activate desktop session

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

 

Highlighted
Community Hero

Re: testexecute from scheduler possible to activate desktop session

@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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!