Ask a Question

Test runner exit code: -10 (Unable to create a user session).

Occasional Contributor

Test runner exit code: -10 (Unable to create a user session).



I have a CI environment with jenkins where I'm trying to configure TestExecute to run functional testes. I have three machines that I want to use as jenkins slaves. I had succes in prepare one of those machines and in this case, the tests are running fine, but, in the other ones, I'm getting the error message "Test runner exit code: -10 (Unable to create a user session)." and I have no more ideas how to proceed. 


Additional informations:


The jenkins is configured by jenkinsfile. The test stages are defined like this:



if ("${env.NODE_NAME}" == "SkyOne_QA"){

stage('Test Run Persona') {
    testcompletetest actionOnErrors: 'MAKE_FAILED',
    actionOnWarnings: 'MAKE_UNSTABLE',
    launchType: 'lcProject',
    project: 'nsjPersona',
    suite: 'TestesFuncionais.pjs',
    useTCService: true,
    credentialsId: cred


In one of those 3 machines, the tests are running perfectly. In both the jenkins slave agents are installed as a service and the testcomplete service have permissions to run in interactive session. Finally, I saw the document with instructions about how to prepare a machine to run tests. I tried to cunfigure those two machines like the document says, but I had no success. 


I hope you can help-me with this. 


Thanks a lot!


could you try adding in 'executorType': 'TE' into your build stage?

Otherwise if you have followed the documentation to prepare the jenkins nodes, I don't see why you should be getting the -10 exit code;

also if you could post the full console logs of the failure message from that build step that would be helpful as well

Justin Kim
Occasional Contributor

Hello, @hkim5!


Thanks for your reply. So, Isn't 'TE' the default value for executorType? Anyway, I'll change it to see if works. 


About the log, It's attached in this reply.


Thanks a lot for your help!

ok throwing out some ideas 

First can you remote into those Jenkins execution nodes and go into services to find the Jenkins-slave service?

Within properties-logon tab you should see that the below setting is shown with the checkbox enabled


Also- make sure that the credentialsID field that you provided within your pipeline script (with the variable you set as "cred" has admin credentials on those execution machines)


also worth mentioning: make sure that TestComplete 14 service is also running on the execution machines. Browser the documentation here to troubleshoot to see if firewalls or antivirus is blocking that service from running on the execution machines.


Then also go into the file explorer to find the directory where your testexecute executable is installed on those execution machines (by default, this should be "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\Bin\")

rightclick select properties on the exe and change the compatibility settings such that you run the program as an admin for all users


Then go into the security tab of the exe and make sure that you have granted full rights to the system user (or any other user creds you would be using to start up the active user session)



Justin Kim

also worth mentioning is to make sure that TestComplete 14 service is running on those execution machines (you can also check by going into "services") you can check the documentation here to troubleshoot to see if there are firewall rules or antiviruses that are preventing that service from running on your execution nodes

Justin Kim
Occasional Contributor



I did most of your suggestions and it still not working. I'm applying the firewall rules now, but I think that is not the problem, because, if I log in those machines by RDP and start the tests in jenkins, it works. That is, I think that the problem occurs when jenkins tries to create an interactive session. 


The services were configured correctly like your suggentions, but, the executable's permissions not. I adjusted it, but, it still not working. 


When I create the firewall rules and test it, I come back here to post the result.



Hello again, @hkim5!


I changed the firewall rules as the document that you posted suggents and it still not working. Would you have any other ideias? Because I don't know what to do anymore.


Thanks a lot!

I found something in one of those machines. It's about a certificate. The screenshots are attached.

ok did some more digging as a last ditch effort before we suggest a support ticket for the trace logs and etc.

have you seen this doc here - specifically related to enabling remote desktop connections, configuring group policies, and disabling secure sign in?

depending on the windows OS that your jenkins execution nodes are on, you will need to go into the group policy editor to modify/enable/disable certain policies. (sounds like a security issue, so im guessing this is going to be related to #3 item within the configure group policies articles in the linked doc above)

Justin Kim
Occasional Contributor

Hello again, @hkim5!


I oppened a support ticket, but they didn't solve the problem yet. 


I changed those group policies in both computers and they still not working. 


About the certificate problem, I opened a ticket for the internal IT department. But this problem occurs only in one machine.  On the other, there's no certificate message.


The aqTraceLog, on the machine without certificate error, showed this error:


2020-12-21 15:50:03.697 16228 GetActiveRDPSessionIDs: Session list
2020-12-21 15:50:03.697 16228 ID Name State User Domain Client Address
2020-12-21 15:50:03.699 16228 0 Services Disconnected
2020-12-21 15:50:03.700 16228 1 Console Connected
2020-12-21 15:50:03.700 16228 6 Session#75 Active Parceiro NAS-APP-2019 NAS-APP-2019
2020-12-21 15:50:03.700 16228 65536 Session Listen
2020-12-21 15:50:03.700 16228 0 new sessions
2020-12-21 15:50:03.700 16228 CtcStationRDPSession::Initialize: LogOn failed with error Application exception: Windows session not found.
2020-12-21 15:50:03.700 16228 CtcStationRDPSession::FinalRelease
2020-12-21 15:50:03.700 16228 RDP session finalizing, hwnd=0x00B5004C
2020-12-21 15:50:03.700 8724 RDP window destroying
2020-12-21 15:50:03.871 8724 RDP control thread exit


Can you interpret this?

Showing results for 
Search instead for 
Did you mean: