VS2015 - MSTest或vstest - 命令行测试执行 [英] VS2015 - MSTest or vstest - command-line test execution
问题描述
我正在使用Selenium和C#绑定,VS 2015,WebDriver 3.3和ChromeDriver 2.29
I am using Selenium with C# binding, VS 2015, WebDriver 3.3 and ChromeDriver 2.29
我创建了一个post build脚本,用于将测试二进制文件和支持文件复制到VM上的共享位置。(计划将此作为发布管理任务的一部分使用)。 我可以在给定/上使用命令行在该VM上运行测试testcontainer:
路径作为Visual Studio项目/ bin /调试位置。
I have created a post build script to copy test binaries and supporting files to shared location on a VM. (planning to use this as part of release management tasks). I am able to run test with command line on that VM when given /testcontainer: path as Visual Studio project/bin/debug location.
当尝试使用/ testcontainer运行相同的命令行脚本时,Chrome驱动程序崩溃:VM上的共享位置。它会启动Chrome浏览器,但在尝试将驱动程序URL设置为网站URL时(例如: https://www.google.com/ ) 。
Chrome driver crashes when try to run same command-line script with /testcontainer: Shared location on the VM. It launches the chrome browser but when try to set driver url to website url (ex:https://www.google.com/).
我收到的错误消息如下:
error message I got is as below:
<消息>测试方法xxx。 regression.EndToEnd.ReleaseTestShort引发异常:
System.InvalidOperationException:未知错误:无法获得自动化扩展
来自未知错误:Runtime.executionContextCreated具有无效的'context':{" auxData":{" frameId": " 8012.1"," ISDEFAULT":真}," ID":1,"名称":"","来源":"铬 - 延伸:// aapnijgdinlhnhlmodcfapnahmbfebeb"} 跨度>
(会话信息:chrome = 59.0.3071.115)
(驱动程序信息:chromedriver = 2.14.313457(3d645c400edf2e2c500566c9aa096063e707c9cf),platform = Windows NT 6.3 x86_64)< / Message>
如果有人对此有任何想法,请告诉我。
感谢您的时间和帮助。
Thank you for your time and help.
推荐答案
亲爱的朋友,
感谢您的帖子。
我们需要安装
此修补程序对Chrome运行编码的UI测试。
We need install this hotfix to run coded UI test against Chrome.
我在我的机器上测试过,而且我正在使用Chrome:
I tested it in my machine, and I'm using Chrome:
版本59.0.3071.115(官方版)(64-位)
希望有所帮助。
请告诉我结果。
祝你好运,
Fletcher
这篇关于VS2015 - MSTest或vstest - 命令行测试执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!