Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Experiences with UI Automation and WPF [closed]

We are developing a rather large WPF based application and would like to include some automated UI testing in our test suite (which already contains a number of unit tests).

The UI Automation Framework from Microsoft partly sounds like a perfect fit for programatically launching and interacting with the application in a test setup. However, I've struggled to find solid references for samples and experiences with the technology, the articles and small samples available on MSDN is not enough to convince me that it is a solid choice.

So, does anybody have real world experiences using the UI Automation Framework in their test suite? What are the caveats and the gotchas? Any best practices when written tests scripts, can you "record and replay" to a scriptable format, how much should you facilitate the testing from the application, how did you incorporate it in the automatic build? Should we be looking in another direction than the UI Automation Framework?

Feel free to post you experiences here or link to some good references I might have missed

like image 542
soren.enemaerke Avatar asked Mar 13 '09 19:03

soren.enemaerke


People also ask

What is UI test automation?

User interface (UI) testing is a process used to test if the application is functioning correctly. UI testing can be performed manually by a human tester, or it can be performed automatically with the use of a software program. Automated UI testing is the automation of manual test tasks.

What is UI Automation framework?

UI Automation provides programmatic access to most user interface (UI) elements on the desktop, enabling assistive technology products such as screen readers to provide information about the UI to end users and to manipulate the UI by means other than standard input.

What is WPF project?

Windows Presentation Foundation is a UI framework that creates desktop client applications. The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security.

Is coded UI deprecated?

Coded UI Test for automated UI-driven functional testing is deprecated. Visual Studio 2019 is the last version where Coded UI Test will be fully available.


2 Answers

Where i work we have just started to evaluate some test tools for our system. We came across a tool called white, which uses the UI Automation Framework. Note that white does also have a record function although i think it has looks of issues and is still being developed.

What we tried doing was set them up to look like unit tests i.e. [TestFixture] [Test] etc. then we were able to run them through nunit at the same time as the unit tests.

We have found that it can be difficult to access some of the components within your window, but haven't had much of a chance to investigate why.

If you don't mind paying for the software then I would recommend TestComplete.

like image 145
Bijington Avatar answered Oct 20 '22 12:10

Bijington


I'm in the middle of doing the UI Automation of a WPF app at work. I'm using White and IronRuby and it works great. I've written up how I've done it here: http://www.natontesting.com/2010/02/17/how-to-test-a-wpf-app-using-ironruby-and-white/

like image 24
Nat Ritmeyer Avatar answered Oct 20 '22 12:10

Nat Ritmeyer