07.11.2014 Views

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

68<br />

<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />

Table 1: Exception Handling 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 />

High<br />

Design test case<br />

Verify that the exception handlers and the exception formatters are extensible.<br />

Verify that there is a consistent approach to creating exception policies, exception<br />

handlers, and exception formatters.<br />

Verify that there is a façade that mediates between the client code and the application<br />

block to handle exceptions.<br />

Verify that the application block generates a new GUID named the HandlingInstanceID<br />

for every exception that is handled.<br />

Verify that the ability to create the application block’s domain objects from the configuration<br />

data follows the Dependency Injection pattern.<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 instrumentation uses loosely coupled events.<br />

Verify that situations that can cause exceptions are addressed and that the application<br />

block logs the exceptions through the instrumentation.<br />

Verify that the application block supports custom property collections for the custom<br />

exception handlers.<br />

After you identify the design issues, you should do the same for the code. Table 2<br />

lists the test cases that the Exception Handling Application Block code must satisfy.<br />

Table 2: Exception Handling Application Block Code <strong>Test</strong> Cases<br />

Priority<br />

High<br />

High<br />

High<br />

High<br />

High<br />

High<br />

High<br />

Medium<br />

High<br />

High<br />

Code test case<br />

Verify that the ExceptionPolicy façade exposes a public method to handle the<br />

exceptions.<br />

Verify that the ExceptionPolicy façade uses the ExceptionPolicyFactory class to create<br />

the exception handling provider.<br />

Verify that an assembler class creates exception handlers and injects the configuration<br />

object values into those domain objects.<br />

Verify that the application block uses performance counters to monitor exception<br />

handling operations when the performance counters are enabled.<br />

Verify that the application block uses WMI and the event log to monitor errors during<br />

exception handling operations when the WMI and event log are enabled.<br />

Verify that the configuration properties of the exception handling policies are exposed<br />

as public and that they are strongly typed.<br />

Verify that the configuration properties for the custom exception handlers are exposed<br />

as public and that they are implemented as a collection.<br />

Verify that the application block validates the input at all the entry points, such as the<br />

ExceptionPolicy façade.<br />

Verify that the ExceptionPolicyFactory class creates only a single instance of the<br />

exception handling provider for all the requests.<br />

Verify that the application block supports post handling actions, such as None, Notify-<br />

Rethrow, and ThrowNewException, after it executes the exception handlers.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!