从Windows命令行运行mstests
我有5个使用MSTest的解决方案,我想在根文件夹中有一个CMD文件,该文件将运行所有测试,
以便我想从命令行中调用MSTests Runner对
\Solution1\Tests\Debug\Test.dll
...
\Solution5\Tests\Debug\Test.dll
任何人都知道该如何做到这一点?
I have 5 solutions all using MSTest and I would like to have a cmd file in a root folder that will run all the tests
so I would like to call the MsTests runner from the command line against
\Solution1\Tests\Debug\Test.dll
...
\Solution5\Tests\Debug\Test.dll
anybody knows how can this be done ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这在MSDN上详细介绍:使用mstest从命令行进行测试
基本上,您可以做:
This is detailed on MSDN: How to: Run Automated Tests from the Command Line Using MSTest
Basically, you can do:
如果使用.NET核心:
在测试所在的文件夹中。
对于命令行选项,请参见:
https://learn.microsoft.com/en-us/en-us/dotnet /core/tools/dotnet-test
If Using .Net Core:
In the folder where the test is located.
For command line options see:
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test
我从这个主题中得到答案: https://gist.github.com/leniel/leniel/2438148
只需使用以下命令使用
mstest /testContainer < /code>运行测试用例
I got the answer from this thread: https://gist.github.com/leniel/2438148
Just run the following command to run test cases by using
MSTest /testcontainer