【发布时间】:2017-10-05 15:30:29
【问题描述】:
在自动执行回归测试期间,我注意到了一个奇怪的行为。当我使用mstest.exe /test:XYZ /... 执行它们时它们会失败,但是当我在 Visual Studio (2015 Enterprise) 中调试它们时它们工作正常。
原因:
Test method XYZ threw exception:
System.IO.IOException: not found as file or resource.
测试创建了一些文件和文件夹,我尝试读取一个新创建的文件。正如我刚刚指出的:如果我使用 Visual Studio 运行测试,它工作正常 - 使用 mstest.exe 时它不起作用。
知道为什么吗?
【问题讨论】:
标签: testing visual-studio-2015 automated-tests mstest regression-testing