The Artima Developer Community
Sponsored Link

Weblogs Forum
A Set of Unit Testing Rules

50 replies on 51 pages. Most recent reply: Jan 21, 2011 2:19 AM by Steve Merrick

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 50 replies on 51 pages [ « | 1 ... 31 32 33 34 35 36 37 38 39 ... 51  | » ]
Gregg Wonderly

Posts: 317
Nickname: greggwon
Registered: Apr, 2003

Re: A Set of Unit Testing Rules Posted: Sep 17, 2005 4:45 AM
Reply to this message Reply
Advertisement
> <i><p>A test is not a unit test if:</p>
> <li>It talks to the database
> <li>It communicates across the network
> <li>It touches the file system
> <li>It can't run at the same time as any of your other
> unit tests
> <li>You have to do special things to your environment
> (such as editing
> config files) to run it.

If you don't know Peter Deutches 8 fallacies of distributed computing, then you'd probably feel really good about not testing your applications ability to handle partial failure. It may feel like it's slowing you down early on, but at some point, you really need to have real world tests that put your application under really heavy loads to test concurrent data structure access. You also need to have fault injection capabilities to stress the failure handling code to make sure idempotent behaviors are true to form. There's lots of reasons to interface to a real-world environment. It might not be in your unit tests, but you should have a plan, during design and coding on how you are going to instrument and inject for real-world testing.

Flat View: This topic has 50 replies on 51 pages [ « | 31  32  33  34  35  36  37  38  39 | » ]
Topic: Computer About to Play Jeopardy Previous Topic   Next Topic Topic: The Search for Requirements

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use