UI Unit Testing with Prism RRS feed

  • Question

  • Hello ,

    we have implemented prism application but not finding any proper way to test the Application [with UI Unit Test]

    i want to know about , how can i do unit testing for Prism Application ,

    when i run BootStrapper from Test regionManager does not add region in to coolection , that i have defined in Shell


     <ContentControl prism:RegionManager.RegionName="MainRegion" x:Name="cc"/>


     public ShellView()
                rm = Microsoft.Practices.ServiceLocation.ServiceLocator.Current.GetInstance<IRegionManager>();
                RegionManager.SetRegionManager(cc as DependencyObject, this.rm);
                rm.RequestNavigate("MainRegion", "ProductTreeDragDrop", completed);

    if run application Normally its working and shows sceen in Shell ,,

    but the same i call  ,, Bootstrapper.Run();

    RegionManager does not contains Region named "MainRegion" so navigation Service Not Initializing ,

    for that i have created new Shell [added region from code behind] and bootStrapper in Test Project in and its navigation Succesfully but not setting the content to Region so i am not getting Visual Tree for that Screen,my target is to Test Perticular screen With Naivigating with Prism and Ui testing iterating visual tree,

    plz help me for the same !!!!

    or suggest any way to tet ui with Prism Navigation !


    Vipul Thakkar

    Thursday, September 5, 2013 12:10 PM