.NET software testing tutorials: unit testing, open source, NUnit, SpecFlow, Visual Studio, etc.

Better Unit Testing with Microsoft Fakes

January 20, 2014 0

Better Unit Testing with Microsoft Fakes is a free e-book that discusses the topic of Microsoft Fakes. Microsoft Fakes is a code isolation framework for Visual Studio that helps you isolate the code for unit testing by replacing other parts of the application with stubs or shims. With Microsoft Fakes you can test parts of your software even if some parts have not been implemented or are not working yet.

Unit Testing for the .NET Micro Framework

August 26, 2013 0

The .NET Micro Framework (NETMF) is an open source .NET platform for resource-constrained devices. It supports development in C#, Visual Basic .NET, and debugging (in an emulator or on hardware) using Microsoft Visual Studio. In this blog post, Mark Nichols explains how to perform unit testing for the .NET Micro Framework.

Using Pex and Microsoft Code Digger

June 27, 2013 0

Pex is a Visual Studio 2010 Power Tools that help Unit Testing .NET applications. Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage. Microsoft Code Digger is a Visual Studio 2012 that analyzes possible execution paths through your .NET code. The result is a table where each row shows a unique behavior of your code. The table helps you understand the behavior of the code, and it may also uncover hidden bugs.

Using Mock Objects in C#

June 3, 2013 0

When you need to perform unit testing in an independent way, you use mock objects. Mock objects are simulated objects that mimic the behavior of real objects in controlled ways. In this excerpt of their book “Pragmatic Unit Testing in C# with NUnit”, Andy Hunt, Dave Thomas and Matt Hargett explain how to avoid coupling when you build your C# unit tests.

Structuring ASP.NET MVC for Maximum Testability

January 28, 2013 0

This article from Keith Burnell presents best practices and techniques to increase the testability of ASP.NET MVC applications. This includes how to structure the solution, architecting the code to handle the injection of dependencies and implementing dependency injection with StructureMap.

Creating a Data-driven Unit Test

January 22, 2013 0

This article explains how you can set up a unit test method that will retrieve values used in the test method from a data source using the Microsoft unit test framework for managed code. Creating these data-driven unit tests makes it easy to test a multiple inputs with a single method.

1 2 3 4 8