Test runner exit code: -10 (Unable to create a user session)
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Test runner exit code: -10 (Unable to create a user session)
Hi,
I am getting an error in Jenkins when trying to run/build a TestComplete project. See the full build logs including the error that appears below:
Started by user admin Running as SYSTEM Building on master in workspace C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\TestCompeleteCheck [TestComplete] The test execution started (TestCompleteExampleTest). [TestComplete] Found TestComplete/TestExecute installations: Type: TC, Version: 14.80.627.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\bin\TestComplete.exe" Type: TELite, Version: 14.80.627.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 14\x64\bin\TestExecuteLite.exe" [TestComplete] Selected TestComplete/TestExecute installation: Type: TC, Version: 14.80.627.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\bin\TestComplete.exe" [TestComplete] Launching the test runner. $ '"C:\Program Files (x86)\SmartBear\TestComplete 14\bin\TestCompleteService14.exe"' //LogonAndExecute //lDomain: "" //lName: "" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestComplete 14\x64\bin\TestComplete.exe" C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\TestCompeleteCheck\TestCompleteExampleTest\TestCompleteExampleTest.pjs" /run /SilentMode /ForceConversion /ns /exit /ExportLog:C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\TestCompeleteCheck\1618931950146.tclogx /ExportLog:C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\TestCompeleteCheck\1618931950146.htmlx /ErrorLog:C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\TestCompeleteCheck\1618931950146.txt /JenkinsTCPluginVersion:2.6.2"' [TestComplete] Test runner exit code: -10 (Unable to create a user session). [TestComplete] [WARNING] Unable to find the log file "1618931950146.tclogx". [TestComplete] [WARNING] Unable to find the log file "1618931950146.htmlx". [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 (TestCompleteExampleTest). Build step 'TestComplete Test' changed build result to UNSTABLE Finished: UNSTABLE
I followed the documentation: https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/running-tests.html to make the tests and also followed the documentation: https://support.smartbear.com/testcomplete/docs/working-with/integration/jenkins/requirements-and-li... so I'm unsure as to where I went wrong.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @steventwerd
Hope you are well.
Its hard to say as it could be a number of areas in your build.
The starting point would be the TC item.
Have you used the correct project file directory including the ".pjs" part?
From there is the project correctly specified or are you executing the entire suite?
In the TestComplete Build what is configured in the in the "Advanced" section?
Do you have the interactive session configured .
Is the user you have used configured correctly?
Is there an active session configured?
Let me know and I can try to help further 🙂
KR
Vinnie
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vinnie,
When I run the command: TestComplete.exe "C:\Jenkins\TestCompleteExampleTest\TestCompleteExampleTest.pjs" /run
in the command line the tests run and for the project suit file path I used the same path so I'm sure the directory is correct.
I am executing the entire suit.
In the advanced section I have:
Test Runner: TestComplete
Version: Latest
Action on warnings: none
Actions on Error: Mark as FAILED
Use test timeout: Unchecked
Run interactive user session (TestComplete/TestExecute 10.6 or later is required): Checked
Credentials: None
Use Active session: Checked
Session screen resolution: 1280x1024
Generate MHT log file: Unchecked
Generate JUnit-style report: Checked
The user I have used I can't say if I have done it correctly but I thought I had. ~I followed the steps in the documentation:
On your Jenkins node, set the System properties > Remote > Remote Desktop option to:
In Windows 10 and Windows 8 – Allow remote connections to this computer.
In Windows 7 – Allow connections from computers running any version of Remote Desktop (less secure).
Add a user account under which you will run tests on the node to the Remote Desktop Users group.
Make sure that the user account has a non-empty password.
For the user account I used the MyPCName\Steven, not sure what the last point about non-empty password meant though.
Hope this helps.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the build config youll need to conifigure a user.
Add a user that will be used for the interactive session. (Credentials)
Whether thats a test user or your own AD user as long as its valid and has relevant permissions you should be good.
Try that and let me know how it works
KR
Vinnie
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Vinnie,
That did work, I'll admit I am/was a bit confused as to what credentials it was talking about so if anyone who has the same issue as me reads this, the credentials I used where the username and password to log into my windows desktop.
Thanks again Vinnie. Finally got Jenkins all set up and running recorded TestComplete tests periodically. 🙂
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm experiencing the same issue on our server. However, I have tried a number of different users, both AD domain users as well as local users on the server. None of them have worked for me. All user credentials tried are able to log on to the server. I get the same issue, whether using the Test Execute or Test Complete call.
Any ideas?
Here's the console output -
Started by user admin
Running as SYSTEM
Building in workspace D:\Jenkins\workspace\Test Build
[TestComplete] The test execution started (Test Suite wsapp5757/Test Project wsapp5757/KeyWordTests|Test1).
[TestComplete] Found TestComplete/TestExecute installations:
Type: TC, Version: 14.61.294.7, Path: "C:\Program Files (x86)\SmartBear\TestComplete 14\x64\bin\TestComplete.exe"
Type: TE, Version: 14.80.627.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"
Type: TELite, Version: 14.80.627.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 14\x64\bin\TestExecuteLite.exe"
[TestComplete] Selected TestComplete/TestExecute installation:
Type: TE, Version: 14.80.627.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"
[TestComplete] [WARNING] The custom screen resolution will be ignored if the active session is used.
[TestComplete] Launching the test runner.
$ '"C:\Program Files (x86)\SmartBear\TestExecute 14\bin\TestCompleteService14.exe"' //LogonAndExecute //lDomain: "wsapp5757" //lName: "psoadmin" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe" "D:\Test Complete Projects\Test Suite wsapp5757\Test Suite wsapp5757.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:D:\Jenkins\workspace\Test Build\1620884294774.tclogx" "/ExportLog:D:\Jenkins\workspace\Test Build\1620884294774.htmlx" "/ErrorLog:D:\Jenkins\workspace\Test Build\1620884294774.txt" "/project:Test Project wsapp5757" /test:KeyWordTests|Test1 /DoNotShowLog /JenkinsTCPluginVersion:2.6.2"' //lSessionScreenWidth: "1920" //lSessionScreenHeight: "1080"
[TestComplete] Test runner exit code: -10 (Unable to create a user session).
[TestComplete] [WARNING] Unable to find the log file "1620884294774.tclogx".
[TestComplete] [WARNING] Unable to find the log file "1620884294774.htmlx".
[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 (Test Suite wsapp5757/Test Project wsapp5757/KeyWordTests|Test1).
Build step 'TestComplete Test' changed build result to UNSTABLE
Finished: UNSTABLE
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, just reporting that I did manage to get it working. The issue was actually a corrupted x64 installation. Couldn't do a clean uninstall either, so had to do it manually and copy over a clean install from another server, e.g. files, folders, registry settings, etc. But it works now.
