Sponsors

News

Jobping Laurent Kempé MVP JetBrains Academy Member Certified ScrumMaster

Contact

My status

View Laurent Kempé's profile on LinkedIn
XING
twitter
facebook


Xbox 360



Map

Locations of visitors to this page

.NET Dudes

Family

French .NET Dudes

Friends

Jobping

Links

Tech Head Brothers

Automated WPF functional tests using White

I’d like to introduce a tool that I have added for a month or two in my toolset. This tool is White from ThoughtWorks. Here is the description of White:

White: Automate windows applications

White supports all rich client applications, which are Win32, WinForm, WPF and SWT (java).
It is .NET based and hence you wouldn't have use proprietary scripting language. You can use your favourite .NET language, IDE and tools for developing tests/automation programs.
White provides consistent object oriented API for all kinds of applications. Also it hides all the complexity of Microsoft's UIAutomation library and windows messages (on which it is based).
(While WHITE is completely ready to be used, the documentation is still work under progress. Please do point out the areas which needs documentation.)

When I found White with it’s version 0.19, I was a bit skeptical about the state of this piece of software. But it is really ready to be used.

By the way the latest version 0.19 of White supports also Silverlight.

I had the need to automate some functional tests of a WPF application that I am working on. When such an application is growing it becomes more and more difficult to do functional tests manually, so it needs automation.

So what I was searching for was something that would let me write unit tests in C# with NUnit which automate a WPF application. It is not that I don’t want to learn another language but I needed to be efficient so I preferred to use something I knew. And what I have found is White.

I have tested it with the RadRibbonBar for WPF of Telerik and it works just great. btw Thanks to Telerik for the offered license, which my company Innoveo Solutions also ordered now.

If you are starting with automated functional testing I recommend you to read the Functional Testing. It explains step by step how to write automated functional tests with White. The basic can be also used with another tool.

It is funny to see you application running without you clicking around.

I still need to have this run by our build server, TeamCity. I have currently not done any investigation on that point. I plan to have those tests running at least nightly, but I have to see how the unit tests could be started on an environment with a desktop.

Posted: Jan 27 2010, 08:50 PM by lkempe | with 7 comment(s)
Filed under: , ,

Comments

Twitter Trackbacks for Automated WPF functional tests using White - Laurent Kemp?? [asp.net] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Automated WPF functional tests using White - Laurent Kemp??         [asp.net]        on Topsy.com

# January 28, 2010 9:58 AM

Carel Lotz said:

To get it running via TeamCity, you will have to run TeamCity via the batch file to allow it to interact with the desktop.  Have a look at this article written by WebAii (another SL automation library) for pointers.  The implementation should be something along that lines.

www.artoftest.com/.../topicsindex.aspx

Carel

# January 28, 2010 3:44 PM

Jaans said:

How would this compare to the new UI testing capabilities shipping with VS2010?

Anyone have some useful insights between the two?

# January 28, 2010 7:52 PM

lkempe said:

Carel: Thanks for the feedback. I did exactly that yesterday. Configured a server to autologin with autorun script launching teamcity start script. I will blog about it when I get time.

# January 29, 2010 2:09 AM

lkempe said:

Jaans: No clue! I have not used it at the moment.

# January 29, 2010 2:11 AM

Daily links 2010-02-01 | Maxim's blog said:

Pingback from  Daily links 2010-02-01 | Maxim's blog

# February 1, 2010 5:14 PM

Nat Ritmeyer said:

I'm using White to automate a WPF app, but I'm using IronRuby to do it - all the benefits of using white, all the benefits of a dynamic, interpreted language! I've written up how to do it here...

www.natontesting.com/.../how-to-test-a-wpf-app-using-ironruby-and-white

# February 18, 2010 1:08 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)