Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF - PRISM (CAL) - automated functional testing
    text
    copied!<p>I'm currently new in a project that was started 1 year ago. </p> <p>This project is using C#, WPF, PRISM (CAL), Entity Framework, LINQ, etc. The application is done using the MVVM pattern. </p> <p>There are some unit tests, but I was asked to do functional testing because most of the bugs were found when using all the components together.</p> <p>I started making a MSTEST project. My goal was to start the entire application back-end (model and viewmodel), simulate UI events and check the model modifications accessing on or more viewmodel properties. </p> <p>My first guest was to create the Entity context (the model), initialize all the PRISM modules and start publishing events in the view-model to modify my model and check back the results in the same or other viewmodels. I had to :</p> <ul> <li>Override the prism Boostrapper class</li> <li>Create a simple application (because under MSTEST it seems that <code>System.Windows.Application.Current</code> is null). I just derived a class from <code>System.Windows.Application</code>.</li> </ul> <p>I can access all of my interfaces implementation using the UnityContainer. The problem I have now is that the <code>IEventAggregator</code> is not working. Events are not fired. I don't want to mock the event aggregator because I want it to fire my events between the prism modules (I'm doing functional testing, not unit testing).</p> <p>I found a way to make it work by playing with the <code>Dispatcher</code> and <code>DispatcherFrame</code>, but I get stock in the <code>RegionManager</code> that seems to fail.</p> <p>My questions is: is there a better way to do my functional/integration testing without necessarily showing the user interface?</p>
 

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