The Artima Developer Community
Sponsored Link

Java Buzz Forum
RE: JUnit, Test your behavior not methods

0 replies on 1 page.

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 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
RE: JUnit, Test your behavior not methods Posted: Sep 16, 2004 4:49 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: RE: JUnit, Test your behavior not methods
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
KT has written about JUnit, Test your behavior not methods. I definitely feel this one. It seems that there is a flow of cause and effects that we run into in our world: Someone comes up with a good idea The idea is spread The idea gets tweaked along the way Mass adopters follow the letter of the warped idea, and not the thought behind it When I look at that flow, I could be talking about a lot of things. For example, Religion :) Where does this fit into unit testing? Well, the idea of doing unit tests is obviously a good one. Test Driven Development is also a great tool that we can use to get good designs, and less bugs. However, it has somehow been warped in many dev shops. In these shops they take the LETTER of the idea "build unit tests == good" and focus on making as many unit tests as possible. Their code coverage tool helps make a game out of this. "I have got 80% coverage". However, who gives a monkeys about your coverage compared to the QUALITY of your damn tests. It is easy to use a tool, or manually, create tests for every method and branch, but most of the tests are crap! I would rather have less coverage (and at areas where I think I really need them) which have really smart tests of behaviour (not just passing nulls and seeing what happens).

Read: RE: JUnit, Test your behavior not methods

Topic: Skype for Mac Previous Topic   Next Topic Topic: Frances and the two longest days of my life

Sponsored Links



Google
  Web Artima.com   

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