防止 MSTest 复制/部署每个 dll
从 Visual Studio 运行 MSTest 时 - 单元测试执行时间相对较快。
当从命令行运行 MSTest 时,使用 /testsettings 标志 - 执行将永远持续,这是因为它花费了 95% 的启动时间将 dll 复制到其 Out 文件夹。有办法防止这种情况吗?
项目中默认的Local.testsettings没有对其进行任何修改(这也意味着它是空的)。但是,如果我尝试从命令行使用同一文件,MSTest 会抱怨缺少单元测试引用的 DLL。
When running MSTest from Visual Studio - the unit test execution time is relatively quick.
When running MSTest from the command line, with /testsettings flag - the execution takes forever and that is because it spends 95% of its startup time copying the dll's to its Out folder. Is there a way to prevent this?
The default Local.testsettings in the project has no modifications to it (which also means it is empty). However, if I try to use that same file from the command line, MSTest complains about missing DLL's that the Unit Test reference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过在测试设置中禁用部署?当它被禁用时,测试应该就地运行,而不是在复制的程序集上运行。 (请参阅http://msdn.microsoft.com/en-us/library/ms182475 .aspx 了解详细信息。)
Have you tried disabling deployment in the test settings? When it is disabled, the tests should be run in-place rather than on copied assemblies. (See http://msdn.microsoft.com/en-us/library/ms182475.aspx for details.)
尝试 MSTest.exe /noisolation http://msdn.microsoft.com/en-US /library/ms182489.aspx
try MSTest.exe /noisolation http://msdn.microsoft.com/en-US/library/ms182489.aspx