运行Powershell的Coded UI测试与运行TFS构建的Coded UI测试 [英] Coded UI test running Powershell vs Coded UI test running TFS build

查看:117
本文介绍了运行Powershell的Coded UI测试与运行TFS构建的Coded UI测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


 我创建了一个在VS2017上运行的Coded UI测试。如果我以管理员身份启动VS2017,它会起作用。


即。我能够启动并执行mouse.click()操作。 



 我想为这些Coded UI测试创建夜间构建。我在TFS中创建了一个内置版本,最终启动了以下命令:


" vstest.console.exe C:\\\ tntant \ xxxxxxx \ test.dll"


测试已执行但由于启动某些程序或者mouse.click()操作失败而失败。



但是,如果我使用Powershell作为管理模式并键入相同的命令。我能够运行测试

解决方案



嗨LEE KAH WAI,



欢迎来到MSDN论坛。



您能否分享一下这个失败测试的详细错误信息?在构建日志中将显示导致它的一些特定原因。



您似乎使用测试代理执行测试,对吧?由于您希望运行Coded UI测试,您必须配置测试代理以与桌面交互并构建以交互模式运行的
代理。
请查看:
https://docs.microsoft.com/en-us/visualstudio/test/how-to-set-up-your-test-agent-to-run-tests-that-interact-with- the-desktop?view = vs-2019#to-set-up-an-agent-to-run-as-a-process



您使用的是哪个版本的TFS?你能检查dll文件路径是否正确吗?



期待您的回复。



真诚



Hi,

  I've created a Coded UI test that runs on VS2017. It works if I launch VS2017 as an administrator.

ie. I'm able to launch and perform the mouse.click() operations. 

  I wanted to create nightly builds for these Coded UI tests. I've created a build in TFS which eventually launches the following command

"vstest.console.exe C:\agent\xxxxxxxx\test.dll"

The tests are executed but failed due to launch certain programs or failed the mouse.click() operations.

However, if I use Powershell as administrative mode and keyed in the same command. I'm able to run the test

解决方案

Hi LEE KAH WAI,

Welcome to the MSDN forum.

Could you please share us the detail error info about this failed test? In the build log would be shown some specific reason that caused it.

It seems you use the test agent to execute the tests, right? Since you would like to run Coded UI test, you have to configure the test agent to interact with the Desktop and build agent running as interactive Mode. Please have a look with: https://docs.microsoft.com/en-us/visualstudio/test/how-to-set-up-your-test-agent-to-run-tests-that-interact-with-the-desktop?view=vs-2019#to-set-up-an-agent-to-run-as-a-process .

Which version TFS you used? Could you check if the dll file path is correct?

Looking forwards your reply.

Sincerely

May


这篇关于运行Powershell的Coded UI测试与运行TFS构建的Coded UI测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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