使用关联DLL时使用MSTest或VSTest.Console时未检测到Web性能测试(.webtest) [英] Web performance tests (.webtest) are not detected when I use MSTest or VSTest.Console by using the associate DLL

查看:58
本文介绍了使用关联DLL时使用MSTest或VSTest.Console时未检测到Web性能测试(.webtest)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了600多个网络性能测试(.webtest)。我可以从Visual Studio 2015 Enterprise Edition运行所有这些。但是,我尝试在命令窗口中使用一次命中运行我的所有测试,到目前为止没有运气。请查看我的方法和
结果:

I developed more than 600 web performance tests (.webtest). I can run all of them from Visual Studio 2015 Enterprise Edition. However, I tried to run all of my tests with one hit from a command window, and had no luck so far. Please see my approaches and the results:

1)我尝试通过MSTest单独运行Web测试,命令如MSTest / testcontainer:A_Web_Test.webtest / testsettings:The_Setting / resultsfile:result.trx

1) I tried to run web tests individually through MSTest with a command like, MSTest /testcontainer: A_Web_Test.webtest /testsettings: The_Setting /resultsfile: result.trx

一切都很好,测试运行正常,结果已创建。

Everything is fine, and the test is running ok, and the result is created.

2)我试过使用命令,如MsTest / testcontainer运行相关DLL的测试:The_DLL.dll / test:Test1 / testsettings:The_Setting / resultsfile:result.trx

2) I tried to run the tests with the associated DLL with a command like, MsTest /testcontainer: The_DLL.dll /test:Test1 /testsettings: The_Setting /resultsfile: result.trx

这个失败了,说没有找到测试。

This one is failing, and says no tests found.

是的,我检查了路径,名字。一切都是正确的,但无法找到测试。

Yes, I checked the path, name. Everything is correct, but can't find the tests.

3)我从现有的Web测试中创建了一个编码的Web测试,并尝试使用与#2相同的命令。基本上给出DLL和测试名称。这次在DLL中检测到了测试。

3) I created a coded web test from an existing web test, and tried to use the same command as #2. Basically giving the DLL and the test name. This time the test was detected in the DLL.

我的目标是通过相关的DLL运行我的所有测试。通过这样做,我不需要指定超过600个网络测试。

My goal is to run all of my tests through the associated DLL. By doing that, I don't need to specify more than 600 webtests.

有没有人遇到过类似的问题?如果是的话,你是如何解决这个问题的呢?

Has anyone encountered a similar issue? If yes, how did you solve the issue?

我也试过VStest.Console.exe,这给了我同样的错误。

I also tried with VStest.Console.exe, this gave me the same error.

谢谢提前为你提供帮助。

Thank you in advance for your help.

推荐答案

嗨FredrichF,

Hi FredrichF,

网络性能测试结果是与单元测试或编码的UI测试不同。

The web performance test was different from the unit test or coded UI test.

我们可以使用dll文件运行单元测试或编码的UI测试,因为它们都在类文件中,但Web性能测试具有他自己的测试文件,我们无法直接使用dll调用它。

We could run the unit tests or coded UI tests using the dll file since they are all in the class files, but the web performance test has his own test file, we couldn't call it using the dll directly.

要运行多个Web性能测试,我们经常使用命令行中的多个测试容器参数。 

To run multiple web performance tests, we often use multiple test container arguments from the command-line. 

mstest / TestContainer:WebTest1.webtest / TestContainer:WebTest2.webtest

谢谢,

杰克


这篇关于使用关联DLL时使用MSTest或VSTest.Console时未检测到Web性能测试(.webtest)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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