如何在 VS 2010 中指定单元测试结果的位置? [英] How to specify the location for the unit test results in VS 2010?
问题描述
我使用 VS2010 进行单元测试.有谁知道如何指定 VS 2010 放置其测试结果的位置?默认情况下,它将 TestResults 文件夹放在解决方案文件夹中,我想将其移出其他地方.
谢谢,雷.
目前,这无法从 IDE 内进行控制,请参阅 http://social.msdn.microsoft.com/Forums/en/vststest/thread/4ff650e1-a99a-4bd4-8316007f2a6e16e.
但是,如果您可以从命令行使用 MSTEST.EXE,它将使用当前文件夹在其中生成 TestResults 文件夹.
更新:
<块引用>如何自定义默认部署目录?
您可以通过在 XML 编辑器中编辑测试设置文件来更改默认部署文件夹:
<块引用>
请注意,如果测试设置是通过 XML 编辑(而不是使用默认编辑器)修改的,则需要关闭并重新打开 VS(因为编辑是在 XML 中完成的,更改将不会在加载的设置中更新.)
最好的问候,马可·克鲁威克
I use VS2010 for unit testing. Does anyone know how to specify the location of where VS 2010 put its TestResults? By default it put a TestResults folder in the solution folder, I'd like to move it out somewhere else.
Thanks, Ray.
Currently, this is not possible to control from within the IDE, see http://social.msdn.microsoft.com/Forums/en/vststest/thread/4ff650e1-a99a-4bd4-8311-6007f2a6e16e.
However, if you can use MSTEST.EXE from the commandline, it will use the current folder to generate the TestResults folder in.
Update:
Found this in http://blogs.msdn.com/b/vstsqualitytools/archive/2010/10/24/test-agent-test-controller-and-mstest-faq.aspx:
How to customize the default deployment directory?
You can change the default deployment folder by editing the test settings file in the XML editor:
<Deployment userDeploymentRoot="C:\TestResults" useDefaultDeploymentRoot ="false" />
Note that ,if the test settings is modified by XML edit (instead of using the default editor) VS need to be closed and reopened ( since the editing is done in XML , the changes will not be updated in the loaded settings.)
Best regards, Marco Kroonwijk
这篇关于如何在 VS 2010 中指定单元测试结果的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!