How to specify a run timeout with VSTest.Console?

2019-03-27 09:41发布

问题:

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.

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.

Is there a way to set a run timeout in the .runsettings file? Or is there a different way to get the same effect?

标签: vstest