Fernando Machado Píriz's Blog

Posts about digital transformation, enterprise architecture and related topics

Posts Tagged ‘Testing

Intellitrace in Visual Studio 2010 and Team Foundation Server 2010

with one comment

This is the seventh (and latest) 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.

Certain bugs can be reproduced only if code is executed under certain conditions. If developers can’t recreate such conditions in their developing environment, it’s very unlikely for them to find these bugs. Visual Studio 2010 and Team Foundation Server 2010 can record events and calls during the execution of tests by using Intellitrace. Developers can later debug code reproducing those recorded Intellitrace files, like if they were using a VCR: they can go back and forward in the call stack, analyze parameters and result values, etc., even if their environment is completely different from the one where the Intellitrace file was recorded.

You can also download the video.

Written by fmachadopiriz

May 24, 2010 at 7:40 pm

Including tests in builds with Team Foundation Server 2010

with one comment

This is the sixth 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.

Just because code compiles, we can’t be sure it’s bug-free. Only when all test cases passed, we can have certain degree of confidence, depending on how good tests are. Team Foundation Server 2010 easily allows adding tests cases execution to the build process, automatically generating bugs in the work items repository for failed tests.

You can also download the video.

More videos coming soon… keep tuned!

Written by fmachadopiriz

May 24, 2010 at 7:29 pm

Test Impact Analysis with Visual Studio 2010

with one comment

This is the fifth 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.

Every time you modify your code, you need to run all tests cases again, to ensure no bugs were introduced in previously bug-free code; this is called regression testing. When the number of tests grows, the time to run all test gets longer. With test impact analysis, Visual Studio selects the minimal set of tests to cover modified code, optimizing the time required to do regression testing. In this video you will see a modification in the Subtract method of the Calculator class, and how Visual Studio selects the unit test that tests that method.

You can also download the video.

More videos coming soon… keep tuned!

Written by fmachadopiriz

May 24, 2010 at 7:24 pm

Using Pex and Contracts to generate unit tests in Visual Studio 2010 and C# 4.0

with one comment

This is the fourth 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 a previous post I showed how to use Pex to automatically generate unit tests with high code coverage.

Contracts is a tool from Microsoft Research for Visual Studio implementing design by contract for the .NET Framework. Using Contracts, Pex generates better test cases. To get more details on how to use Pex and Contracts together, read this post.

In this video you will see how to add a precondition to a Factorial method of a Calculator class, and how Pex generates new test cases for this method.

You can also download the video.

More videos coming soon… keep tuned!

Written by fmachadopiriz

May 24, 2010 at 6:56 pm

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

with 4 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.

Written by fmachadopiriz

May 19, 2010 at 12:55 am

Unit Tests Generation with Visual Studio 2010 and C# 4.0

with 2 comments

This is the second 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.

Visual Studio also allows automatic generation of unit tests skeletons from code under test. In this video you will see how to create a unit test for the Subtract method of a Calculator class using Visual Studio.

You can also download the video.

More videos coming soon… keep tuned!

Written by fmachadopiriz

May 15, 2010 at 3:50 am

Testing with Visual Studio 2010

with 6 comments

This is the first 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.

These are short (1-5 mins) and simple introductory videos. Topics I will be covering in the following post:

Be ready!

Written by fmachadopiriz

May 13, 2010 at 1:00 pm