Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TDD - What is it?

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Author,

What is TDD? How is that different from Normal testing that is done everywhere? How well does the book explains this? Is the book material full of theory? Does it also covers unit testing in java?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
What is TDD? How is that different from Normal testing that is done everywhere? How well does the book explains this? Is the book material full of theory? Does it also covers unit testing in java?

TDD is a development technique where you incrementally develop the production code by adding small tests and making them pass, one by one. As such, TDD is not about testing but about design and development.

My book explains TDD in detail, moving quickly from theory to practice, illustrating TDD in both a simple, "plain old Java objects" context as well as a more complex, "Java EE" context.

While a lot of the book is about how to write a unit test, if you're new to unit testing in Java, I'd recommend first picking up another book such as JUnit Recipes, JUnit in Action, or Pragmatic Unit Testing in Java. (Note that none of these books use the latest 4.x version of JUnit in their examples so you'll need to adapt their ideas to the new API.)
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lasse...
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more question is will TDD be ideal for a developer or will a developer need to know about JUnit? What's your opinion?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jothi Shankar Kumar Sankararaj:
One more question is will TDD be ideal for a developer or will a developer need to know about JUnit? What's your opinion?

TDD, in my opinion, is a superb technique for a disciplined developer who has the desire to improve. That developer needs a unit testing framework for writing tests so knowing JUnit certainly doesn't hurt. Having said that, another test framework such as TestNG or something home-grown could be equally sufficient (although I'd recommend JUnit because of its popularity and because of its design).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic