Forum Discussion

ajith's avatar
ajith
Occasional Contributor
7 months ago

Unable to process SessionCreator.exe Output in TestExecute via TeamCity

Hi Everyone,

I'll trigger different plans parallelly so if an agent machine is free, it will automatically pick the agent machine and started running.

But when I trigger TestExecute via SessionCreator in TeamCity it will trigger the TestExecute and the project will start to run and once TestExecute is trigger it will return and output like "Exit Code" as 0 and then the next plan is picking up before the pervious plan got completed in TestExecute.

I've no clue how to handle this kind of situation with SessionCreator.exe file, anyone has any idea on how to make the session creator to wait until the execution got completed so that TeamCity won't allow to run the queued plans.

I've already tried with Timeout and Export report, but it doesn't help.

Thanks in advance!

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If TC is returning Exit Code 0, then it thinks it's done and no errors occurred.

    https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/exit-codes.html

    To troubleshoot this, I would do three things:

    1. Run the project on its own in TestComplete and make sure it works.
    2. Run the project on its own in TestExecute without TeamCity and make sure it works.
    3. Run the project in TestExecute with TeamCity and no parallel plans and make sure it works.

    Let us know these results and we can try to help further.

     

  • ajith's avatar
    ajith
    Occasional Contributor

    I've tried all the mentioned three things and it is working fine, but I need help to complete the build steps in TeamCity only after the testExecute execution got over and the result got published, I'll provide the syntax of the SessionCreator below, 

    Please suggest me if any improvements needs to be made,

    SYNTAX:

    "Path to SessionCreator.exe" RunTest /UserName:domain_name\user_name /Password:password /UseActiveSession /ProjectPath:"Path to .pjs file" /ExportLog:"Path to export .mht test report" /Timeout:222000 /project:project_name /project:project_name /unit:unit_name /routine:routine_name

    • Babulu's avatar
      Babulu
      Contributor

      is this command line for session creator working outside teamcity ? if you use /e at the end of the commandline it will automatically exist the testexecute/testcomplete once execution is done  

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      When you run the project in TestExecute with TeamCity and no parallel plans, how do you know when the project has finished running?

  • ajith's avatar
    ajith
    Occasional Contributor

    In SessionCreator.exe we cannot use /e, Since it doesn't support this syntax. /e is only supported with command line for TestExecute.exe file.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I've never used TeamCity before, but you need to somehow configure your TeamCity to run the executable on the same process thread, as opposed to a separate process thread.