.NET software testing tutorials: unit testing, open source, NUnit, SpecFlow, Visual Studio, etc.
This tutorial explores the principles of parameterized unit testing with Microsoft Pex 2010. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications that 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.
Load testing is almost always conducted to address one or more risks related to expense, opportunity costs, continuity, and/or corporate reputation. In two blog posts, Tarun Arora discusses the topic. In part 1, he explains why Performance Testing the application is important, presents the test tools available in Visual Studio Ultimate 2010 and various test rig topologies. In part 2, he analyzes the details of web performance and load tests as well as why it’s important to follow a goal based pattern while performance testing your application.
Many developers are not aware of all of the debugging features in Visual Studio, because debugging in Visual Studio “just works.” This article provides an overview of debugging features of Visual Studio that are often ignored by developers like actions in the Breakpoints window or data visualizers. It also discusses external tools and third-party tools you can add to your debugging toolkit.
Dealing with dependencies is the most challenging aspect of test-driven development (TDD). Mocks and stubs are created to isolate the behavior we would like to test. The article “The Art of Mocking” is a good introduction on this topic. Creating all these testing classes by hand can lead to troubles: sometimes developers duplicate these classes and other times the mocks and stubs become more complicated than the code.
This video provides an introduction to the NUnit. NUnit is a unit-testing framework for all .Net languages. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection related capabilities. The video covers what is NUnit, how to set it up, creating a test class and running tests.
A quick look at using Visual Studio 2010 with NUnit and Silk4NET to create unit tests. We will also be using SilkCentral Test Manager to start from a manual test and automate it with Silk4NET.
Writing unit tests for your C# code can be time-consuming. This article proposes approaches that can make writing unit tests easier and more efficient for C# programmers.