Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As for the testing itself, you're probably best off using the <a href="https://msdn.microsoft.com/library/ms747327.aspx" rel="noreferrer">UI Automation</a> framework. Or if you want a more fluent and wpf/winforms/win32/swt-independent way of using the framework, you could download <a href="http://www.codeplex.com/white" rel="noreferrer">White</a> from Codeplex (provided that you're in a position to use open source code in your environment).</p> <p>For the gotchas; If you're trying to unit test your views, you will probably run in to some threading issues. For instance, if you're running NUnit the default testrunner will run in MTA (Multi-Threaded Appartment), while as WPF needs to run as STA (Single-threaded Appartment). <a href="http://miketwo.blogspot.com/2007/03/unit-testing-wpf-controls-with.html" rel="noreferrer">Mike Two</a> has a real easy getting-started on unit testing WPF, but without considering the threading issue. Josh Smith has some thoughts on the threading issue in <a href="http://joshsmithonwpf.wordpress.com/2007/07/09/using-nunit-with-wpf/" rel="noreferrer">this post</a>, and he also points to <a href="http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/" rel="noreferrer">this article</a> by Chris Hedgate. Chris uses a modified version of Peter Provost's <a href="http://www.peterprovost.org/blog/post/NUnit-and-Multithreaded-Tests-CrossThreadTestRunner.aspx" rel="noreferrer">CrossThreadTestRunner</a> to wrap the MTA/STA issues in a bit more friendly way. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload