3

I am new to windows phone development and Visual Studio. I am writing a windows phone app on Visual Studio Express for Windows. This app has some WinRT components. To unit test this app I used Windows Phone Unit Test App. This Test app run on Windows phone. Is there anything for windows phone from which i can unit test the app apis on desktop itself if yes how can i achieve that?

Is there any maven plugin support for windows phone which does unit testing?

The basic idea behind this is to integrate it with Continuous integration server

Thanks in Advance

Shrikanth Kalluraya
  • 1,099
  • 1
  • 16
  • 34

1 Answers1

2

You can put the API into a Portable Class Library and test this using other testing tools on your machine (in contrast to WP/Windows apps, xUnit and other great testing frameworks support PCLs)

Furthermore, for testing WP apps, you can do this on your machine as well by running them in the emulator.

To do all these things automatically, look into mstest.exe or even better: the new vstest.console.exe which is used for app unit tests. Depending on what exactly you want to do, this or this might help :)

Community
  • 1
  • 1
sibbl
  • 3,203
  • 26
  • 38
  • Thanks for the direction sibbl. I will check the option and let you know. Can I use cxxtest framework for creating unit testcases of Windows phone? In my previous project some guys where doing unit testing using cxxtest for a embedded project. – Shrikanth Kalluraya Nov 21 '14 at 11:11
  • 2
    When i try to use vstest.console.exe I am always getting Warning: Unit tests for Windows Store and Windows Phone apps cannot be run outside appcontainer. Create an app package and run tests in appcontainer mode. [http://go.microsoft.com/fwlink/?LinkId=254169] http://go.microsoft.com/fwlink/?LinkId=254169) Warning: No test is available in UnitTestLibrary2.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again. – Shrikanth Kalluraya Nov 21 '14 at 12:14
  • And also which unit test project to create for creating unit test in command line? because when i try to list tests via vstest.console.exe it shows me a testcase name but when i try to run the dll it tells no testcase – Shrikanth Kalluraya Nov 21 '14 at 12:33