Search The Blog
Latest Posts
Twitter: @RoyOsherove
About this site

TDD in .NET Online Course

TDD and BDD in Ruby Online Course



This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

« Extending Depender with your own custom dependency rules | Main | [Off Topic] My Geeky little architect »

Introducing Depender - Testability Problem Finder

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:

  • see places where you might want to refactor your code or use a tool like Typemock Isolator
  • see places where you can already use "seams" to inject behavior into your code without needing to look up the source code manually.

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


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:



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:

  • Make it command line driven so it can run in your CI builds
  • Make it give "scores" to assemblies or types on testability and decoupling
  • Make it add "suggestions" on how to fix decoupling issues
  • Make it create the base diagram for my test feasibility matrix

Download Depender from here.

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Web Analytics