CodedUI WpfControls脚本在已安装VS2015的本地计算机上运行,​​但未在仅安装Test Agent2015的Hyper-V虚拟机上运行 [英] CodedUI WpfControls script is running on local machine where VS2015 has installed but not on Hyper-V Virtual machine where only Test Agent2015 has installed

查看:61
本文介绍了CodedUI WpfControls脚本在已安装VS2015的本地计算机上运行,​​但未在仅安装Test Agent2015的Hyper-V虚拟机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经自动化了安装过程,其中安装程序窗口具有WPF控件.我的自动化脚本包含Process.Start以启动安装程序,然后包含WpfControls类以标识安装程序上的对象.我在的时候一切都很好 在具有VS 2015的本地计算机上运行脚本.当我在Hyper-V VM上运行复制的dll时,问题开始.它正在启动安装程序,但未识别安装程序上的对象,并导致测试失败.任何线索将不胜感激.

I have automated a installation process where installer window have WPF controls. My automation script is containing the Process.Start to start the installer and then WpfControls class to identified objects on installer. Everything is working fine when I am running the script on my local machine which has VS 2015. Problem starts when I am running the copied dll on Hyper-V VM. It is launching the installer but not identifying the object on installer and failes the test. Any clue will be highly appreciated.

注意:VM已安装2015测试代理.

Note: VM has 2015 Test Agent installed.

使用以下命令在VM上运行脚本:

Using below command to run the script on VM:

C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE> MSTEST.EXE/testcontainer:C:\ AutomationScripts \ Installer.dll

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>MSTEST.EXE/testcontainer:C:\AutomationScripts\Installer.dll

推荐答案

嗨Mayankt2804,

Hi Mayankt2804,

运行此测试时,您收到什么错误消息?

What error messages did you get during you run this test?

您在本地计算机上使用相同的命令行吗?

Do you use the same command line in your local machine?

(1)请CD到dll的根路径,然后像这样运行此测试:

(1) Please cd to the dll root path, and then run this test like:

MSTEST.EXE/testcontainer:Installer.dll

MSTEST.EXE/testcontainer:Installer.dll

检查结果.

(2)我知道您使用"Process.Start"启动了该项目,在运行此测试期间是否已启动UT?如果否,则它可能具有用于可执行过程的不同路径.或者您将检查某些控件的属性是否具有 在不同的机器上进行了更改.

(2) I know that you start this project with "Process.Start", whether the UT was started during you run this test? If no, maybe it has the different path for the executable process. Or you would check that whether certain controls' property has been changed in different machines.

您最好通过详细的错误日志消息来缩小此问题的范围.

You'd better to narrow down this issue with the detailed error log messages.

最好的问候,

Jack


这篇关于CodedUI WpfControls脚本在已安装VS2015的本地计算机上运行,​​但未在仅安装Test Agent2015的Hyper-V虚拟机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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