Update to Testing WPF applications with the White UI Test framework

I received a question about the example in my blog on Testing WPF applications with the White UI Test framework. It seems that people are having problems running it.

Unfortunately, White has changed since I posted that example. The WPFWindow class has been protected so you now have to use the Window class instead. Furthermore, I stopped using White’s Verify class because it was linked with NUnit 2.4.6 and I was using later versions of NUnit. So, I have revised the example and attached it here.

However, the specific error I saw from a reader suggests that I was not clear in the instructions on how to run the example. To run the example after you down load it, you must:

1. Install NUnit. I recommend the most recent version on Source Forge

2. Install the most recent version of White

3. Open the example solution in Visual Studio

4. Expandthe References tag for the Test project and

a. Remove the references to nunit.framework and White.Core

b. Add references to your local installations of nunit.framework and White.Core

c. If you do not do these steps, the Test.dll will fail because they will still be referencing the locations where I had installed NUnit and White

5. Rebuild the solution

6. Run the Test.dll under Nunit

ListBoxExample.zip

Comments

  • Anonymous
    October 17, 2010
    I also faced the probelm with the previous sampe. Works fine now I have a query : Is it possible to debug the test program(AddPeopleTest here).

  • Anonymous
    June 13, 2011
    The comment has been removed