Forum Discussion

Irvingoliveira's avatar
Irvingoliveira
Occasional Contributor
5 years ago

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

Hello!

 

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:

 

def cred = 'TESTECOMPLETE_CRED'

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

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

    • Irvingoliveira's avatar
      Irvingoliveira
      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!

      • hkim5's avatar
        hkim5
        Staff

        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)