Unit Testing Windows Phone Applications

Posted by Anuraj on Monday, May 6, 2013

.Net CodeProject Unit Testing Visual Studio Windows Phone

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App.

Windows Phone Unit Test App - Project Template

This will help you to create unit test project for Windows Phone 8 applications. Once you create the project, necessary references will be added to the project by Visual Studio.

Windows Phone Unit Test App - Project References

If you are familiar with MS Test, you don’t need to learn any new framework for testing phone apps. The Windows Phone test framework is designed as an adapter on top of the extensible Visual Studio 2012 unit testing platform. So you can run the tests from VS 2012 IDE itself.

Running Windows Phone Unit Tests from VS 2012 IDE

You can run the tests from console also, using vstest.console.exe. You can also choose to export the results to Visual Studio Test Results File using /Logger:trx command line switch. This unit testing feature is supported in Express Edition also.

Happy Programming



Did you like this article? Share it with your friends

Facebook Twitter Google+ LinkedIn Reddit StumbleUpon



Subscribe


Copyright © 2017 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub