Ordered test timeout


Ordered test is a type of test in Visual Studio 2010  that contains other tests and provides capability of running them in the specified order. Ordered test supports timeout and if you are using its timeout, you should be aware of following: –

  • Every test by default has a timeout of 30 min and it applies for ordered test as well. This means that if you have a child unit test with timeout of 40 min and default timeout for its parent ordered test, ordered test will timeout after 30 min and will abort the child test.

 

  • Ordered test honors the timeout of its child tests.  This means that if you have an ordered test with timeout of 10 min and a single child test with timeout of 5 min, then ordered test will wait for the child test to complete till 5 min and abort it if it does not.

 

  • Ordered test timeout can be changed via the test view’s property window (Test View –> select ordered test –> Properties window) or via the test settings.

Comments (5)

  1. Venkatakrishna B K says:

    We are using VS 2012 Ultimate. We are unable to locate the setting in Visual Studio to set the time out. Can some one explain in detail with snapshots if possible how to set the timeout for ordered tests?

  2. Arun M says:

    Hi Venkatakrishna,

    You can set timeout for All Tests in a testsettings file. The following reference may help you:

    msdn.microsoft.com/…/ms243175.aspx

    Screenshot: http://i.imgur.com/k6EYWta.png

    Thanks,

    Arun

  3. TommyL says:

    Hi, I do not see the option to add a new testsettings file from the project template screen.  Do I need to be in certain MSDN subscription in order to get this feature?

    Thanks

    Tommy

  4. Tommy, You can try adding the test settings from the solution items. (Right click on Solution -> add new item -> test settings -> ) and see whether it works for you or not.

    Regards

    Aseem Bansal

  5. Raj Mohan says:

    Using VS2012, OrderedTest aborted after 30mins,

    Have used .runsettings file

    <?xml version="1.0" encoding="utf-8" ?>

    <RunSettings>

     <Execution>

       <Timeouts runTimeout="7200000"/>

     </Execution>

     <RunConfiguration>

       <!– Path relative to solution directory –>

       <ResultsDirectory>.TestRunSummary</ResultsDirectory>

     </RunConfiguration>

     <MSTest>    <DeleteDeploymentDirectoryAfterTestRunIsComplete>false</DeleteDeploymentDirectoryAfterTestRunIsComplete>

     </MSTest>  

    </RunSettings>

    Not working.Please help