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 ... 6 7 8 9 10 11 12 13 14 ... 51  | » ]
Cedric Beust

Posts: 140
Nickname: cbeust
Registered: Feb, 2004

Re: A Set of Unit Testing Rules Posted: Sep 10, 2005 3:14 AM
Reply to this message Reply
Advertisement
> > Basically, these rules mean that 90% of the tests
> written
> > with JUnit are not unit tests :-)
> >
> > (I'm certainly not disagreeing with you, being the
> creator
> > of TestNG and all, but I just wanted to clarify...)
>
> Yeah, depends on where you are, I guess. I usually
> convince teams to work like this rather early so the world
> looks better from where I sit. It's sort of like saying,
> "oh, grass never grows high" when you habitually mow your
> lawn.
>
> I hope it's better than that, though. I mean, seriously,
> if every unit test talks to the database because that's
> the way the production code works

Well, sometimes, the purpose of a class *is* to access the database, so one might argue that accessing the database still qualifies as a unit test.

But again, it really depends on your definition of what a unit test is, and yours is simply different from the one that is commonly used ("a unit test is a test that only exercises one class in isolation of all others", or something like that).

--
Cedric
http://testng.org

Flat View: This topic has 50 replies on 51 pages [ « | 6  7  8  9  10  11  12  13  14 | » ]
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