Review: DevPartner Fault Simulator

DevPartner Fault Simulator 1.0
$6,000 per concurrent user
Compuware
Detroit, Michigan
(313)227-7300
www.compuware.com

Exceptions are, by definition, exceptional. In .NET applications, exception handlers provide the code that will respond to unusual events: things like files not being found, the system running out of memory, or the user lacking the proper security token. But how do you test this part of your application? It's relatively easy to try to open a nonexistent file, but testing a handler for network errors is something else again.

Compuware's new DevPartner Fault Simulator provides an elegant and comprehensive solution for testing all of the error-handling in a .NET application. The basic idea is simple: instead of waiting around for something to go wrong, Fault Simulator lets you deliberately tell your .NET code that something is wrong, and then watches to see how (or whether) the fault is handled. All of this is done with Compuware's usual attention to detail.

Fault Simulator runs three different ways. There's a Visual Studio Add-In that's useful when you're working as a developer and want to test and tune your code. There's a standalone GUI version that QA folks will appreciate; it can inject faults into a running program (and it can use sets of faults saved from the add-in as a starting point). Finally, there's a command-line version suited for automated batch processes, such as testing nightly builds.

When choosing to inject a new fault, you can choose between .NET and environmental problems. On the .NET side, Fault Simulator covers the most common namespaces and classes, including System.Data, System.XML, and System.Net. On the environmental side, you can simulate problems with COM, disk I/O, memory, the network, or the Registry. This lets you cover a wide range of faults, both inside and outside of the .NET Framework, that can affect your code.

After specifying the faults you want, you run the application and Fault Simulator keeps an eye on things. For each fault, you can see exactly what went wrong and where it was handled. You can drill into the call stack each time there is a fault, see which handlers were active, and tell which ones passed on the fault. You can also browse right into the source code that handled the fault to confirm what went on.

Overall, Fault Simulator looks to be an extremely useful addition to the arsenal of .NET testing tools. It shows the promise of testing a lot of code that normally we just take for granted - and we all know how dangerous it is to ship untested code. If this sounds interesting, you can request a 14-day evaluation from the Compuware Web site.