.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Testing: Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

When running your tests how do you know which parts of your product code are actually executed and tested? This article presents a complete system called Fundamental Function code coverage that operates at the method level. The author gives an overview of the system so you can understand code coverage principles, explains the key parts of the underlying code, and discusses how code coverage fits into the overall product development cycle. After reading this article you will be able to perform code coverage analysis on any .NET software system.

James McCaffrey

MSDN Magazine April 2004

View Complete Post

More Related Resource Links

Easy UI Testing: Isolate Your UI Code Before It Invades Your Business Layer


The User Interface Process Application Block (UIP) from the Microsoft Patterns & Practices team can help you isolate your UI, write unit tests for your UI logic, and write a UI that really is the thin layer it was always meant to be. Mark Seemann shows you how it's done in this article.

Mark Seemann

MSDN Magazine August 2005

Know Thy Code: Simplify Data Layer Unit Testing using Enterprise Services


If you want to employ unit testing and test-driven development techniques in your database application development process, you'll have different factors to consider than you do when you're not involving a database. For example, you have to maintain a consistent state within the database and be able to roll back transactions when necessary. This article shows you how to get the best of unit testing for your database apps in a safe, usable manner.

Roy Osherove

MSDN Magazine June 2005

Unit Testing: Mock Objects to the Rescue! Test Your .NET Code with NMock


The problem: unit testing libraries, especially data access components, that have a complex set of dependencies. The solution: providing a dynamic mock implementation of your data access classes. Here the author explains just how to make testing easier and more reliable using NMock.

Mark Seemann

MSDN Magazine October 2004

Stress Testing: Custom LoadGenerator Tool Identifies the Issues Your Application Faces Under Stress


It's easy to postpone stress testing when developing an application, and it's easy to forgo it altogether. Having an easy-to-use framework at your fingertips to conduct these tests can make the task far less painful. This article walks you through an application that eases the task of generating load for a variety of layers within an application.

Brian Otto

MSDN Magazine April 2004

Unit Testing a ASP.Net Web Application

Hi, I want to imlement the Unit Testing in my asp.net web application. How to identify the scope of this. I mean, How should i start on this front. 

WPF - What is the best automated test application for testing WPF applications?

WPF - What is the best application for autmated testing of a WPF application? We use VS 2008 Professional. We do not use TFS.

Testing WPF Application w/ UIAutomation Framework


Hi All,


I have a pretty complex WPF application, but for simplicities sake, let's suppose I have a very simple WPF application with a Button on it.


I have a separate console application that I want to invoke the button on the WPF application. Using UIAutomation I'm having a little trouble finding the intuitive way to do this.


So far the steps for doing so look like:

  • Use Process.Start to launch WPF application
  • Use Process Id from above step to get Window handle for UI Automation framework
  • Once Window handle is obtained, find Button child element of Window
  • Invoke Button
This seems pretty straightforward, and I'm understanding the first 4 steps. The 5th step (invoking the Button), is where I'm having some trouble.

Anyone have experience with something like this?

How do you move an UI testing for a web site project to a web application project?


I was not able to do unit testing for our existing web site project. I converted the web site project to a web application project. I did some unit testing and changes on the converted web application project. However, my co-worker was doing UI testing on the web site project.  We need put UI testing and unit testing to the web application project. Is it possible to move the UI testing code that my co-worker did to the web application project I am working? If so, how do you do it? Thank you for your help.

Li Ai Shen

Unit Testing SharePoint - Past, Present, and Sporm

As I described in SharePoint: The Wild West of Software Development there is a serious problem when you develop for SharePoint: ensuring quality through unit testing is really, really hard. And that's where a new open source tool just released today called sporm (SharePoint Object Relational Mapper) comes in. While sporm provides many benefits besides simplified unit testing I wanted to focus on this topic first, because sporm's approach, which models the entity framework in the way it supports POCO's, is a unique feature not available with other SharePoint tools like LINQ to SharePoint.

website load testing


How can i check "load testing" on my site (its using vb.net and SQL server)? Any free tool available or can it be done through windows server IIS?

Ho to fire the Application Error in asax from the code?


 Hi All,

I have this code in Global.asax but it not firing once an error occured:


void Application_Error(object sender, EventArgs e)



        // Get the error details

        HttpException lastErrorWrapper = Server.GetLastError() as HttpException;

        Exception lastError = lastErrorWrapper;

        if (lastErrorWrapper.InnerException != null)

        lastError = lastErrorWrapper.InnerException;



        string lastErrorTypeName = lastError.GetType().ToString();

        string lastErrorMessage = lastError.Message;

        string lastErrorStackTrace = lastError.StackTrace;



Please help me so I can call this method from any page?

Thaxxxxxxxxxxxxx a lot,



Test Run: Fault Injection Testing with TestApi


Fault injection testing is the process of deliberately inserting an error into an application to determine whether it deals with the error properly. We'll explain how you can introduce faults into .NET applications at run time using the Managed Code Fault Injection APIs of the TestApi library

James McCaffrey

MSDN Magazine August 2010

Test Run: Testing Silverlight Apps Using Messages


Silverlight greatly simplifies the process of building rich Web applications, and we'll walk through an example of using Messages as a quick method of interactively testing simple Silverlight apps.

James McCaffrey

MSDN Magazine March 2010

Robotics: Writing and Testing VPL Services for Serial Communication


VPL, part of Robotics Developer Studio is intended for novice programmers, but is also useful for testing and prototyping. We write a simple serial port service that allows you to send and receive data.

Trevor Taylor

MSDN Magazine February 2010

Test Run: WCF Service Testing with Sockets


There are many ways to test WCF services, but the socket-based approach is flexible and very useful for security and performance testing. We show you show you how to test a WCF service using a network socket based approach.

James McCaffrey

MSDN Magazine February 2010

Test Run: Pairwise Testing with QICT


In this month's column, James McCaffrey explains exactly what pairwise testing is and provides you with complete C# source code for a production quality pairwise testing tool named QICT.

James McCaffrey

MSDN Magazine December 2009

Test Run: Partial Anitrandom String Testing


This column presents an approach to Antirandom (AR) testing the author calls partial AR string testing, which can be used to test a wide range of software systems.

James McCaffrey

MSDN Magazine October 2009

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend