Forum Discussion

amathews's avatar
amathews
Occasional Contributor
15 years ago

How to make test TimeOut for data driven test function?

So here's the situation: I'm an automation tester new to the company that inherited a large suite of TestComplete tests from the previous automation tester.  These tests are data driven from an excel file, running each row as a test case in one function.  Since it's all run in one function, however, I can't set a timeout time for each test case, but this excel file has, like, 500 test cases, so if one test hangs up on an action then it ruins the rest of the suite.



Question(s):

1) Is there a way to set a "timeout" for all individual actions, i.e. if a new action has not been performed in X time then throw timeout exception (in which case when the timeout gets thrown I can make an OnTimeout event that moves me on to the next testcase in the Excel file)?

2) Can TestComplete/jscript support Threads?  Could a "monitor test" thread poll for stuff and maybe throw a timeout exception at the test?

3) Other options?



Thanks

1 Reply

  • Hi Adam,



    TestComplete tests can only be run in a single thread. However, you can specify timeout for test items and projects as described in the Terminating Tests on Timeout help topic. Test items structure cannot be changed at run time, but you can at least make TestComplete run a specific test item multiple times and execute different actions at different iterations.