Meaningless Drivel is fun!
The moose likes Testing and the fly likes Appropriate level of testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Appropriate level of testing" Watch "Appropriate level of testing" New topic

Appropriate level of testing

Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 83
I was doing some TDD for a new version of an app we are creating and I wanted to test this

I wound up writing this (and I realize the test for the Controller annotation on the class is inappropriate, but I will fix that)

Is this overkill?

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
What does TDD mean?
Rob Dennett
Ranch Hand

Joined: Dec 07, 2010
Posts: 83
Jimmy Clark wrote:What does TDD mean?

Test-Driven Development.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

I think it is overkill. I would just test the return value in a unit test and test the annotation path when I do web testing.

The getting the correct annotation isn't testing something with meaning per se. It's testing you have the annotation you typed.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Appropriate level of testing
It's not a secret anymore!