How to test WPF components using NUnit?

823 Views Asked by At

I am trying to test each components of my WPF application by using NUnit. But how to test the graphical components like button, grid, textblock, richtextbox etc?

1

There are 1 best solutions below

2
On

Take a look at Teststack.White . Pretty easy to use:

  1. Start application.
  2. Attach app process.
  3. Find Window by (SearchCriteria).
  4. Get element you want to test by Window.Get(SearchCriteria)
  5. Test whatever you want

Tutorial Link

Cheers