Ask a Question

How to fix Unable to create a user session using jenkins in TestComplete

Loganathan
Occasional Contributor

How to fix Unable to create a user session using jenkins in TestComplete

1. Start Jenkins in Mypc.

2. Create a node successfully.

3. Take another pc to enter my jenkins with created node url (ipaddress:8080/computer/TestNode/)

4. Connect the Jenkins slave-agent

5. Create a new job and build

 

Actual Result:

 

Started by user anonymous
Building remotely on Node in workspace C:\Windows\system32\workspace\Dummy

[TestComplete] The test execution started (Local Demo).
[TestComplete] Found TestComplete/TestExecute installations:
Type: TC, Version: 11.20.1491.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe"
[TestComplete] Selected TestComplete/TestExecute installation:
Type: TC, Version: 11.20.1491.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe"
[TestComplete] Launching the test runner.
$ '"C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestCompleteService11.exe"' //LogonAndExecute //lDomain: "" //lName: "ravipc" //lPassword: ******** //lTimeout: "300000" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe" "C:\Windows\system32\workspace\Dummy\Local_Demo\Local Demo.pjs" /run /SilentMode /ForceConversion /ns /exit /ExportLog:C:\Windows\system32\workspace\Dummy\5846064.tclogx /ExportLog:C:\Windows\system32\workspace\Dummy\5846064.htmlx /ErrorLog:C:\Windows\system32\workspace\Dummy\5846064.txt /ExportLog:C:\Windows\system32\workspace\Dummy\5846064.mht /Timeout:120"'
[TestComplete] Test runner exit code: -10 (Unable to create a user session).
[TestComplete] [WARNING] Unable to find the log file "5846064.tclogx".
[TestComplete] [WARNING] Unable to find the log file "5846064.htmlx".
[TestComplete] [WARNING] Unable to find the log file "5846064.mht".
[TestComplete] [WARNING] Errors occurred during the test execution.
[TestComplete] Marking the build as UNSTABLE.
[TestComplete] [WARNING] Unable to publish test results (xml data is empty).
[TestComplete] The test execution finished (Local Demo).
Build step 'TestComplete Test' changed build result to UNSTABLE
Finished: UNSTABLE

7 REPLIES 7
TanyaYatskovska
SmartBear Alumni (Retired)

Hi Loganathan,

 

Did you follow all the steps listed in the Preparing Jenkins for Running TestComplete tests ( http://smartbear.com/viewarticle/70333/ ) article?

Also, please pay attention to the requirements and limitations, which are described here: https://support.smartbear.com/viewarticle/75506/

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Tried configuring all these above listed settings still getting same error..

 

[TestComplete] Found TestComplete/TestExecute installations:
	Type: TC, Version: 11.31.2420.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe"
[TestComplete] Selected TestComplete/TestExecute installation:
	Type: TC, Version: 11.31.2420.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe"
[TestComplete] Launching the test runner.
$ '"C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestCompleteService11.exe"' //LogonAndExecute //lDomain: "" //lName: "vwagh" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "false" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestComplete 11\bin\TestComplete.exe" D:\AutomationDir\INDMS\Suits\InDMS\InDMS.pjs /run /SilentMode /ForceConversion /ns /exit /ExportLog:C:\jenkins_slave\workspace\INDMS_GUI_SMOKE\5901695.tclogx /ExportLog:C:\jenkins_slave\workspace\INDMS_GUI_SMOKE\5901695.htmlx /ErrorLog:C:\jenkins_slave\workspace\INDMS_GUI_SMOKE\5901695.txt /project:SMOKE"'
[TestComplete] Test runner exit code: -10 (Unable to create a user session).
[TestComplete] [WARNING] Unable to find the log file "5901695.tclogx".
[TestComplete] [WARNING] Unable to find the log file "5901695.htmlx".
[TestComplete] [WARNING] Errors occurred during the test execution.
[TestComplete] Marking the build as UNSTABLE.
[TestComplete] The test execution finished (InDMS/SMOKE).
Build step 'TestComplete Test' changed build result to UNSTABLE
Finished: UNSTABLE
magi-i-luften
Occasional Contributor

Hi

 

Any solution to this issue?

 

I'm also facing the exactly same problem.

I'm able to start TestExecute 12 (version: 12.10.602.11) and manually start my project which uses Firefox 45.0.2 - with success.

But my job in Jenkins are still giving me the same error:

[TestComplete] Test runner exit code: -10 (Unable to create a user session).
[TestComplete] [WARNING] Unable to find the log file "1471179.tclogx".
[TestComplete] [WARNING] Unable to find the log file "1471179.htmlx".
[TestComplete] [WARNING] Unable to find the log file "1471179.mht".
[TestComplete] [WARNING] Errors occurred during the test execution.
[TestComplete] Marking the build as FAILED.
[TestComplete] [WARNING] Unable to publish test results (xml data is empty).

 

I'm using Jenkins version 2.32.1 and TestComplete support plug-in version 1.6.

 

Anybody help out there?

 

Best regards

Jens

Hi Jens - If you are trying to run batch in remote system(Node) then try with Checkbox {Run interactive user session & Use active session} enabled and also pass system credentials..

 

Thanks,

Kavan 

magi-i-luften
Occasional Contributor

Hi Kavan

 

Thank you for answering me - I appreciate any kind for help 🐵

 

I think it's a rather "simple" setup I have:

Windows Server 12 R2 - my Jenkins-master.

On the server I also installed TestExecute 12.

 

I don't have any nodes but the master itself - shouldn't it be possible to run the TestComplete job in such a constellation?

 

Attached you find my Jenkins-settings for the TestComplete-job.

As you can see on the settings, I use a service-account for the Test Runner - this user is domain-user and member of the administrator-group.

The Jenkins-service on the server is marked with "Allow service to interact with desktop".

 

What have I done wrong?

 

 

Jenkins settings for the TestComplete jobJenkins settings for the TestComplete job

Best regards

Jens

All looks good; can you try with adding domain name before username you entered?

 

Eg: Domain\svc_p_jenkins 

 

 

Thanks - Kavan

Hi Jens,

 

The most easy and reliable solution is to have a dedicated user account, specify this account for the test settings and guarantee that this given user is logged-in interactively before the test is started.

 

Actually, this has been discussed here a lot of times and the problem is not TestComplete-specific, but rather specific to the most of CI servers running non-interactively and tests that closely emulate end-user actions.

 

In a nutshell:

-- CI software usually runs non-interactively and do not interact with the desktop;

-- The fact that some account is allowed to interact with the desktop does not mean that account will be able and will be allowed to do this: account must have a permission to logon interactively; the user session for this account (the one that it will interact with) must already exist; etc.

-- Tests that interact with the UI require active interactive user session with the desktop - this is because otherwise the tested application will not be able to display its UI and tests will fail because the UI will actually be absent.

 

https://community.smartbear.com/t5/TestComplete-Desktop-Testing/TestComplete-with-Jenkins/m-p/126539... is a sample of the relevant discussion.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cancel
Showing results for 
Search instead for 
Did you mean: