MsTest - 速度改进

发布于 2024-08-13 09:49:04 字数 140 浏览 2 评论 0原文

所以我被 NUnit 这个丑陋的妹妹困住了。有人知道加快速度的方法吗?当我只想重新运行测试时,它似乎热衷于重建一切(这不是必需的,因为我没有更改任何代码)。

当我们这样做时,有谁知道如何关闭“我将把所有结果写入磁盘”功能,该功能会慢慢填满硬盘驱动器?

So i'm stuck with the ugly sister of NUnit. Anyone know of ways to speed this up? It appears to be keen to rebuild EVERYTHING when I just want to re-run the tests (which is not neccessary as I haven't changed any code).

While we're at it does anyone know of a way to turn off the: I WILL WRITE ALL MY RESULTS TO DISK "feature" that slowly fills up one's HDD?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

与酒说心事 2024-08-20 09:49:04

在 VS 2005 和 2008 中,.testrunco​​nfig 文件中的“部署”功能决定是否打开“我将把所有结果写入磁盘”功能。

2005 年您将需要手动将其关闭。在 VS 2008 中,它默认处于关闭状态 (IIRC)。

您可能还想查看这篇博文 描述了如何偶尔删除 TestResults 文件夹。

我不能说我曾经经历过它重新编译所有内容只是为了运行。根据我的经验,它会重新编译,就像您期望 Build 命令所做的那样。

我注意到的另一件事是,在测试运行时组织测试结果(即输出)的方式实际上会影响性能 - 例如,如果您对测试结果进行分类,它的运行速度会变慢,显然是因为它耗尽了更新测试结果的 CPU 周期。列表。

In both VS 2005 and 2008, the "Deploy" feature found in the .testrunconfig file determines whether the I WILL WRITE ALL MY RESULTS TO DISK feature is turned on or not.

In 2005 you will need to turn it off manually. In VS 2008 it is turned off by default (IIRC).

You may also want to take a look at this blog post that describes how to get rid of the TestResults folder once in a while.

I can't say I've ever experienced that it recompiles everything just to run. In my experience it recompiles just as you would expect the Build command to do.

Another thing I've noticed is that the way you organize your test results (i.e. the output) while the tests run can actually impact performance - e.g. if you categorize the test results, it runs slower, apparantly because it's using up CPU cycles updating the list.

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