如何找出一批测试方法中的哪个测试方法运行失败? [英] How can I find out which test method in a batch of test methods fails to run?

查看:29
本文介绍了如何找出一批测试方法中的哪个测试方法运行失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 2015 for C# 的测试资源管理器窗口中,我选择解决方案中的所有 360 测试方法,然后选择运行选定的测试".但并非所有这些都被执行,如输出窗口所示:

In the Test Explorer window of Visual Studio 2015 for C#, I select all the 360 test methods in my solution, and choose "Run Selected Tests". But not all of them are executed, as indicated by the Output window:

------ 运行测试开始------

------ Run test started ------

活动测试运行已中止,因为执行过程意外退出.为了进一步调查,在机器级别或进程启用本地故障转储te.processhost.managed.exe.前往更多详情:http://go.microsoft.com/fwlink/?linkid=232477

The active Test Run was aborted because the execution process exited unexpectedly. To investigate further, enable local crash dumps either at the machine level or for process te.processhost.managed.exe. Go to more details: http://go.microsoft.com/fwlink/?linkid=232477

========== 运行测试完成:188 次运行 (0:00:12.7254721) ==========

========== Run test finished: 188 run (0:00:12.7254721) ==========

如何找出运行失败的测试方法,缩小罪魁祸首的测试方法?谢谢.

How can I find out which test method fails to run, narrow the culprit test method down? Thanks.

推荐答案

这可能不是最巧妙的方法,但您可以一一评论您的测试,看看您的运行在哪一点停止失败.

Probably not the most subtle way to do it, but you could comment your tests one by one, and see at which point your run stops failing.

这篇关于如何找出一批测试方法中的哪个测试方法运行失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆