Forum Discussion

jsc's avatar
jsc
Regular Contributor
10 years ago

Setting auto-wait timeout in OnStartTest

Hi all,

 

as the test runs way faster on my local pc (physical pc with Testcomplete) than on the virtual machine with TestExecute I tried to set the auto-wait timeout for tests in OnStartTest and revert it in OnStopTest. (so that failed checkpoints on my local pc do not make me watch 14 seconds looking at the screen :-))

 

OnStartTest: Options.Run.Timeout = 1000;

OnStopTest: Options.Run.Timeout = 14000;

 

If I run a small functions in the scriptextensions itself this is all working fine.

 

But in OnStartTest and OnStopTest that are called from my Keyword Tests there is a runtime error executing this line.

I assume this has to do with the scriptextensions not knowing in which project the timeout has to be changed, but I am not sure.

 

Can anybody help me with that?

 

Best regards,

Joachim

 

 

  • hmmm... I implemented it quite dumb in the script-section of each of the projects.

     

    I had preferred that it is possible in the central eventhandler that I wrote in the script extensions. But it is not.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Jsc,

     

    I’m using TestComplete 11.1 and everything works OK on my computer. In other threads, I’ve found that you were using the same product version. Is it still the same? If it is, I would suggest that you submit a request to our Support Team ( http://support.smartbear.com/product-list/ ) and provide them with the project where you see this issue.

     

    • jsc's avatar
      jsc
      Regular Contributor

      Hi Tanya,

       

      thanks a lot. So I will just set up a small new project to check it again without all the stuff happening in my big suite.

       

      Just to clarify:

      - My Keyword Test calls OnStartTest event in the Project Suite

      - OnStartTest calls a function within the scriptextensions (central eventhandler (OnStopTest, OnStartTest,...) functions that get called from all projects in my project suite)

      - this function in the scriptextensions failed

       

      Did you have the same setup?

       

      Best regards,

      Joachim

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        >> - My Keyword Test calls OnStartTest event in the Project Suite

        I missed this. There is no need to call the onStartTest event handler. TestComplete fires it each time when your test is being started.