Introduction
You need to test a distributed application to ensure its quality. Complex applications require multiple levels of testing, including unit testing, integration testing, and regression testing. An effective test plan can ensure that the application ships with the fewest possible defects. In this chapter you will learn what is involved in creating such a test plan.
Tracing is the process of monitoring an executing program. You trace a program by placing tracing code in the program with the help of the Trace and Debug classes. The tracing messages can be sent to a variety of destinations, including the Output window, a text file, an event log, or any other custom-defined trace listener, where they can be recorded to analyze the behavior of the program. Trace switches can be used to change the types of messages being generated without recompiling the application.
The process of testing may reveal various logical errors, or bugs, in a program. The process of finding the exact locations of these errors may be time-consuming. Visual C# .NET provides a rich set of debugging tools that make this process very convenient.
In this chapter I discuss techniques for testing and debugging different types of applications that make up an enterprise solution. I discuss how to test and debug a Windows application, Web application, Web service, serviced component, .NET remoting object, and Windows service.
I discuss two important techniques for monitoring an executing application. You'll learn how to log errors and other descriptive messages in an event log. You'll also learn how to publish the performance data for an application with the Windows performance counters.
|