Mstest的Timeout属性不会调用test cleanup方法 [英] Timeout attribute for Mstest does not call test cleanup method
问题描述
这是https://social.msdn.microsoft.com/Forums/en-US/8dc426e0-0db9-4e4e-ba26-870464edc40d/timeout-attrib-for-mstest中问题的重新发布-does-not-call-test-cleanup-method?forum = vststest
This is a reprise of the question at https://social.msdn.microsoft.com/Forums/en-US/8dc426e0-0db9-4e4e-ba26-870464edc40d/timeout-attrib-for-mstest-does-not-call-test-cleanup-method?forum=vststest
似乎没有得到足够的回答,因为提问者描述的行为仍然出现在最新的Visual Studio中2017  (版本15.8.9)
It does not seem to have been answered adequately as the behaviour the questioner describes still occurs in the latest Visual Studio 2017 (version 15.8.9)
我使用与原始问题完全相同的代码:
I am using exactly the same code as in the original question:
执行此代码的结果是测试超时但消息框不是显示和调用清理消息没有写入控制台。我认为这是一个错误。所有测试执行他们的TestCleanup代码是必不可少的,因为这段代码
可能有重要步骤从错误中恢复,如时间out。
The result of executing this code is the test times out but the message box is not displayed and the Calling cleanup message is not written to the console. I consider this a bug. It is essential all tests execute their TestCleanup code, as this code may have important steps to recover from an error such as a time out.
推荐答案
嗨迈克尔,
最好的问候,
杰克
这篇关于Mstest的Timeout属性不会调用test cleanup方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!