how often should the entire suite of a system's unit tests be run?

Posted by gerryLowry on Stack Overflow See other posts from Stack Overflow or by gerryLowry
Published on 2010-05-21T13:22:11Z Indexed on 2010/05/21 13:40 UTC
Read the original article Hit count: 275

Filed under:
|
|
|
|

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?

Thank you.
Regards,
Gerry (Lowry)

© Stack Overflow or respective owner

Related posts about TDD

Related posts about unit-testing