Jenkins and logging into PC
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jenkins and logging into PC
I have the Jenkins test complete plugin. It all works fine except when it tries to log into the PC it runs Test complete on.
If I log into this PC and leave it unlocked the job passes fine when the jenkins agent runs.
If I am not logged in no matter how I configure the plugin the job fails as it cannot create a session. Any ideas as from a security aspect I cannot leave machines logged in and unlocked.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You *must* be logged-in with not locked desktop in order your tested application can display its GUI that TestComplete can interact with.
The above is not TestComplete's requirement but basic behavior of the Windows OS.
It is a matter of your permissions how to implement the above requirement and there are a lot of options possible:
-- If you are a local admin for the test machine, you may remotely set it to automatically log in as some user, reboot it remotely, wait until it reboots and logs in, remotely start tests, wait until tests finish and log out;
-- Use test machines that do not have monitors and accessed only via remote desktop (with the permission to connect granted only to certain accounts);
-- Use virtual machines;
-- Physically put test machines into restricted access area;
-- ...
/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.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
How would I go about this option as I am admin on that machine:
"If you are a local admin for the test machine, you may remotely set it to automatically log in as some user, reboot it remotely, wait until it reboots and logs in, remotely start tests, wait until tests finish and log out;"
Is this done through the same Jenkins as well I presume? Sorry for questions as have struggled to find anything. Even a steer in right direction would be appreciated.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to flow the steps mentioned in the below section.
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks both for your help 🙂
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What does your Test Complete step look like in your current jenkins config? There should be an option to use an interactive user session.
Thanks,
Carson
Click the Accept as Solution button if my answer has helped
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have interactive session enabled. Everything configured as per thread above.
When I run the job through jenkins I get:
02:02:36 [TestComplete] The test execution started (EnterpriseAutomatedTests/RegressionTests/NGSInstall/NGS01_01_01_Install_NGS). 02:02:36 [TestComplete] Found TestComplete/TestExecute installations: 02:02:36 Type: TC, Version: 12.42.3048.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\TestComplete.exe" 02:02:36 [TestComplete] Selected TestComplete/TestExecute installation: 02:02:36 Type: TC, Version: 12.42.3048.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\TestComplete.exe" 02:02:36 [TestComplete] Launching the test runner. 02:02:36 $ '"C:\Program Files (x86)\SmartBear\TestComplete 12\bin\TestCompleteService12.exe"' //LogonAndExecute //lDomain: "intern" //lName: "snejad" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestComplete 12\x64\bin\TestComplete.exe" C:\Sandbox\AutomatedTests\EnterpriseAutomatedTests\EnterpriseAutomatedTests.pjs /run /SilentMode /ForceConversion /ns /exit /ExportLog:C:\Jenkins\TestNode1\workspace\TestNode1_Deploy\6156323.tclogx /ExportLog:C:\Jenkins\TestNode1\workspace\TestNode1_Deploy\6156323.htmlx /ErrorLog:C:\Jenkins\TestNode1\workspace\TestNode1_Deploy\6156323.txt /ExportLog:C:\Jenkins\TestNode1\workspace\TestNode1_Deploy\6156323.mht /project:RegressionTests /unit:NGSInstall /routine:NGS01_01_01_Install_NGS"' 02:04:36 [TestComplete] Test runner exit code: -10 (Unable to create a user session). 02:04:36 [TestComplete] [WARNING] Unable to find the log file "6156323.tclogx". 02:04:36 [TestComplete] [WARNING] Unable to find the log file "6156323.htmlx". 02:04:36 [TestComplete] [WARNING] Unable to find the log file "6156323.mht".
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Possible causes:
- You might have active RDP connection of that VM in your local.
- Double check the credentials
- Make sure you configured this topic correctly.
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Checked all of that and its fine.
It only works if I am already logged in. If noone is logged in it fails with the above error
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> It only works if I am already logged in.
This is correct and as expected.
One more time: Active, interactive, not locked user session must exist before starting tests and tests must be started within this session.
How to provide such session is another question with different possible options. For example:
-- Configure test box to login automatically when turned on;
-- Login manually and do not lock session;
-- Use the remote administration means to login remotely.
/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.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
