简体   繁体   English

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

[英]Is there Anyone who Successfully Implement UI Test Automation Regime using Microsoft UI Automation?

I am looking for an Automated UI test framework/ software tool. 我正在寻找一个自动UI测试框架/软件工具。 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 . 在过去,我一直在使用TestComplete ,虽然它是一个很好的软件,但GUI测试自动化的概念被认为是足够困难,我写了一些帖子抱怨

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 . 我现在正计划研究.Net 3.0和White Framework附带的Microsoft UI Automation 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? 您是否在应用程序中使用UI自动化创建了可持续且成功的测试套件?

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. 如果我在这几天内没有收到任何答案,我会为此设置赏金。

This is an extremely late response (you probably already shipped), but I tested a WPF application with it. 这是一个非常晚的响应(你可能已经发布了),但我用它测试了一个WPF应用程序。

I had a lot of flakiness while I was using the beta1 version of VS2010, and encountered some bugs. 当我使用VS110的beta1版本时,我有很多邋and,并遇到了一些错误。 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. 这很有挑战性,因为我同时学习WPF,VS UI自动化和WPF / Windows可访问性。 The fact that it is hard to create bullet proof automated UI tests added to this difficulty. 很难创建防弹自动UI测试的事实增加了这个难度。

After the VS2010 RTM, I still had intermittent issues with a native/custom page that we wrapped. 在VS2010 RTM之后,我仍然遇到了包含本机/自定义页面的间歇性问题。 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. 我遇到的最大问题是当我试图测试我们从WPF工具包使用的某些控件时,特别是DataGrid控件。 It had some known UI automation bugs, and I had a devil of a time working around them. 它有一些已知的UI自动化错误,我有一段时间在他们身边工作。

I also encountered some challenges where the UI automation framework was caching data behind the scenes. 我还遇到了一些UI自动化框架在后台缓存数据的挑战。 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. 如果我有一个纯WPF或纯Win32应用程序,它没有从其他应用程序继承UI,在WebBrowser控件中包装,使用自定义控件等,那么我可能会再次使用它。 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. 但是,我在过去6个月内没有使用它,所以你的里程可能会有所不同。

We use the White test framework here with great results. 我们在这里使用White测试框架,效果很好。

The framework uses win32 messaging to find the controls and interact with them. 该框架使用win32消息传递来查找控件并与它们进行交互。 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. 我们使用buildbot和nunit-console自动运行测试。

I wrote an ironruby-based gem called Bewildr that wraps the MS UI Automation framework. 我写了一个名为IronRuby的基础宝石Bewildr包装了MS UI自动化框架。 It has been successfully used to automate MS WPF apps at various companies including the BBC. 它已成功用于在包括BBC在内的多家公司实现MS WPF应用程序的自动化。 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/ 以下是使用它的分步指南: http//www.natontesting.com/2011/08/27/step-by-step-example-of-bdding-a-wpf-app-with-cucumber- rspec的-IronRuby的和- bewildr /

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

Overall satisfaction : 8 / 10. 总体满意度:8/10。

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. 我没有使用Microsoft UI Automation的经验,但我正在使用AutoIt( http://www.autoitscript.com/autoit3/ )进行一些GUI自动化。 I'm using it to test my Visual Studio add-in. 我正在使用它来测试我的Visual Studio加载项。 Not really an answer to your question, but it could be interesting for you. 不是你问题的答案,但对你来说可能很有意思。

Regards, 问候,

Sebastiaan Sebastiaan

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

Ive used a lightweight version of UI automated testing for the .net framework using a similar approach to this: 我使用类似的方法对.net框架使用轻量级UI自动化测试:

http://msdn.microsoft.com/en-us/magazine/cc163864.aspx 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!) 我确实遇到了使用制表符和决定使用哪些面板的问题,但这最终导致了对表单的重新设计(所以它在设计中也发现了很多问题!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM