Andrew Stopford's Weblog

poobah

Sponsors

News

Articles

Family

Old Blogs

Fire poll, do you unit test?

This post of Eli's has made me wonder, so a quick fire poll.

  • Do you Unit Test your code?
  • If so with what?
  • If not, why?

You don't have to leave your name if you don't want I just want to try and judge for my self.

Comments

Haacked said:

1. You know it!

2. MbUnit

3. Ummm, didn't you read my #1?

# March 6, 2007 5:42 AM

Dave said:

1. Yes and no.  Anything I have control over that will be maintained, I try to cover with unit tests as much as possible.  

2. NUnit

3. On the other hand, I've inherited an older .NET 1.1 project that was outsourced and came back in unspeakably horrible shape.  I'll be in so far over my head trying to sort that out, that I probably won't be able to add any tests to it for a long time.

# March 6, 2007 7:07 AM

Rachit said:

1. Yes, except the web pages...it's not easy enough to unit test Ajax pages especially.

2. NUnit

3. N/A

# March 6, 2007 7:11 AM

Alex said:

1. Yes, except web pages.

2. Nunit with Ncover

3. Sometimes for existing projects.

# March 6, 2007 7:45 AM

Luke Melia said:

1) Yes. Everything except views. Except for when I am lazy and unprofessional.

2) MbUnit

# March 6, 2007 8:28 AM

Anders Norås said:

1. Sure thing!

2. NUnit when doing .NET, JUnit when doing Java.

I also use extensions like XmlUnit and similar when they are applicable.

# March 6, 2007 8:37 AM

Barnet said:

1. No

3. Unit testing web projects and unit testing db heavy projects is just too hard to be useful.

# March 6, 2007 10:12 AM

Eric Wise said:

1. Selectively

2. Nunit

3. I only write unit tests for calculations and complex logic. (Not webpages, general CRUD operations, etc)

# March 6, 2007 10:50 AM

mxmissile said:

What Eric Wise said.

# March 6, 2007 11:09 AM

Jan Van Ryswyck said:

1. Selectively

2. NUnit

3. Currently only domain logic, but UI and data layer are also on the menu in the near future (not rushing things).

# March 6, 2007 2:39 PM

Sachman Bhatti said:

Not on small projects that serve specific tasks, but yes when building code libraries that will be used extensively.

# March 6, 2007 4:20 PM

Phil Winstanley said:

Unit testing is for girls, real men don't write bugs into their code.

;-)

# March 7, 2007 3:58 AM

Dee said:

It doesn't really make sense for ASP.net environment where the vast majority of the work is in development of web pages.

If someone were coding reusable custom controls for long term usage on internal projects, then it might make more sense.

Most work these days is bid work and bid work can't compete if cost includes unit testing development.

# March 7, 2007 12:33 PM

Mischa Kroon said:

No

-

For writing web apps with a fairly build once don't reuse too much, it really doesn't make much sence for me.

# March 8, 2007 4:27 AM

Robert said:

I don't unit test -- as you know ;) Although I do use active testing within my code (lots of Asserts etc). I would be interested in hearing you reply to comments like:

"For writing web apps with a fairly build once don't reuse too much, it really doesn't make much sence for me."

"It doesn't really make sense for ASP.net environment where the vast majority of the work is in development of web pages."

# March 10, 2007 8:21 AM

Dukebaby said:

1. Yes

2. Microsoft.VisualStudio.QualityTools.UnitTestFramework

# March 10, 2007 8:09 PM

Joseph said:

1. Yes

2. NUnit, and Watir for web pages.

# March 11, 2007 4:01 AM

mike said:

1. No

2. Would use NUnit

3. I have no idea how to test ASPX and database code, which is what I write mostly...

# March 12, 2007 9:48 AM

Jeff Brown said:

1. Yes, selectively.  I don't generally bother with automated UI tests.

2. MbUnit.  Previously JUnit.

3. Much of my work is oriented around a rather large legacy code-base with a shamefully low degree of testability and a lot of inertia among the engineering staff.  Everything at or above the data layer is pretty much a mess.  Nevertheless I've written hundreds of unit tests and obtained good coverage wherever possible but generally limited to the core libraries and frameworks.  Alas virtually no one else has followed suit.  The situation is reversed in most of my personal projects where unit tests become my primary measure of pride and progress.  =)

# March 14, 2007 10:07 PM