What Isolation\Mocking and unit testing framework are you using? - ISerializable - Roy Osherove's Blog

What Isolation\Mocking and unit testing framework are you using?

It’s time to re-examine where things stand in our little niche.

This should be interesting, if enough people answer – so please answer (you need flash).

 

Published Monday, March 09, 2009 4:11 PM by RoyOsherove

Comments

Monday, March 09, 2009 4:16 PM by Ariel Ben Horesh

# re: What Isolation\Mocking and unit testing framework are you using?

Voted.

Monday, March 09, 2009 4:21 PM by dotan

# re: What Isolation\Mocking and unit testing framework are you using?

great idea Roy ;)

Monday, March 09, 2009 4:47 PM by Frank

# re: What Isolation\Mocking and unit testing framework are you using?

Thanks for running this again.

Monday, March 09, 2009 5:42 PM by Alex Henderson

# re: What Isolation\Mocking and unit testing framework are you using?

Good idea :) interesting results so far... I personally would love to know what test runners people use/prefer as well.

Monday, March 09, 2009 5:53 PM by Duncan

# re: What Isolation\Mocking and unit testing framework are you using?

I'm a db dev who dabbles in web, so I see mocks as a bad idea (I *want* to include the database in my testing, speed be damned), but the web devs will likely be forced to adopt the defacto standard (by popularity) when they get there.  For instance, our shop standard is NUnit because it's the most popular (and thus has the most support/literature available) but I've been using Gallio/MbUnit 3.x -- nobody has complained because I don't think anybody else actually writes unit tests.

I am writing unit tests for EVERY bug in my brownfield app and I intend to use TDD for my next greenfield.  The team is soon going to have a build / CI server.  I'm evaluating a few approaches / frameworks for unit testing our databases as well (we're data-intensive).  **IF** I switch from db-dev to web-dev, I might start using mocks... but for now I prolly won't.

Monday, March 09, 2009 11:02 PM by Neal Blomfield

# re: What Isolation\Mocking and unit testing framework are you using?

Cool poll Roy, interesting results.  I too would be interested in seeing which testrunners people use (I use the R# testrunner).

@Duncan

Testing all the way to the db is great for integration tests but these shouldn't have to be run every time you make a small change to the code - that simply increases the friction of development with unit tests rather than decreasing it.

Slow tests / test suites are what kills the desire to run them often.  The more often the unit tests are run, the sooner they catch problems in the code, the less likely you are to have forgotten the context within which you wrote the code.

wrt tests for bugs, mocking means you no longer have to set up the database (and any other piece of infrastructure) to create the exact scenario, rather you can create mocks and tell them exactly what to return.  While this doesn't seem like much gain when it is a single call that creates the error, it truly shines when you need to execute a complex sequence to get the bug to manifest.

Tuesday, March 10, 2009 4:05 AM by Riccardo

# What Isolation\Mocking and unit testing framework are you using?

What Isolation\Mocking and unit testing framework are you using?

Tuesday, March 10, 2009 10:17 AM by Duncan

# re: What Isolation\Mocking and unit testing framework are you using?

@Neal

I'll probably amend my position when I start writing applications as opposed to the database and/or once I get a decent sql unit test framework in place and/or once anybody else on my team actually bothers to execute a suite.

Wednesday, March 11, 2009 9:55 AM by Gian Maria

# re: What Isolation\Mocking and unit testing framework are you using?

Voted.

Wednesday, March 11, 2009 12:03 PM by igorbrejc.net » Fresh Catch For March 11th

# igorbrejc.net » Fresh Catch For March 11th

Pingback from  igorbrejc.net » Fresh Catch For March 11th

Tuesday, March 17, 2009 12:49 AM by Tim Barcz

# Open Source Maturity Model Explored

About a month ago Ayende posted his thoughts on the Maturity Model found in Open Source Projects . 

Tuesday, March 17, 2009 1:07 AM by Tim Barcz

# Open Source Maturity Model Explored

About a month ago Ayende posted his thoughts on the Maturity Model found in Open Source Projects . 

Tuesday, March 17, 2009 10:24 PM by Brian

# re: What Isolation\Mocking and unit testing framework are you using?

You should add one for what methodology your shop uses...and whether they are contractors or IT employees, I think that's where you'll see some REAL interesting numbers.