Fernando Machado Píriz's Blog

Posts about enterprise architecture and related topics

Unit Tests generation with Pex using Visual Studio 2010 and C# 4.0

with 2 comments

This is the third post of a series about testing tools and techniques using Visual Studio 2010, Team Foundation Server 2010, Microsoft Test Manager 2010, and C# 4.0.

In the first post I showed how Visual Studio allows test driven development and in the second post how to automatically generate test cases from code.

Pex is a tool created by Microsoft Research that integrates into Visual Studio and automatically generates parameterized unit tests from code. In addition, Pex analyzes code under test and automatically generates test cases with high code coverage. In this video you will see how to create a unit test for a Factorial method of a Calculator class using Pex.

You can find more details about Pex, including sample code, in this post.

About these ads

Written by fernandomachadopiriz

May 19, 2010 at 12:55 am

2 Responses

Subscribe to comments with RSS.

  1. [...] Unit tests generation with Pex [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: