• Post Reply Bookmark Topic Watch Topic
  • New Topic

Quick beginner intro to TDD and Junit ?  RSS feed

 
Ranch Hand
Posts: 182
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for a nice, quick, beginner level intro to TDD and Junit which is about 10-15 pages long. I only want to get the feel of it to begin with.
I could not find any good tutorials on the net. For example, vogella's tut does not tell you much about JUnit and how to make a test. It gives a silly
toy example which makes little sense to me.

Any good ones out there ?
 
Ranch Hand
Posts: 47
Debian Eclipse IDE Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ali,

Did you check the wiki at junit.org ? This is a good starting point to see the possibilities of junit. I would first start with Junit and be comfortable with the basics and then start with the TDD methodology. At basic level TDD is very easy to start with and get's harder when you deepen your knowledge about it and gain more insight.

If you already have code written and assuming that you don't have unittest for them (otherwise you would know Junit or an other test framework ;<) try to write unittest for this code. This is quite harder then TDD but a good exercise. After this take a small well known piece of code and try to rewrite it using TDD but no copy paste. Base it on the functionality this code is providing and using TDD to develop it. When you do this you will see that the implementation code can be quite different in a positive way.

This reply is not really a pointer to a guide but doing what I suggest will give you a gentle starting point in unittesting and practice at the same time.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!