Creating good, effective unit tests in .NET can be harder than it seems. In some cases, the code is designed so that isolating one component from another is easy. However, in most other cases, achieving this isolation is very difficult. First included in Visual Studio 2012, Microsoft Fakes helps you cross this gap.
.NET software testing tutorials: unit testing, open source, NUnit, SpecFlow, Visual Studio, etc.
Web application testing is a rapidly evolving topic, so year by year it is reasonable to enumerate the possible options and re-evaluate the web testing strategy you have chosen for your .NET project.
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.
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.
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.
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.
This article provides an article on how to create unit tests for a Visual C# class in a Windows Store app with Visual Studio Express 2012 for Windows 8 and the Microsoft Unit Testing Framework.