有没有人使用 Microsoft UI Automation 成功实施 UI 测试自动化制度?

发布于 2024-07-30 01:44:41 字数 915 浏览 11 评论 0原文

我正在寻找自动化 UI 测试框架/软件工具。 过去我一直使用TestComplete,虽然它是一个很好的软件,但是GUI测试自动化的概念被认为足够困难,我写了一些帖子 投诉 关于它

第三方测试自动化工具的问题之一是您必须学习新语言才能高效地使用它,更不用说工具支持很差。 我现在计划研究 .Net 3.0 附带的 Microsoft UI Automation白色框架。 但在我这样做之前,我想知道结果是什么。

有人有这方面的经验可以分享吗? 您是否在应用程序上使用 UI 自动化创建了可持续且成功的测试套件?

编辑:这似乎是一个非常难的问题。 如果我在这几天内没有收到任何答复,我会为此设置赏金。

I am looking for an Automated UI test framework/ software tool. In the past I have been using TestComplete, and although it's a good piece of software, but the concept of GUI test automation was deemed to be sufficiently difficult that I wrote a few posts to complain about it.

One of the problems with third party test automation tool is that you have to learn new language in order to be productive on it, not to mention that the tooling support is poor. I am now planning to look into Microsoft UI Automation that comes with .Net 3.0 and the White Framework. But before I do that, I want to know what's the outcome there.

Anyone has any experience to share on this? Have you create a sustainable and successful test suite using UI automation on your application?

Edit: This seems like a very hard question. I would setup bounty for this if I don't receive any answers within these few days.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

浮云落日 2024-08-06 01:44:41

这是一个非常晚的响应(您可能已经发货),但我用它测试了 WPF 应用程序。

我在使用VS2010 beta1版本时遇到了很多不稳定的情况,遇到了一些bug。 使用发布版本,我遇到的问题较少。

这很有挑战性,因为我同时学习 WPF、VS UI 自动化和 WPF/Windows 可访问性。 事实上,创建防弹自动化 UI 测试很困难,这增加了这一难度。

在 VS2010 RTM 之后,我仍然遇到我们包装的本机/自定义页面的间歇性问题。 我认为这部分是由于养育问题,部分是由于线程/进程问题。

我遇到的最头痛的事情是当我尝试测试 WPF 工具包中使用的某些控件时,特别是 DataGrid 控件。 它有一些已知的 UI 自动化错误,我花了很长时间来解决它们。

我还遇到了 UI 自动化框架在后台缓存数据的一些挑战。 我必须重新实例化控件才能获取它们的更新数据(特别是当控件的父级设置不佳时的可见性)。

如果我有一个纯 WPF 或纯 Win32 应用程序,它没有从其他应用程序继承 UI、将内容包装在 WebBrowser 控件中、使用自定义控件等,那么我可能会再次使用它。 如果您还没有做出决定,并且您的应用程序使用其中任何一个,那么我会看看是否可以使用其他东西。 也许使用一组更简单的脚本来执行更有限的集成测试,并尝试使用模拟对象通过单元测试覆盖其余部分。

不过,我在过去 6 个月内没有使用过它,所以您的里程可能会有所不同。

This is an extremely late response (you probably already shipped), but I tested a WPF application with it.

I had a lot of flakiness while I was using the beta1 version of VS2010, and encountered some bugs. Using the release version, I had fewer problems.

It was challenging because I was learning WPF, VS UI automation, and WPF/Windows accessibility all at the same time. The fact that it is hard to create bullet proof automated UI tests added to this difficulty.

After the VS2010 RTM, I still had intermittent issues with a native/custom page that we wrapped. I think this was partially due to a parenting issue, and partially due to a threading/process issue.

The biggest headache I encountered was when I was trying to test against some control we used from the WPF toolkit, in particular the DataGrid control. It had some known UI automation bugs, and I had a devil of a time working around them.

I also encountered some challenges where the UI automation framework was caching data behind the scenes. I would have to re-instantiate controls in order to get updated data on them (particularly visibility, when a control was poorly parented).

If I had a pure WPF or pure Win32 app, that didn't inherit UI from other applications, wrap things in WebBrowser controls, use custom controls, etc, then I'd probably use it again. If you haven't made a decision yet, and your app uses any of those, then I'd see if I could use something else. Maybe a simpler set of scripts to do more limited integration testing, and try to cover the rest with unit tests, using mock objects.

I haven't used it within the last 6 months, though, so your mileage might vary.

以可爱出名 2024-08-06 01:44:41

我们在这里使用 White 测试框架,取得了很好的结果。

该框架使用 win32 消息传递来查找控件并与它们交互。 然而,在具有大量控件的大型表单上,它的速度相当慢,这是我遇到的唯一缺点。 我们也使用 buildbot 和 nunit-console 自动化测试运行。

We use the White test framework here with great results.

The framework uses win32 messaging to find the controls and interact with them. It's fairly slow on large forms with a lot of controls however, that's the only drawback I've encountered. We automate the test running using buildbot and nunit-console too.

成熟稳重的好男人 2024-08-06 01:44:41

我编写了一个基于 IronRuby 的 gem,名为 Bewildr,它包装了 MS UI 自动化框架。 它已成功用于 BBC 等多家公司的 MS WPF 应用程序自动化。 以下是使用它的分步指南:http://www.natontesting.com/2011/08/27/step-by-step-example-of-bdding-a- wpf-app-with-cucumber-rspec-ironruby-and-bewildr/

I wrote an ironruby-based gem called Bewildr that wraps the MS UI Automation framework. It has been successfully used to automate MS WPF apps at various companies including the BBC. Here's a step-by-step guide to using it: http://www.natontesting.com/2011/08/27/step-by-step-example-of-bdding-a-wpf-app-with-cucumber-rspec-ironruby-and-bewildr/

笙痞 2024-08-06 01:44:41

我一直在使用 C#.net 的 MS UI 自动化框架,我发现这非常简单且有用。没有观察到任何问题,但它缺乏报告生成支持,因此您需要根据您的特定测试用例编写自己的逻辑。

总体满意度:8 / 10。

I have been using MS UI Automation framework using C#.net and i found this extremely simplem and helpful.No issues were observed as such but it lacks report generating support so you need to write your own logic for that based on your specific test case.

Overall satisfaction : 8 / 10.

尤怨 2024-08-06 01:44:41

我没有使用 Microsoft UI 自动化的经验,但我正在使用 AutoIt (http://www.autoitscript.com /autoit3/) 进行一些 GUI 自动化。 我用它来测试我的 Visual Studio 加载项。 并不是你问题的真正答案,但它可能对你来说很有趣。

问候,

塞巴斯蒂安

I have no experience with Microsoft UI Automation, but I'm using AutoIt (http://www.autoitscript.com/autoit3/) to do a little bit of GUI automation. I'm using it to test my Visual Studio add-in. Not really an answer to your question, but it could be interesting for you.

Regards,

Sebastiaan

谁把谁当真 2024-08-06 01:44:41

冷漠的反应...我最好回答一个虚拟的答案,以防万一没有好的答案。

Cold Response... Better I answer a dummy answer, just in case there is no good answer to this.

開玄 2024-08-06 01:44:41

我使用了 .net 框架的轻量级 UI 自动化测试,使用与此类似的方法:

http://msdn.microsoft.com/en-us/magazine/cc163864.aspx

我确实在使用选项卡和决定要使用哪些面板时遇到了问题,但这最终导致了重新设计表单(所以它也发现了设计中的问题!)

Ive used a lightweight version of UI automated testing for the .net framework using a similar approach to this:

http://msdn.microsoft.com/en-us/magazine/cc163864.aspx

I did encounter issues using tabs and deciding which panels were going to be used, but that eventually led to a redesign of the form (so it pretty much found issues in design too!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文