WPF UI自动化和TeamCity [英] WPF UI Automation and TeamCity

查看:78
本文介绍了WPF UI自动化和TeamCity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在使用UI自动化来测试Wpf应用程序.测试由TeamCity的NAnt构建代理启动.如果NAnt在控制台中运行,则效果很好.但是,如果它作为Windows服务运行,则测试将失败,因为UI自动化无法找到控件 在Wpf窗口中. BTW WinForms测试顺利通过.

I'm using UI Automation for testing a Wpf application. Tests are started by TeamCity's NAnt build agent. It works fine if NAnt runs in a console. But if it runs as a windows service tests fail because UI Automation cannot find controls in Wpf window. BTW WinForms tests pass without problems.

所以我的问题是如何使用作为Windows服务运行的NAnt代理并通过Wpf UI测试?

So my question is how can I use NAnt agent run as windows service and pass Wpf UI test?

预先感谢

推荐答案

邦德.

我打算在工作中做类似的事情.使用团队城市以自动化方式运行UI自动化测试.我尚未开始这项工作,但我计划使用虚拟机来运行该应用程序并运行测试.

I plan to do a simular thing at work. Running UI Automation Test in a automated fashion using team city. I haven't started this work yet but i plan to use a Virtual Machine to run the application and run the test.

要启动VM并基本上控制交互,我将使用一个名为vix的程序,这是一个VM自动化工具.之前,我已经使用它来运行VM,并使用测试电子表格作为UI通过COM测试我的应用程序API.以vix形式单位 测试我可以启动虚拟机,打开Excel电子表格,运行应用程序.关闭Excel并关闭VM.这还将报告teamcity能够显示的任何错误.

To start a VM and basically control the interaction, i going to use a program called vix, this is a VM automation tool. I have used this before to run a VM and test my applications API through COM, using a test spreadsheet as the UI. With vix form the unit test i can start a VM, open the Excel spreadsheet, run the application. close Excel and shutdown the VM. This woul also report any errors that teamcity was able to display.

值得一看

希望有帮助

羊杂种.

 


这篇关于WPF UI自动化和TeamCity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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