Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
86<br />
<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />
Table 1: Logging Application Block Design <strong>Test</strong> Cases<br />
Priority<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
Design test case<br />
Verify that the application block can be extended with custom trace listeners, custom<br />
formatters, and custom filters.<br />
Verify that the application block uses a simple façade to log messages.<br />
Verify that there is a consistent approach to creating filters, formatters, and trace<br />
listeners.<br />
Verify that the application block can retrieve configuration data from different sources,<br />
such as an application configuration file, a database, or from memory.<br />
Verify that the design addresses situations that can cause exceptions and that the<br />
application block logs the exceptions through the instrumentation.<br />
Verify that the instrumentation is implemented with loosely coupled events.<br />
Verify that the application block can use .NET trace listeners.<br />
Verify that the application block supports custom property collections for the custom<br />
trace listeners, custom formatters and custom filters.<br />
After you identify the design issues, you should do the same for the code. Table 2<br />
lists the test cases that the Logging Application Block code must satisfy.<br />
Table 2: Logging Application Block Code <strong>Test</strong> Cases<br />
Priority<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
Code test case<br />
Verify that the Logger façade exposes all public members as static and that it uses<br />
overloads to support different ways to log information.<br />
Verify that the application block validates the input at all of its entry points.<br />
Verify that any errors that occur during a logging operation are logged to the errors<br />
special trace source, if it is in the configuration source.<br />
Verify that the application block can distribute information to multiple trace sources.<br />
Verify that the application block responds to run-time configuration changes.<br />
Verify that the application block disposes of the old LogWriteStructureHolder object<br />
and creates a new one, if the configuration information changes at run time.<br />
Verify that the Logger façade creates the LogWriter object only once and that it uses<br />
the same object for all logging requests that come from the same application.<br />
Verify that all logged messages are also logged to the all events special trace source,<br />
if it is in the configuration source.<br />
Verify that the assembler classes that implements the IAssembler interface inject the<br />
configuration values into the domain objects.<br />
Verify that the application block can trace an activity from start to finish.<br />
Verify that the application block uses performance counters to monitor the logging<br />
operations, if the performance counters are enabled.<br />
Verify that the application block uses WMI and the event log to monitor and record<br />
errors that occur during logging operations, if WMI and the event log are enabled.<br />
Verify that the application block exposes a dictionary collection property so that the<br />
application block can log customized logging information.