Jenkins build error "The operation cannot be performed, because the user session is disconnected."
I have a test environment where a remote server (Windows 2019 server) with Test Execute/Complete is controlled using a Jenkins Instance on a Linux server. Jenkins uses the TC plug-in, it uses a Jenkins agent running on the remote server to allow control. The remote windows server has been configured as per the instructions here https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/requirements-and-li...
The Jenkins plug-in uses the Run interactive user session checked and uses a valid username and password.
With the remote server open via a RDC the TC test suite executes successfully when triggered from the Jenkins application, when I lock or close the remote server TC successfully executes test cases that use API/Service interfaces but the Tests that use the actual AUT (application under test) UI return the error "The operation cannot be performed, because the user session is disconnected"
Does anybody have any further debug/config changes that is required to resolve my issue? Thanks
Solved! Go to Solution.
Hi @iaryan ,
Since you close your connection your user is no longer available. The way I have handled this is by having a disconnect file which keeps the user available. I have shared the file, you will need to edit it and run it with administrator rights. This should solve your problem.
P.S this is obviously a text file you will need to change it after editing it to a .exe extension.
Thanks for the suggestion, I am using the Jenkins plug-in for Test Complete which I understand maintains a user account open for the execution, the Test Complete tests that do not use the application under test UI (these use rest services) are successfully executed as part of a CI run daily but its the UI based tests that return the error message. I can see in the log successful user access for the virtual machine I am using.
What error do you encounter then exactly? If you could tell us the error that comes up for the UI test cases. Because the plugin does not create a connection it only uses the active one.
The error is "The operation cannot be performed, because the user session is disconnected" so assuming because the non UI tests (rest services) are executed successfully then the connection is active?
@iaryan I've found a couple of articles that might be of help to you, please take a look:
A 'solved' community thread - The operation cannot be performed, because the user session is disconnected
Let us know if you find useful insights there.
Community and Education Specialist