Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer which has evolved over the last few years is, <em>you don't apply TDD to the GUI, you design the GUI in such as way that there's a layer just underneath you can develop with TDD.</em> The Gui is reduced to a trivial mapping of controls to the ViewModel, often with framework bindings, and so is ignored for TDD.</p> <p>This is known variously as the <a href="http://martinfowler.com/eaaDev/PresentationModel.html" rel="noreferrer">Presentation Model</a> (Fowler) the <a href="http://blogs.msdn.com/johngossman/archive/2005/10/08/478683.aspx" rel="noreferrer">Model-View-ViewModel</a> and <a href="http://robbbloggg.blogspot.com/2008/04/datamodel-view-viewmodel-in-wpf-part-1.html" rel="noreferrer">DataModel-View-ViewModel</a> architecture. </p> <p>This approach removes the GUI layer from TDD and unit testing. It does not mean the GUI is never tested but just acknowledges that it is not cost effective to pursue automated GUI testing, particularly as part of TDD. Integration and user testing should cover the GUI.</p> <p>Josh Smith's <a href="https://msdn.microsoft.com/en-us/magazine/dd419663.aspx" rel="noreferrer">2009 WPF article</a> is a detailed explanation of MVVM with some testing.</p> <p>More recently, Houssem Dellai's <a href="https://channel9.msdn.com/Blogs/MVP-Windows-Dev/Creating-Unit-Tests-for-Xamarin-Forms-Apps" rel="noreferrer">2016 video Creating Unit Tests for Xamarin Forms Apps</a> shows a XAML UI with bound ViewModel and walks through creating a unit test project </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.
    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