带自动化/编码 UI 测试的第三方 WPF 套件

发布于 2025-01-01 22:10:25 字数 1421 浏览 2 评论 0原文

我的团队正在全力投入一个新项目,我们正在借此机会让自己了解最新的 Scrum 方法、新技术等。其中一部分涉及尝试使用 Microsoft 测试管理器和 VS2010 编码 UI 测试来自动化我们的 QA 流程。

但是,我们在使自动测试回放与我们当前选择的 WPF 控件库(DevExpress XPF 套件)一起使用时遇到问题。多年来,我们一直在他们的 WinForms 和 ASP.NET 控件中使用 DevExpress,但这是我们第一次使用他们的 WPF 控件和自动化 UI 测试,而这两者似乎不能很好地协同工作。

特别是,尝试回放与网格控件交互的录制测试永远无法正常工作,即使在简单的控件上,回放似乎也会对应该与哪个编辑器交互感到困惑。在我们的测试主管从 MTM 生成的操作记录中,我看到了很多这样的内容:

Type '5236' in 'PART_Editor' text box
Type '253' in 'PART_Editor' text box

更糟糕的是,在网格内部:

Click 'FooterPanel' pane 
Last action on list item was not recorded because the control does not have any good identification property.
Click 'FooterPanel' pane
Click 'Item: CashEntry, Column ...' custom control 
Move 'Item: CashEntry, Column ...' custom control from (141,     10) to 'Item: CashEntry, Column ...' custom control (5, 11) 
Type '{NumPad8}{Down}{NumPad5}{NumPad0}{Up}{Down}{Down}' in 'CashEntry' window

现在,我在 DevX 的论坛上看到了很多关于他们的 WinForms 控件对编码 UI 的 MSAA 支持不够好的讨论测试可以工作,但我认为 WPF 使用了一种不同的机制来进行自动化 UI 测试,应该可以更好地工作。所以,我的问题是:

  1. 有没有办法让 DevX XPF 控件更好地与编码/自动化 UI 测试配合使用?
  2. 如果没有,是否有已知可以与编码/自动化 UI 测试良好配合的替代 XPF 控制套件?

我对具有排序、分组等功能的类似网格的组件、类似导航栏的组件和自定义编辑器(日期、数字等)特别感兴趣,所有这些都支持统一的系统范围主题。

(此外,如果仅使用本机 WPF 控件和样式就可以轻松完成此类操作,那么了解这一点也会很有帮助。)

编辑:由于似乎没有真正与 MTM 一起使用的 WPF 控件套件,我们'我们被迫同时使用两个单独的测试工具。根据这里的几个答案,我们强烈倾向于 TestComplete。希望情况尽快好转。

My team is diving headfirst into a new project and we are taking the opportunity to bring ourselves up to date with Scrum methodology, new technology etc. Part of this involves trying to automate our QA process, using both Microsoft Test Manager and VS2010 Coded UI tests.

However, we are having problems getting the automated test playback to work with our currently-selected WPF control library, the DevExpress XPF suite. We've been using DevExpress for their WinForms and ASP.NET controls for years now, but this is our first experience with their WPF controls, and with automated UI tests, and the two don't seem to work well together.

In particular, trying to play back a recorded test that interacts with a grid control never works right, and even on simple controls the playback seems to get confused over which editor it should be interacting with. In the action recordings our test lead is generating from MTM I see a lot of this:

Type '5236' in 'PART_Editor' text box
Type '253' in 'PART_Editor' text box

And even worse, inside of the grids:

Click 'FooterPanel' pane 
Last action on list item was not recorded because the control does not have any good identification property.
Click 'FooterPanel' pane
Click 'Item: CashEntry, Column ...' custom control 
Move 'Item: CashEntry, Column ...' custom control from (141,     10) to 'Item: CashEntry, Column ...' custom control (5, 11) 
Type '{NumPad8}{Down}{NumPad5}{NumPad0}{Up}{Down}{Down}' in 'CashEntry' window

Now, I have seen plenty of chatter on DevX's forums about their WinForms controls not supporting MSAA well enough for coded UI tests to work, but I thought that WPF used a different mechanism for automated UI testing that was supposed to work better. So, my questions are:

  1. Is there a way to get the DevX XPF controls to work better with coded/automated UI tests?
  2. If not, is there an alternative XPF control suite that is known to work well with coded/automated UI tests?

I'm specifically interested in a grid-like component with sorting, grouping, etc., a navbar-like component, and custom editors (dates, numbers, etc), all which support a unified system-wide theming.

(Also, if this type of thing is easy enough to do using just native WPF controls and styles, that would be helpful to know as well.)

EDIT: Since there appears to be no WPF control suite that actually works with MTM, we're being forced to use two separate testing tools at the sam time. Per several of the answers here, we're strongly leaning towards TestComplete. Hopefully the situation improves soon.

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

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

发布评论

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

评论(4

迟月 2025-01-08 22:10:25

对于支持此功能的控制套件不太了解,但我们过去分析过一个测试套件,它支持 WPF 的基于对象的自动化测试。看看 TestComplete (尽管它不是免费的)

这里是摘录有网站提到他们提供的控制支持 -

WPF 控件支持 TestComplete 为 WPF (XAML) 提供丰富的支持
WPF 应用程序的控件和强大的自动化 UI 测试。
TestComplete 的高级测试操作,例如项目选择或单元格
数据输入是对象感知的而不是坐标感知的,因此
执行 WPF 时更稳定、更能抵抗 UI 变化
测试。灵活的对象映射方案允许测试人员映射自定义
或将 WPF 控件派生为标准类型以简化 UI
操纵。 还可以添加对自定义 WPF 控件的支持
使用 TestComplete SDK。

http://smartbear .com/products/qa-tools/automated-testing/testing-wpf-apps/

Don't have much idea about control suite supporting this but We had analyzed a test suite in past which supports objects based automated testing for WPF. Have a look at TestComplete (although it's not free)

Here is an excerpt from there site mentioning control support they provide -

WPF Control Support TestComplete offers rich support for WPF (XAML)
controls and robust automated UI testing of WPF applications.
TestComplete’s high-level test actions, such as item selection or cell
data input, are object-aware rather than coordinate-aware and thus are
more stable and resistant to the UI changes when performing WPF
testing. Flexible object mapping schemes allow testers to map custom
or derived WPF controls to standard types to simplify UI
manipulations. Support for custom WPF controls can also be added
using the TestComplete SDK.

http://smartbear.com/products/qa-tools/automated-testing/testing-wpf-apps/

挽手叙旧 2025-01-08 22:10:25

我听说过关于 的好消息WiPFlash

I've heard very good things about WiPFlash.

孤君无依 2025-01-08 22:10:25
  • 在我们的一个项目中,我们使用了 Infragistics WPF 控件,并且 TestComplete 可以与它​​配合使用。

  • 我们的 QS 团队还使用 TestComplete

  • 我发现了一个独立的免费实用程序UI 库。

SIKULI 项目

Sikuli 是一种自动化和测试图形用户的可视化技术
使用图像(屏幕截图)的界面(GUI)。西库里 包括 西库里
Script(Jython 的可视化脚本 API)和 Sikuli IDE(一个
用于编写可视化脚本的集成开发环境
轻松截图。 Sikuli 脚本可以自动执行您在网上看到的任何内容
没有内部 API 支持的屏幕。您可以通过编程方式
控制网页、Windows/Linux/Mac OS X 桌面应用程序,或
甚至是在模拟器中运行的 iPhone 或 Android 应用程序或通过
VNC。

  • In one of our projects we've used Infragistics WPF controls and TestComplete works with it.

  • Our QS Team also use TestComplete

  • I found a free utility that is independent of UI libraries.

PROJECT SIKULI

Sikuli is a visual technology to automate and test graphical user
interfaces (GUI) using images (screenshots). Sikuli includes Sikuli
Script, a visual scripting API for Jython, and Sikuli IDE, an
integrated development environment for writing visual scripts with
screenshots easily. Sikuli Script automates anything you see on the
screen without internal API's support. You can programmatically
control a web page, a Windows/Linux/Mac OS X desktop application, or
even an iphone or android application running in a simulator or via
VNC.

泪冰清 2025-01-08 22:10:25

刚刚发现这个线程...
我们在使用 DevExpress 组件时遇到了同样的问题,
在播放 CUIT 时找不到这些内容。
但特别是使用 Sikuli 脚本,问题是可以解决的......至少。

  1. 使用 MS Test Manager 记录测试
  2. 回放测试,以查找无法重现的步骤
  3. 创建 Sikuli 序列以“跳过”
  4. 在 CUIT 中的适当位置包含创建的 Sikuli 脚本,并在步骤 2 处重新开始 以

这种方式创建测试确实需要时间,但至少它的可能的。

just found this thread...
we had the same problem using DevExpress components,
which weren't findable on playback of CUIT.
But especially with Sikuli script the problem is solveable...at least.

  1. Record test with MS Test Manager
  2. Playback test, to find unreproduceble step
  3. Create Sikuli sequence to 'step over'
  4. Include created Sikuli script at appropriate position in CUIT and start again at Step 2

It really takes time to create tests this way, but at least its possible.

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