在没有 Microsoft Visual Studio 测试版/Team Suite 的情况下运行 Web 测试

发布于 2024-09-13 01:16:17 字数 175 浏览 5 评论 0 原文

有什么方法可以在没有 Microsoft Visual Studio 测试版/Team Suite 的情况下运行 Microsoft webtest?任何第三方工具或通过命令行运行它的方法?我安装了MS VS Professional Edition 2008。谢谢!

Is there any way I can run Microsoft webtest not having Microsoft Visual Studio Testing edition/Team Suite? Any third-party tool or a way to run it through command line? I have MS VS Professional Edition 2008 installed. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如果没有你 2024-09-20 01:16:17

我已经从这个博客验证了该过程。非常简单的批处理文件,可以为您完成将程序集复制到 MSTest 文件夹中的所有工作。它甚至创建一个注册表文件,您可以使用该文件在另一台计算机上执行,以便 MSTest 找到程序集。

在不安装 Visual Studio 的情况下执行 Visual Studio 2010 单元测试 < /a>

感谢 Wim Coenen 的博文。

I have verified that the process from this blog. Very simple batch file that does all the work for you to copy the assemblies into a MSTest folder. It even creates a registry file that you can use to execute on another machine so that MSTest will find the assemblies.

Executing visual studio 2010 unit tests without installing visual studio

Thanks Wim Coenen for your blog post.

野味少女 2024-09-20 01:16:17

如果您指的是通过用户界面测试您的网络应用程序(即自动单击按钮和输入文本等)而不是对代码隐藏类等进行单元测试,那么我认为您最好的选择是使用:

< a href="http://watin.sourceforge.net/" rel="nofollow noreferrer">WatiN(可能是最流行的第三方工具)

两者都是开源且免费提供的,并且都包含从命令行运行测试的能力,从而能够集成到您的测试工具和持续集成周期中。

编辑:

回应 Michael 对此答案的评论:

不,据我所知,WatiN 和 Selenium 都不会运行您之前创建的 MS WebTest Web 测试。

另外,我做了一些进一步的研究,发现如果没有安装 Visual Studio Team System/Testing Edition,您也无法运行这些 MS WebTest Web 测试。

您的 Visual Studio 2008 Professional 具有内置的单元测试功能,并且可以使用 MSTEST.EXE 命令行工具。

顺便说一句,这个完全相同的工具还用于从 Visual Studio Team System 中的命令行自动运行 web 测试,详见 此处

不幸的是,MSTEST.EXE 工具的大小只有 18kb,并且依赖于加载大量外部程序集,以便将实际的测试功能委托给相关类型的测试。对于 Web 测试,您的 Visual Studio 专业版将不会安装这些程序集,并且尝试运行 Web 测试将导致出现以下错误消息:

指定的文件扩展名“.webtest”不是有效的测试扩展名。

关于同一问题的另一个 StackOverflow 问题(它基于 VS 2005,尽管这同样适用于 2008)。

看来,MSTEST.EXE 尽管是一个命令行工具,但与 Visual Studio 安装相当紧密地“耦合”,并且很难分离,例如当用户希望部署 将 MSTEST 功能添加到构建服务器以进行持续集成,而无需在同一台计算机上“完整”安装 Visual Studio。看起来这实际上很难实现,尽管有一些人发布了 博客条目有关尝试(尽管有些“hacky”)实现这一目标的文章

不过,尽管如此,如果没有 Visual Studio Team System/Testing Edition,仍然无法运行 MS WebTest 网络测试

If you're referring to testing your web application via it's user interface (i.e. automating the clicking of buttons and entering text etc.) rather than unit testing of code-behind classes etc. then I think your best bet is to use either:

WatiN (probably the most popular 3rd-party tool for this)
or Selenium.

Both are open source and freely available, and both include the ability to run tests from a command line thus enabling integration into your test harness and continuous integration cycle.

EDIT:

In response to Michael's comment on this answer:

No, as far as I know, neither WatiN nor Selenium will run your previously created MS WebTest web tests.

Also, I did some further research and discovered that you also cannot run those MS WebTest web tests without having Visual Studio Team System/Testing Edition installed.

Your Visual Studio 2008 Professional has unit testing built-in, and this can be automated at the command line using the MSTEST.EXE command-line tool.

Incidentally, this exact same tool is also used to automate the running of web tests from the command line in Visual Studio Team System, as detailed here.

Unfortunately, the MSTEST.EXE tool is only 18kb in size, and relies upon loading numerous external assemblies in order to delegate the actual testing functionality to the relevant type of test. In the case of web tests, your Professional edition of Visual Studio will not have those assemblies installed, and attempting to run a web test will result in the following error message:

File extension specified '.webtest' is not a valid test extension.

There is another StackOverflow question regarding this same problem (it's based on VS 2005, although the same applies to 2008).

It seems that MSTEST.EXE, despite being a command line tool, is fairly tightly "coupled" with a Visual Studio installation, and is difficult to separate, for example when users wish to deploy the MSTEST functionality to a build server for continuous integration without having a "full" installation of Visual Studio on the same machine. It seems this is very difficult to actually achieve, although a few people have posted blog entries and articles regarding attempts (albeit somewhat "hacky") to achieve this.

That said, however, it's still not possible to run MS WebTest web tests without Visual Studio Team System/Testing Edition.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文