Unable to Schedule Unattended Tests with Jenkins
[TestComplete] Launching the test runner.Everything in the logs look good, but when TC is supposed to launch, it never does. The test will sit in this state indefinitely.
If you were to run that batch file manually, does it run?
What's the exact command in your batch file?
Are you running TestComplete, TestExecute or SessionCreator?
Have you read through Running Tests via Remote Desktop?
@rraghvani Yes, it runs as expected if I run the batch file manually. I would rather not use the batch file route, because I'll lose the benefits of the TestComplete plugin.
Here's the simple batch file:
REM Change to the TestComplete installation directory
cd C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin\
REM Launch TestComplete
TestComplete.exe /run /project:"C:\Jenkins\workspace\QA_Server_Regression_Pipeline\Framework\Suite.pjs"
This is being ran with TestComplete and yes, I've read through that documentation. It does not seem to provide solutions on how to run tests while the RDP session is disconnected. They provide a solution where a batch file disconnects the session before running the tests, but not a solution that would allow me to keep a RDP session disconnected for multiple separate test runs (e.g. nightly test runs)
Thanks for your help,
> The Jenkins agent Windows service [...]
> how to run tests while the RDP session is disconnected.
GUI applications technically might run on disconnected RDP session, but cannot render their GUI. This is not a limitation of TestComplete but essential behavior of Windows OS.
What you must do:
a) Setup your test box to auto logon when turned on;
b) Setup Jenkins agent to run not as Windows service, but as regular application and set it to be started when your test account logs on (during step a) );
c) Never disconnect RDP session but instead switch it to system console as described in the documentation that you mentioned. (Note: command file provided in the documentation MUST be executed using elevated permissions (Run As Administrator) in order to work as expected.)
/Alex [Community Champion]
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Also, to add from @AlexKaras see the following posts,
Just curious, what plugins will you lose?
@AlexKaras @rraghvani Thanks for the suggestions. Possible solutions A and B, could be a good option we adopt down the line. For the time being, if we connect to the remote desktop, we'll just need to make sure we disconnect from the RDP session using one of the disconnect options from the TestComplete documentation. (https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlock...).
I was incorrect in saying "They provide a solution where a batch file disconnects the session before running the tests, but not a solution that would allow me to keep a RDP session disconnected for multiple separate test runs".