rickgaribay.net

Space shuttles aren't built for rocket scientists, they're built for astronauts. The goal isn't the ship, its the moon.
posts - 288, comments - 169, trackbacks - 33

My Links

News

Where's Rick?


GWAB PHX #2, 3/29
Tucson .NET UG, 4/15

VS Live Chicago, 5/5

VS Live Redmond, 8/18

AzureConf Redmond/Web, 9/25

VS Live D.C., 10/6

App Dev Trends Las Vegas, 12/8


About Me
I am a developer, architect, writer and speaker, passionate about distributed technologies and Application Lifecycle Management. I am currently a VP and Distinguished Engineer at Neudesic.









Archives

Post Categories

Published Works

A Pragmatic Team TDD Covenant

“As a team, we commit to test-first development, preferring unit tests over integration tests, and reluctantly accepting integration tests over no tests at all. As such, we write just enough integration tests to provide end to end smoke testing and no more.”

 

In distinguishing between unit tests and integration tests, we honor the following foundational practices to which we largely credit Kent Beck, Michael Feathers, and Bob Martin.

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
  4. A test is not a unit test (but is instead an integration test) if:
    • it talks to the database
    • it communicates across the network
    • it touches the file system
    • it can’t run at the same time as any of your other unit tests
    • you have to do special things to your environment (such as editing config files) to run it.

       5. Above all else, be pragmatic and use your judgment.

Print | posted on Tuesday, September 22, 2009 12:24 PM | Filed Under [ Processs TDD ]

Feedback

Gravatar

# re: A Pragmatic Team TDD Covenant

Excellently stated. I've seen 1-3 and 4 before separately, but I think that it's excellent to combine them. What I think needs to be stated though is that integration tests are not bad and realistically can't be avoided (databases and SOA are the norm today), but unit tests should be used everywhere and integration tests should only be used to test those final pieces (database access, disk I/O, and web service calls) so that you can say that you have 100% coverage.
9/22/2009 12:54 PM | Michael Collins
Gravatar

# New and Notable 374

<p>Windows Azure/WCF Windows Azure and Cloud Computing Posts for 9/24/2009+ – The usual great list of Azure links from Roger Jennings First CTP of SQL Azure and Updated Training Kit Now Available! – The first CTP of SQL Azure is available for testing and the Azure training kit for August has been updated...</p>
Gravatar

# Daily tech links for .net and related technologies - September 26-28, 2009

Daily tech links for .net and related technologies - September 26-28, 2009 Web Development 10 Things
9/27/2009 12:52 AM | Sanjeev Agarwal
Comments have been closed on this topic.

Powered by: