Question

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.

Was it helpful?

Solution

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/

OTHER TIPS

I've heard very good things about WiPFlash.

  • 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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top