Forum Discussion

MW_Didata's avatar
MW_Didata
Super Contributor
20 days ago
Solved

SessionCreator returns exitcode: 7 Failed to create user session

I currently have an issue on only 1 of my test machines where the testrun never starts and the exitcode is 7 with the message "Failed to create user session"

This machine runs 2 projects and has worked for about 2 years, now since January 6 it won't start the testrun anymore.

To go back to the basics I even made a new bacthscript to start the run with only the minimal required code.

"C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\SessionCreator.exe" RunTest  /Username:"<PCName>\<UserName>" /Password:"<Password>" /ProjectPath:"<PathToPJS>\<ProjectSuite>.pjs" /ScreenResolution:1920*1080 /Timeout:9000 /project:"<Project>"

 

I still cant get the testrun to start.

Windows taskscheduler starts the batch script, this does work, the batch script starts but when it comes time to start a new session sessioncreator returns code 7.

 

I've already created a support ticket,

But I'm hoping any of you might be able to help me further.

To me this seems like a windows setting that got changed somewhere in an update but i'm not sure.

The PC is running on the lastest Win11 25H2 update

  • Hello fellow testers,

    I sort of solved this issue so I'll let you know what I had to do to get my tests started again.

    I have a batchscript in taskmanager that restarts my PC.
    Then an other task that starts the tests planned about 15 min later.

    Since the testrun can no longer start on when the pc is locked/ logged off, 
    I've added a registry edit that automatically logs on the user.
    It can be added here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    add these keys:
    AutoAdminLogon  1
    DefaultUserName  {Your Username}
    DefaultPassword   {Your Password}
    DefaultDomainName  {Your PCs domain name}

    When the PC restarts it automatically logs on so it has a active session that SessionCreator/ testexecute can use.

    When the testing is done I've added a script that logs off the user.

    Unfortunately my other PC now also has this issue. It can no longer create a user session.
    2 of the 3 PCs i use now have this issue, I've disabled windows updates on the last working PC hoping it can still keep running as it is.


    It seems all the vibecoding in windows 11 is breaking more and more everyday.

    Please do let me know if anyone else starts having these issues. Maybe with more affected Smartbear can create a fix that solves this once and for all.

13 Replies

  • MW_Didata's avatar
    MW_Didata
    Super Contributor

    The issue only happens when the PC is locked. If I start the task while logged in the testrun does start.

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

      Hi MW_Didata​ as mentioned in Running Tests on Locked Computers,

      Tests that do not interact with GUI can be run on locked computers. GUI tests or tests that simulate user actions cannot be run on locked computers, since when the computer is working in this mode, the user session is frozen (no windows can be shown) and the testing engine cannot simulate user actions

      • MW_Didata's avatar
        MW_Didata
        Super Contributor

        Hello rraghvani​ What do you mean?

        The testrun does use the GUI, Taskscheduler starts a C# program (Or batch) and that starts the testrun with SessionCreator.exe.

        Sessioncreator should create a session on the locked pc where TestExecute can preform the tests.

        This worked for atleast the past 2 years, but suddenly I get back Exitcode 7 while I changed nothing. 


  • MW_Didata's avatar
    MW_Didata
    Super Contributor

    Hello fellow testers,

    I sort of solved this issue so I'll let you know what I had to do to get my tests started again.

    I have a batchscript in taskmanager that restarts my PC.
    Then an other task that starts the tests planned about 15 min later.

    Since the testrun can no longer start on when the pc is locked/ logged off, 
    I've added a registry edit that automatically logs on the user.
    It can be added here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    add these keys:
    AutoAdminLogon  1
    DefaultUserName  {Your Username}
    DefaultPassword   {Your Password}
    DefaultDomainName  {Your PCs domain name}

    When the PC restarts it automatically logs on so it has a active session that SessionCreator/ testexecute can use.

    When the testing is done I've added a script that logs off the user.

    Unfortunately my other PC now also has this issue. It can no longer create a user session.
    2 of the 3 PCs i use now have this issue, I've disabled windows updates on the last working PC hoping it can still keep running as it is.


    It seems all the vibecoding in windows 11 is breaking more and more everyday.

    Please do let me know if anyone else starts having these issues. Maybe with more affected Smartbear can create a fix that solves this once and for all.

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

      Which is what I suspected and mentioned, with regards to active session.

      It's a Windows Security feature, and something SmartBear can not fix or get around.