问题描述
使用MSTest.exe,可以通过在.testsettings文件中设置/TestSettings/Execution/Timeouts/@runTimeout
属性来指定测试运行的总超时时间.
With MSTest.exe, you can specify a total timeout for a test run by setting the /TestSettings/Execution/Timeouts/@runTimeout
attribute in a .testsettings file.
使用VSTest.Console.exe时,不赞成使用.testsettings,而赞成使用.runsettings,后者显然具有完全不同的架构(包括ahem,稀疏文档).我知道我可以将.runsettings文件配置为使用旧版MSTest模式(从而允许我使用.testsettings文件),但是如果可能的话,我宁愿避免这种情况.
With VSTest.Console.exe, the .testsettings has been deprecated in favor of .runsettings, which apparently has a completely different schema (with, ahem, sparse documentation). I know that I can configure the .runsettings file to use legacy MSTest mode (thereby allowing me to use a .testsettings file), but I would prefer to avoid that if possible.
是否可以在.runsettings文件中设置运行超时?还是有不同的方法来获得相同的效果?
Is there a way to set a run timeout in the .runsettings file? Or is there a different way to get the same effect?
推荐答案
是的.请在此处查看RFC: 0011-Test -Session-Timeout.md
Yes, there is. Please see RFC here: 0011-Test-Session-Timeout.md
这篇关于如何使用VSTest.Console指定运行超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!