Approved
Last Updated: 07 Jun 2016 10:47 by rashmi
ADMIN
Daniel Djambov
Created on: 07 Apr 2015 08:28
Type: Feature Request
8
Implement a way to set a test execution timeout to handle random execution hangs
There are several requests over the years to implement a way to force stop the execution of a test in cases of a hanging processes during execution. For example to set 10 minutes timeout and if a started test does not finish in this timeframe, to force stop the execution of the test and kill active processes related to the test, so that the execution of the rest of the tests in the list is not hang because of this particular test.
2 comments
rashmi
Posted on: 07 Jun 2016 10:47
Hi Daniel,
I have used same extension to avoid hanging issue.When I tried some list of test cases it worked.But its failing during some of the nested test cases.
I have implemented one test cases as below,
Test case started
step1
step2
Test As a step1
step3
Test As step2
step4
---
Test case ends

Test As a step1 starts
step1
Test As a step1a 
step2
step3
Test As a step1 ends

Test As a step1a starts
test as a step1aa
step1
step2
Test As a step1a  ends

In the above structured test case when test "test as astep1aa" ends ,its  going inside the below loop,
if (!executionContext.ExecutingTestAsStep && !executionContext.RunFromHereStepExecuted)
                {}
which should not happened as its ExecutingTestAsStep .

Can you please help me to resolve this issues.
Is there any way to make test cases as "ExecutingTestAsStep "?

Thank you,
ADMIN
Daniel Djambov
Posted on: 22 Apr 2015 08:34
Telerik: you can implement this option using our Test Studio Execution Extension (http://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/execution-extensions), where you have many capabilities of performing pre- and post- conditions for various purposes. Attached to this feedback is a sample project using a StopWatch in a separate thread that is started before each Test is run (only for main tests - excluded are test of steps, which is also optional) and stopped after Test completes in predefined timeout of 10 min, after which time you can kill all possible hanging processes and execution of the next test in the list will continue. This is just a sample implementation - possibilities here are countless and customization to specific case is required. You can use this option until theis functionality is implemented in Test Studio as built in one.