Support & information center

How to use timeouts in testingRTC

Running a test script in testingRTC (or upRTC) means that one or more virtual machines are allocated for your WebRTC test script to execute. Using these virtual machines is costly, so there is a need to make sure that they are only used when they are really needed.

The powerful capabilities in test scripts means that you can reach places where the test logic itself is recursive, reaches endless loops or just hangs on a pause or waitfor command for an indefinite amount of time.

Because of this, testRTC includes a built-in timeout mechanism which will kill any running test script after a configurable amount of time. This process will release the machines, counting the minutes towards your used balance. Due to the nature of this process, minimal log information will be collected in such cases.

testingRTC uses a default timeout is a maximum of 5 minutes.

If you are planning on running larger tests, you will need to increase that value. For that, you can use the #timeout run option, keeping the following rule of thumb in mind:

  • The #timeout value you provide should take into account test time, additional slack
    • Test time – the time required for your test to run from beginning to end. this should include any additional activities such as logging in, filling out forms, waiting for additional users, etc. So if you want to test calls that are 5 minutes long, add at least 2 more minutes to cover that part of your test session
    • Additional slack – testRTC takes its own time on teardown of the test in the end. This is used to collect and upload all logging information and screenshots, analyze results, etc. You should add this to your calculations of timeout as well. For small tests, this is usually a minute or so at most. For larger tests in can take longer. So be sure to also check our timeout configuration suggestions on WebRTC stress testing best practices
  • You get charged only on minutes used. Even if the timeout is a lot longer
  • Think of the timeout parameter as a way to stop tests that get into an endless loop. It is there to “save” you from wasting minutes for nothing useful

Was this article helpful?

Related Articles