- BREAKING CHANGE Test task name is now "Test" (was "RunUnitTests")
- Windows Phone 7.1 (Mango) support
- Fixed display bug for ExpectedException tests
, install "WP7-CI" to the Windows Phone Silverlight Application that is being used for unit tests (create one if you haven't already).NOTE:
The package will change the startup page to "TestsPage.xaml", but you can revert it to "MainPage.xaml" by editing Properties/WMAppManifest.xaml. You can then delete the TestsPage.xaml file.
Don't have NuGet?
- Create a Windows Phone Silverlight Application for your tests if you haven't already
- Download the manual installation archive and extract it to a folder called "WP7-CI" under your application project folder.
- Add a reference to Microsoft.Silverlight.Testing.dll and Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll in lib/sl3-wp. Remove any references to previous versions of these assemblies.
- Manually edit your project file (csproj/vbproj) and place the following before the </Project> at the end of the file:
<Import Project="WP7-CI\tools\WP7CI.targets" />
Also, as is required by the standard testing framework, the following code should be placed in the Loaded event of your startup page:
var testPage = UnitTestSystem.CreateTestPage() as IMobileTestPage;
BackKeyPress += (x, xe) => xe.Cancel = testPage.NavigateBack();
(Application.Current.RootVisual as PhoneApplicationFrame).Content = testPage;