Welcome to MSDN Blogs Sign in | Join | Help

Visual Studio For Devices

A Team blog from the Visual Studio for Devices Team
Unit Testing for .Net Compact Framework

This blog post should have happened some time ago and the only reason it has taken so long is due to my laziness :-)

With the recent Visual Studio Orcas CTPs, we are shipping preview bits of one of the biggest features Visual Studio for Devices has to offer for Orcas - unit testing for NetCF applications. 

We would love to get feedback/britbats. Note that these are very, very early bits - so please be gentle :-). Here's how you can try it out. Leave a comment or mail any feedback to sriramk at microsoft.com.

 
Preparation

-  Download the CTP

- Make sure your target device or emulator already has NetCF v2 installed. We will *not* deploy it automatically. The easiest way to do this is to simply deploy a v2 project


Steps to run your first device unit test


- Create a NetCF v2 project. Can be anything other than Console Application (we have a bug around Console Applications that will be fixed in the next release)

- On any method, right-click and choose 'Create Unit Tests'

- From the dialog that pops up, choose 'Create a new Smart Device Visual C# Test Project' (or the equivalent VB one). Go ahead and create the test project.

- You should now see a spanking new test project. Go ahead and type in your unit test code. You know you want to :-)

- Click on Test->Windows->Test Manager. You should see a list of all your unit tests.

- Check 'All Loaded Tests'

- Click on 'Run Checked Tests' (the button with the green arrow)

- Voila! Your tests should run and you'll see the results in the test results window

 

Sriram Krishnan 

Published Sunday, November 12, 2006 8:36 by MobileDevGroup

Comments

# re: Unit Testing for .Net Compact Framework @ Sunday, November 12, 2006 4:48 PM

Great post - This is a significant step forward for mobile developers.  I've made a couple of comments here (http://community.softteq.com/blogs/nick/archive/2006/10/25/207.aspx) and here (http://community.softteq.com/blogs/nick/archive/2006/10/23/197.aspx) about the Orcas CTPs for mobile developers

Nick

# Visual Studio Orcas y el testeo unitario para dispositivos móviles @ Monday, November 13, 2006 3:44

En otro post ya había comentado la posiblidad de realizar Unit Test para nuestros desarrollos

O bruxo mobile

# Unit Testing en .NET Compact Framework @ Tuesday, November 14, 2006 8:10 PM

Con la salidad de Orcas NUnit será posible en el .NET Compact Framework 2. Puedes descargar la imagen

Smartymobile

# Unit Testing en .NET Compact Framework @ Tuesday, November 14, 2006 8:10 PM

Con la salidad de Orcas NUnit será posible en el .NET Compact Framework 2. Puedes descargar la imagen...

wmugperu

# Visual Studio Orcas支持智能设备应用程序的单元测试 @ Saturday, March 17, 2007 7:26

Visual Studio Orcas为智能设备开发带来一个十分有用的功能,就是可以对NetCF V2应用程序进行单元测试。

Bob Li

# Visual Studio for Devices features in Orcas @ Wednesday, March 28, 2007 1:39 PM

Visual Studio for Devices features in Orcas

Daniel Moth

# Testing non-public methods in Orcas Beta1 @ Wednesday, April 25, 2007 3:17 PM

Unless you've been living under a rock, you're probably aware that we shipped Visual Studio Orcas Beta1

Visual Studio For Devices

# Principales novedades de VS Orcas para dispositivos móviles @ Wednesday, May 23, 2007 1:41 PM

Hola amig@s , Mientras apuro mi última hora de la jornada laboral, instalando VS 2003 para pelearme con

Motivos de un ensamblado

# Testing non-public methods in Orcas Beta1 @ Sunday, February 24, 2008 4:07 PM

Unless you've been living under a rock, you're probably aware that we shipped Visual Studio Orcas

Pocket.Info - Mobile 2.0

New Comments to this post are disabled
Page view tracker