从生产环境的命令行运行Visual Studio 2015编码的UI测试 [英] Running Visual Studio 2015 Coded UI Tests from command line against a Production Environment

查看:81
本文介绍了从生产环境的命令行运行Visual Studio 2015编码的UI测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在明确限制对生产环境(例如网站)使用编码UI测试的许可要求?

Are there any licensing requirements explicitly restricting the use of Coded UI Tests against a Production Environment (eg. website)?

2016年11月的Visual Studio 2015许可白皮书声明: 

The Visual Studio 2015 Licensing Whitepaper from November 2016 states: 

许可用户可以在任意数量的设备上安装和使用该软件......  但是,该软件不是许可在生产环境中使用...  生产环境定义为应用程序(如Internet网站)的最终用户访问
的环境

显然,针对Production进行开发和调试违反了这些条款,但是对生产站点运行Coded UI测试呢?示例:VSTest.Console.exe用于运行UI测试,该测试在IE中打开生产URL并在网站上填写表格
 

Obviously developing and debugging against Production are in violation of these terms, but what about running Coded UI Tests against a Production site? Example: VSTest.Console.exe used to run a UI Test which opens a production URL in IE and fills out a form on the website 

请注意加载测试似乎不受限制:

每月订阅者可以使用该软件对任意数量的虚拟用户执行负载测试,包括在生产环境中运行的负载测试




推荐答案

你好Jesse FIS

欢迎使用MSDN论坛。

Welcome to MSDN forums.

>>是否有任何许可要求明确限制使用编码的UI测试针对生产环境(例如网站)?

>>Are there any licensing requirements explicitly restricting the use of Coded UI Tests against a Production Environment (eg. website)?

通常,我们对已部署的应用程序执行Coded UI Test,我们不需要访问到环境服务器。我们需要访问已部署的应用程序。我们打开实例并对其执行操作/验证。

Normally, we execute Coded UI Test on deployed application, for which we do not need access to environment servers. We need access to the deployed application. We open the instance and perform actions/verifications on it.

所以我的第一个建议是,您可以执行针对客户端计算机的部署,就像您部署到生产环境一样环境。然后,如有必要,您可以在客户端计算机上安装所需的软件。

So my first suggestion is, you could do a deployment that target to your client machine, which like you do the deployment to the production environment. Then you can install the needed software on your client machine if necessary.

根据您的描述,您希望通过命令行运行代码UI测试,我是对的吗?

And according your description, you want to run code UI test through the command line, am I right?

如果是,您可以访问已部署的应用程序,然后您可以使用MSTest.exe或VSTest.console.exe在您的开发人员命令中运行测试项目 提示,请参阅以下步骤:

If yes, you have access to the deployed application, then you could use MSTest.exe or VSTest.console.exe to run the test project in your Developer Command Prompt, please refer to below steps:


  1. 打开开发人员命令 提示,C:\ProgramData \ Microsoft \ Windows \开始菜单中的常用位置\ Programs\Visual Studio 2015 \ Visual Studio工具
  2. 要识别您的解决方案文件夹,请首先确定Visual Studio Projects文件夹。为此,请在Visual Studio的工具菜单中选择
    选项,然后选择
    项目和解决方案。在Visual Studio项目位置下,您会看到如下路径:
  1. Open Developer Command Prompt, usual location in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools
  2. To identify your solution folder, first identify the Visual Studio Projects folder. To do this, choose Options on the Tools menu in Visual Studio, and then choose Projects and Solutions. Under Visual Studio projects location, you see a path such as the following:


< drive letter> ;: \Documents and设置\<用户名> \ My Documents \ Visual Studio \Projects

<drive letter>:\Documents and Settings\<user name>\My Documents\Visual Studio\Projects


  1. 运行MSTest.exe或 VSTest.console.exe
  1. Run the MSTest.exe or VSTest.console.exe.

例如:

使用MSTest.exe:            
mstest /testcontainer:UnitTestProject.dll                 &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;

Use MSTest.exe:              mstest /testcontainer:UnitTestProject.dll                                                                             

使用VSTest.console.exe:       ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
Vstest.console UnitTestProject.dll

Use VSTest.console.exe:              Vstest.console UnitTestProject.dll

有关如何使用MSTest.exe或VSTest.console.exe的更多信息,请参阅以下链接:

Please refer to below links for more information about how to use MSTest.exe or VSTest.console.exe:

https://msdn.microsoft.com /en-us/library/ms182489(v=vs.120).aspx

https://msdn.microsoft.com/en-us/library/jj155800(v=vs.120).aspx

通常,我们会避免在生产环境中执行自动化测试。

Typically, we avoid executing automated tests on Production environment.

希望它对您有所帮助!

祝你好运,

Fletch


这篇关于从生产环境的命令行运行Visual Studio 2015编码的UI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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