Windows Phone 8 Continuous integration: Run unit tests by command line

Source: Internet
Author: User
Tags command line documentation visual studio

Theoretical basis

For a reference to how to create a unit test project on WP8, here is a documentation for MSDN first.

Http://msdn.microsoft.com/en-us/library/windowsphone/develop/dn168930%28v=vs.105%29.aspx

The article clearly describes the steps to build a Windows Phone unit test project.

But what we need for continuous integration is to do the result collection of unit tests through the command line. Based on the MSDN documentation, we can run unit tests through command line Vstest.console.exe.

Installation directory is here:

C:\Program Files (x86) \microsoft Visual Studio 11.0\common7\ide\commonextensions\microsoft\testwindow

How to use:

Vstest.console D:\Projects\BankAccountTest\Bin\x86\Debug\BankAccountTest_Debug_x86.xap

Practice

Create a Unittestproject (vs2012 Update2 later version support):

To add a simple test code:

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

Compile this test project, go to the output directory, run Vstest.console try:

It works:-).

Summarize

1, so we can configure a script to automatically build the code, the build is completed and then call this command run unit test, 100% after the completion of the build.

With such continuous integration, automated builds are no longer a dream for apps on WP.

2, for the Codecoverage statistics, search the following results found:

Currently, Codeconverage statistics are not supported for Windows Store and Windows Phone programs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.