Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Does Stack Overflow have automated tests? If yes, what kind of (unit, integration, etc)? How are they organized and used?

share|improve this question
While it's true that this question is about Stack Overflow, it's more of a programming-related question using a specific project as an example. You could replace "Stack Overflow" with "phpBB" and the question would still be valid. However, it's not really a suitable question for meta. – Greg Hewgill Dec 23 '09 at 19:02
The problem is that it is Stack Overflow related. It would get closed on Stack Overflow because "It's about Stack Overflow". It belongs here. – George Stocker Dec 23 '09 at 19:26
up vote 7 down vote accepted

Jeff has previously stated that certain aspects of the site's code have unit tests, but not very many. He and Joel aren't unit testing's biggest advocates ;)

share|improve this answer
You sir win the "understatement of the year" award for the last part. – AnonJr Dec 23 '09 at 19:24
When I heard Jeff say on a podcast that they had some unit tests - that made me chuckle. 'Some' are ok as long as they test the parts of the code you care about - i.e. the ones with most 'business value' - but from the podcasts I doubt the team hold much value in unit testing - or maintaining the unit tests they have ... although I could, as ever, be very wrong! – blank Dec 23 '09 at 20:11

Due to extensive use of IoC containers the code base for Stackoverflow is extremely testable, the bulk of the tests are written in Cobol and Brainf*ck, a smaller yet significant portion is tested using 42 magic 8 balls, which when shaken in harmony produce magnificent and hypnotizing sounds.

share|improve this answer

This goes without saying, but IMHO.

Individual reusable components are eminently testable. So much so that they are huge wins, and you'd be a fool not to have tons of unit testing wrapped around them.

Thinks like.. say... our c# markdown processor.

However, almost none of the code that most programmers produce on real world, typical projects is actually reusable in any meaningful way. And writing truly reusable code is about two orders of magnitude harder -- even with unit tests -- than writing typical one-off "just get it done" code. It takes many times the amount of effort to produce the same result if you want to build something that is legitimately reusable.

Related: The "Rule of Three"

share|improve this answer
WTF has unit testing to do with reusable components? Who says that only reusable components are unit-testable? I do not think that everything has to be unit-tested to death, but this argument is pure nonsense. Or maybe I'm missing something here. – Ladybug Killer Dec 28 '09 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .