Forum Discussion

omkarp1's avatar
omkarp1
Frequent Visitor
4 days ago

SessionCreator : Failed to create the process. Unspecified error

I'm currently integrating TestComplete tests into an Azure DevOps CI/CD pipeline, and I'm facing an issue when running the tests using SessionCreator via a self-hosted agent on a Windows VM.

Test Tool: TestComplete 15 
Azure DevOps Agent: Self-hosted, installed as a Windows service
Execution Mode: I'm using SessionCreator.exe in the pipeline with /UseActiveSession and login credentials
Pipeline YAML: 

& "C:\Program Files (x86)\SmartBear\TestComplete 15\bin\SessionCreator.exe" RunTest `
  /UseActiveSession `
  /UserName:$env:USERNAME `
  /Password:$env:PASSWORD `
  /ScreenResolution:1920x1080 `
  /Timeout:600 `
  /ProjectPath:$env:PROJECT_PATH `
  /project:$env:PROJECT_NAME `
  /ExportLog:"$env:LOGPATH\TestLog.mht"

Problem

After configuring the agent and restarting the machine, the agent comes online. However, when the pipeline runs, I get this error:

SessionCreator : Failed to create the process.
Unspecified error
SessionCreator failed with exit code 7
PowerShell exited with code '1'

What I’ve Tried

  1. The agent is running as a Windows service under an admin account.
  2. I enabled SERVICE_SID_TYPE_UNRESTRICTED when configuring the agent
  3. I made sure the session was active via RDP during execution
  4. I verified that the specified username/password has local admin rights
  5. If I run the pipeline while the agent is launched interactively (via run.cmd), everything works fine.
  6. I have configured all the related requirements from here [Session Creator Official Documentation].
  7. Also tried Manually configuring the agent and added a shortcut to run.cmd in the Startup folder, so it launches automatically on boot.
    Verified that tests run fine when I manually connect via RDP and start the agent using run.cmd
    But the pipeline still fails after a VM restart, even though the agent comes online—unless I manually RDP into the session again.

Ideal Outcome

A fully automated pipeline where the VM starts, the agent launches, and GUI tests run without any human logging into the VM.

Any help or proven configuration tips would be hugely appreciated!

2 Replies

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    If you are using a 64 bit machine, then use command,

    'C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\SessionCreator.exe'

    Screen resolution defined as,

    /ScreenResolution:"1920*1080"

    Export result as HTML,

    /ExportLog:"C:\MyAutomation\Log\index.html"

    You could also include,

    /ExportSummary:"C:\MyAutomation\Log\SummaryReport.html"

    These are the parameters that I use in my PowerShell script file, which is called by the Azure Pipeline.

    I'm assuming you have set up your Azure Agent to automatically log into the machine after a restart? Or you have set up your machine to auto-login?

    Known Issues

    • If your test workstation is running under a non-server version of Windows and a session for the user account under which you want to run your test is already open on the workstation, use the /UseActiveSession argument to command the utility to connect to the existing session. Otherwise, the testing will not start.
    • If you run tests under a user account other than the one under which the utility is launched, the utility will not be able to open the needed user session. To avoid the issue, launch the utility in Session 0 (an isolated Windows session for services), or use a server edition of your Windows OS to run tests.

    Exit code 7, relates to "Failed to run TestComplete (or TestExecute)."

  • As a sanity check, can you change the credentials of the windows service so that it runs under the "local system account" instead of a specific admin account? Good to check just to confirm that this is not a specific user permission problem.