如何配置 MSTest 以在失败时重试每个测试
我想解决 Visual Studio 2010 编码 UI 测试随机失败的问题。是否可以将 mstest 配置为在结果中失败之前再次尝试每个失败的测试?谢谢。
I want to solve a problem with a random failures on Visual Studio 2010 Coded UI tests. Is it possible to configure mstest to try each failed test again before failing it in the results? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使相关测试成为数据驱动的。例如,使用带有一堆空白测试行的 XML 文件,以便测试运行多次。它将单独报告每个测试行的成功/失败。实际上,您不必让测试从 XML 文件中提取任何数据。
http://callumhibbert.blogspot.com/2009/07 /data-driven-tests-with-mstest.html
You could make the test(s) in question data-driven. For example, use an XML file with a bunch of blank test rows so that the test runs multiple times. It will report the success/failure of each test-row individually. You don't actually have to make the test(s) extract any data from the XML file.
http://callumhibbert.blogspot.com/2009/07/data-driven-tests-with-mstest.html