阻止 VS2008 单元测试创建大量文件?
经过多年忠实使用 nUnit 后,我对 VS2008 中内置的 Visual Studio 单元测试框架产生了浓厚的兴趣。
除了令人心碎的愧疚之外; )...问题之一是“VSTest”在每次运行测试时都会创建一个文件和一个文件夹,并且这些文件(“Visual Studio 测试结果文件”)和文件夹确实会随着时间的推移而建立。
有没有一种简单的方法可以让它自行清理,或者有一种方法可以阻止它首先生成这些文件?
After years of faithful nUnit use, I'm having a fling with the Visual Studio Unit Testing framework thats built into VS2008.
Apart from the crushing guilt ; ) ... one of the issues is that 'VSTest' creates a file and a folder every time you run tests, and those files ('Visual Studio Test Results File') and folders really build up over time.
Is there an easy way to make it clean up after itself, or a way of preventing it from making those files in the first place?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,没有办法阻止 Visual Studio 中的单元测试框架执行此操作。然而,它不应该不受控制地累积。 25 次测试运行后,它会提示您在创建新测试之前删除以前的运行数据,从而使其保持 25 个目录和关联文件的稳定状态。
你没有看到这种行为吗?
Unfortunately there is no way to prevent the Unit Test framework in Visual Studio from doing this. However it should not build up uncontrolled. After 25 test runs it will prompt you to delete previous run data before creating a new one thus keeping it at a steady state of 25 directories and associated files.
Are you not seeing that behavior?