Is TypeMock only solution when working in brownfield development?

190 views Asked by At

I am starting a maintenance project where I need to work with legacy code and also create new ones. New ones I can create proper interface based development and I can use Moq to do proper unit testing. I can't use Moq against the legacy code since they do not have proper coding to mock out the objects. Based on the reading, Typemock looks like an excellent fit since I can isolate the object and return what we want when a method is called on legacy objects. I really like the simplicity and ease of development. I would like to know is there any other tools out there like Typemock I should look at before committing to it since I have to pay for it.

Thanks

PS: ours is Microsoft shop we work with C#/ASP/ASp.Net/Silverlight and VB.Net

** I just found that Infragistics have one mocking tool as well.

1

There are 1 answers

0
Travis Illig On BEST ANSWER

What you're looking for is a mocking framework that uses the Profiler API. These are the ones that can "mock anything" because they sort of run "underneath" the code being tested.

When considering one of these, you'll want to think about things like:

  • Integration support: Does it work with the tools you're using? For example, your build server, coverage tool, unit testing tool, etc. Are there any additional tools it comes with (e.g., Visual Studio plugins) that might help you work with it?
  • Technical support: If something goes wrong or you find a bug in the product, can you ask someone about it?
  • Syntax/patterns: Does it support AAA testing or is it only record/replay? How easy is it to start working with?
  • Community and learning resources: How's the documentation? Are there people out there who can answer your more general usage questions or are you "on your own?"

There are three primary mocking frameworks to consider that I'm aware of:

Full disclosure: I'm a Typemock MVP and I've been using Isolator for a while. It has thus far been worth its weight in gold, particularly in Brownfield development. I will admit in some cases, where it's more Greenfield, I use Rhino or Moq. It really depends on what I'm doing.

In any case, I recommend evaluating each of the tools yourself to see which works best in your environment. Be sure to see how it integrates, how easy it is to get going, etc. for each one, and then make your decision based on your experience in your setting.