Introducing Depender - Testability Problem Finder
Saturday, July 5, 2008 at 10:08AM
Roy Osherove in Agile, Art Of Unit Testing, Cool Tools, Typemock, Unit Testing

Update: Here's how you can extend Depender with your own dependency rules

Depender is a tool that I created to illustrate several concepts both for my book and both for my training classes. I think it should prove valuable (as it gets more and more features) to anyone who is trying to write tests for existing code.

 

Depender allows you to load an assembly and inspect the types within it according to very simple rules. the main question on my mind and I run it is: "How easy would it be to test class X?". Depender will list all the classes in the assembly and for each one will try to detect possible testability problems (non decoupling) and places where you might be able to "inject" your own implementation (calls to virtual methods, fields that are interfaces or types who are not sealed..etc..)

 

so you can:

here's what the main screen looks like when loading an assembly:

image

the type "RealLogger" is marked in red because it contains calls to static methods. double clicking on the type's node will load a separate window just for this type:

image

 

I will be adding more rules and also releasing the source so that other people can help develop this. for now I just want to get it out there and see what people think.

possible futures:

Download Depender from here.

Article originally appeared on Osherove (http://osherove.com/).
See website for complete article licensing information.