MSTest.exe功能 - 无解决方案/项目运行 [英] MSTest.exe abilities - run without solution/project

查看:89
本文介绍了MSTest.exe功能 - 无解决方案/项目运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用MsTest.exe远程触发一些定期测试。 

目前我使用的命令如下:
$
MSTest.exe /testsettings:remote.testsettings /resfilefile:Resultes.txr /testmetadata:AutomatedTest.vsmdi / testlist:ATList


ATList中的3个有序测试包含我所需的所有测试(需要将它们部署到3个测试位置)。


没关系。  

但它需要工作站上的整个Solution \ Project。

I want to use MsTest.exe to remotely triggered some periodically tests. 
At the moment I use a Command like:
MSTest.exe /testsettings:remote.testsettings /resultsfile:Resultes.txr /testmetadata:AutomatedTest.vsmdi /testlist:ATList
Where in the ATList are 3 ordered Tests containing all my needed tests (they need to be deployed to 3 testing positions).
That is fine.  
But it needs the whole Solution\Project on the Workstation.

我也尝试了一些组合,例如: 

MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr / testlist:ATList




MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr /test:Autotest1.orderedtest,Autotest2.orderedtest


(不工作) )或 

MSTest.exe /testsettings:remote.testsettings /testcontainer:Autotest1.orderedtest /resultsfile:Resultes.txr 

I Tried also some combinations like: 
MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr /testlist:ATList
or
MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr /test:Autotest1.orderedtest,Autotest2.orderedtest
( not working) or 
MSTest.exe /testsettings:remote.testsettings /testcontainer:Autotest1.orderedtest /resultsfile:Resultes.txr 

但是工作不正常我也认为没有解决方案/项目就行不通。  


我会说一些命令,我​​说的是: 

MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr /test:Autotest1.orderedtest,Autotest2.orderedtest 


因此它更独立于解决方案而且我只需要将DLL文件(可能还有一两个)带到测试站


而不是一大堆目录和文件。但我认为有关测试和测试列表的信息没有存储在dll中。


一两个文件不会那么多。 (就像整个解决方案/项目一样)

在这里的描述中找不到令人满意的选项:
http://msdn.microsoft.com/en-us/library/ms182489.aspx#testcontainer


或者我错过了什么?

或者其他正确方法是什么?

But not working properly and also I think it don't work good without solution/project.  
I would prefare some command where I say something like: 
MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Resultes.txr /test:Autotest1.orderedtest,Autotest2.orderedtest 
So that it is more Independent from Solution and I only need to take the DLL file (and maybe one or two more) to the test station
and not a whole bunch of directories and files. But I think the information about the ordered tests and the test list is not stored in the dll.
One or two files more would be not that much. (like the whole solution/project)
Don’t find something satisfying option in the description here: http://msdn.microsoft.com/en-us/library/ms182489.aspx#testcontainer
Or did I just missed something?
Or what would be a other proper way?

推荐答案

Victor,

Victor,

您是否已将必要的项目作为部署项目包含在testsettings文件中?

Have you included the necessary items as deployment items in your testsettings file?

由于您正在执行自动测试,因此通常只需要AutomatedTest dll以及启动应用程序的方法待测试。 

Since you are executing an automatedtest, you generally only need the AutomatedTest dll and a way to launch the application to be tested. 

当您远程说话时,我假设是在外部测试代理上。 您可以在外部代理上安装要测试的应用程序,或者通过将该目录包含为部署项来部署项目的整个bin输出。

When you say remotely, I assume on an external test agent.  You can install the application to be tested on the external agent or deploy the entire bin output of your project by including that directory as a deployment item.

您可以在Visual Studio中添加部署项目:

You can add deployment items in Visual studio by:

测试 - >编辑测试设置 - >(测试设置编辑) - >部署 - >(选中启用部署) - >(选择必要的文件/目录)

Test->Edit Test Settings->(Test Setting to Edit)->Deployement->(Check Enable Deployment)->(Choose necessary files/directories)

请注意,如果这是在远程测试代理上,则必须将代理配置为作为交互式进程运行。 此选项在代理上的测试代理配置工具中可用。

Keep in mind, if this is on a remote test agent, the agent must be configured to run as an interactive process.  This option is available in the Test agent configuration tool on the agent.

您的命令行语法MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Results.txr / testlist:ATList


对我来说很好。

Your command line syntax MSTest.exe /testsettings:remote.testsettings /testcontainer:AutomatedTest.dll /resultsfile:Results.txr /testlist:ATList
looks fine to me.

我希望这些提示对你有用,如果你发现我的答案有用其内容与回答您的问题相关。

I hope these tips serve useful to you, and please mark my answer helpful if you find its content relevant to answering your question.

干杯,

保罗


这篇关于MSTest.exe功能 - 无解决方案/项目运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆