Forum Discussion

EagerTester's avatar
EagerTester
Occasional Contributor
6 months ago

SessionCreator /Timeout option not firing EventControl_OnTimeout

Hello!

I am using SessionCreator to run a project suite, and am passing in a /Timeout variable. The project suite stops as expected when it hits the timeout value, but it does not fire EventControl_OnTimeout.

Is it supposed to?

https://support.smartbear.com/testcomplete/docs/working-with/automating/session-creator/index.html#timeout SessionCreator doco doesnt say that it does, It only says "If the testing session is still running after the timeout has elapsed, the utility will stop the session and report an error. The other tests will be canceled and TestComplete will be closed."

https://support.smartbear.com/testcomplete/docs/reference/events/ontimeout.html The OnTimeoutEvent doco says "Occurs when a timeout expires in a project or in a project suite.". Is this the same as timing out a SessionCreator run? I am aware that Timeouts can be set for each test item or project within a project suite, but that is not what I am after. I am after a global event triggered by the parameter I am passing in.

My goal is that when the timeout value is hit, to be able to save the logs and copy them somewhere, and also perform additional operations BEFORE SessionCreator/TestExecute is closed, 

Thanks!

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    OnTimeout Event will occur when a timeout expires in a project or in a project suite. For example, when the automation runs longer than the timeout period that's specified in the project settings.

    SessionCreator /Timeout specifies a timeout for the testing session. For example, if your automation has not finished within 5 minutes, you can "kill" the session with the timeout parameter

    There are other parameters to export the log.

    • EagerTester's avatar
      EagerTester
      Occasional Contributor

      Thanks for the reply. 

      So it seems as though there is no way to execute steps when SessionCreator /Timeout has been reached.

      There are other parameters to export the log.

      I am aware of this, and am saving the log file locally. However I need to copy it to Azure storage once the project has finished running. It seems as though this is not achievable using the /Timeout option.

       

      • rraghvani's avatar
        rraghvani
        Champion Level 3

        Use PowerShell script - to execute your automation, copy results, perform clean up etc. You can call the script via Azure.