阻止 VS2008 单元测试创​​建大量文件?

发布于 2024-09-25 00:10:01 字数 229 浏览 0 评论 0原文

经过多年忠实使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剑心龙吟 2024-10-02 00:10:01

不幸的是,没有办法阻止 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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文