wood burning stoves 2.0*
The moose likes Testing and the fly likes TDD - What is it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "TDD - What is it?" Watch "TDD - What is it?" New topic
Author

TDD - What is it?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.)


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Thanks Lasse...
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TDD - What is it?
 
Similar Threads
TDD & SW life cyle?
Appropriate level of testing
Clean Code: TDD and BDD
JUnit - testing approaches
Test driven