Forum Discussion

furkanbodur's avatar
furkanbodur
Occasional Contributor
2 years ago

Window user logoff automatically after SessionCreator that triggered from

Hello.

I have a jenkins job that trigger a test execution on another remote windows machine with session creator

When I execute this jenkins job manually, tests are executed successfully.

Also this job is triggered from nightly CI/CD jenkins pipeline.

Tests are executed successfully as well BUT Windows (10) user logoff automatically . So every morning I logon to the new user session. So I lose my recent progress.

I don't know this is related to TestComplete session creator or jenkins. 

Anyone have an idea?

 

Logoff logs

Jenkins job start-end time

 

 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    SessionCreator will log on, run the automation, and then log off. I would have assumed using parameter  /UseActiveSession will maintain the current session after finishing.

     

    Would it not be best to use TestComplete commands?

     

     

    • furkanbodur's avatar
      furkanbodur
      Occasional Contributor

      Yeah,  I agree.  Also I use /UA command. But /UseActiveSession command is about current TestComplete session, isn't it? or it is about windows session?

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        or it is about windows session?

        It is about existing interactive session for the specified user. TestComplete itself does not provide any session.

         

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I don't fully understand what the issue is? Are you saying that once SesssionCreator has completed the automation, it logs off?

    • furkanbodur's avatar
      furkanbodur
      Occasional Contributor

      Not right after. There are few steps after execution such as result importer. But after all pipeline has finished, it logoff

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I'm just trying to understand the behaviour, as I also use SessionCreator in PowerShell script to run my automation. Once the automation is completed, the sessions is closed, i.e. user is logged off. 

     

    I'm just wondering if there's a setting in Jenkins to wait for the process to finish, before returning back.

    • furkanbodur's avatar
      furkanbodur
      Occasional Contributor

      I checked it but I don't see any settings on jenkins side. I think sessionCreater logon and logoff automatically for windows user and eventually it stays logoff .

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The "session" refers to the user (UserX) that's logged onto the machine. When using /UseActiveSession, it will run the automation on UserX session. If you omit /UseActiveSession, it will run the automation on UserY session - based on the /UserName.

     

    If you see Integration With Jenkins, in the video clip, they mention about "interactive user session" - this needs to be correctly setup.

    • furkanbodur's avatar
      furkanbodur
      Occasional Contributor

      I just missed one configuration setting and I fix it now. I will try it this night.

      If it wont fix the problem I will create a windows user such as tester that mentioned in the videoclip.

      And If this wont fix either I will try to Jenkins TestComplete plugin.

      Thank you so much