Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 798741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:01:14+00:00 2026-05-14T23:01:14+00:00

Generally, I’m still very much a unit testing neophyte. BTW, you may also see

  • 0

Generally, I’m still very much a unit testing neophyte.

BTW, you may also see this question on other forums like xUnit.net, et cetera,
because it’s an important question to me. I apoligize in advance for my
cross posting; your opinions are very important to me and not everyone
in this forum belongs to the other forums too.

I was looking at a large decade old legacy system which has had over 700 unit tests
written recently (700 is just a small beginning). The tests happen to be written
in MSTest but this question applies to all testing frameworks AFAIK.

When I ran, via vs2008 “ALL TESTS”, the final count was only seven tests.
That’s about 1% of the total tests that have been written to date.

MORE INFORMATION: The ASP.NET MVC 2 RTM source code, including its unit tests,
is available on CodePlex; those unit tests are also written in MSTest
even though (an irrelevant fact) Brad Wilson later joined the ASP.NET MVC team
as its Senior Programmer. All 2000 plus tests get run, not just a few.

QUESTION: given that AFAIK the purpose of unit tests is to identify breakages
in the SUT, am I correct in thinking that the “best practice” is to always,
or at least very frequently, run all of the tests?

updated 2010-05-22

First, thank you to everyone who has provided excellent answers. Your answers
confirm my general conclusion that running all unit tests after every local rebuild is
the best practice regardless whether one is practicing TDD (test before) or classic
unit testing (test after).

imho, there is more than one best answer to this question but AFAIK SO lets
me select just one, so in an effort to be fair, I’ve given the check mark to
Pete Johns for being first and for earning the most up votes from the SO
community. Finland’s Esko Luontola also gave a great answer (I hope
he’s not getting buried in volcanic ash) and two very good links that
are worth your time imho; definitely the link to F.I.R.S.T. is to me inspirational;
AFAIK, only xUnit.net in the .NET world offers the “any order, any time”.
Esko’s second link is to a truly excellent 92 minute video “Integration Tests Are a Scam”
presented by J. B. (Joe) Rainsberger ( http://jbrains.ca where there is more content
worth my time). BTW, Esko’s weblog is also worth a visit http://orfjackal.net.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:01:15+00:00Added an answer on May 14, 2026 at 11:01 pm

    Since you have tagged this question ‘TDD’, all of the unit tests for the module being developed should be executed (and pass, bar the newest one, until you make it pass) with every compilation. Unit tests in other modules should not break by development in the current module or else they are testing too much.

    A continuous integration loop should also be in place to ensure that all of the tests are run with every check-in to your source control system. This will trap breakages early.

    At the very least, a nightly build should run each and every test and any breakages be fixed first thing of a morning. Tolerate no unit test failures!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Generally this question comes from Eclipse suggesting to add a serial version UID on
Generally speaking, I am very happy with the changes in Xcode 3.2. However, there
Generally speaking, what are your recommendations on this? Currently takes close to 10 minutes
Generally I seem to be able to fix IE problems nowadays.. but this one
Generally don't do OO-programming in Python. This project requires it and am running into
Generally we are using interface concept for RMI implementation also in Event listening ,we
Generally speaking, any ant task which accepts a <mapper> will also accept several tags
Generally, we can extract an array, and also add an prefix to it, like
Generally code samples use locks this way: static readonly object lockForWorkingWithSharedObject = new object();
I generally do the following, but I'm hoping for a library that handles this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.