MsTest - 速度改进
所以我被 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 VS 2005 和 2008 中,.testrunconfig 文件中的“部署”功能决定是否打开“我将把所有结果写入磁盘”功能。
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.