• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Some kind of test driven development for beginners ?

 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that it is good to test one's code before coding (unit testing?) and after (?) finishing coding - unless you make elementary programs. I want to get into the habit of testing my code, not just with silly print statements but with all those frameworks and test cases those developers use.
Is it okay for beginners to think about testing using formal techniques or do it after gaining more experience in coding ? If yes, then where do I begin learning how to test my code formally ?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.
 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.


Thanks Mohammed. Is the TDD book based on Java ? I could not get sample pages for the book.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy Jack wrote:
Mohamed Sanaulla wrote:You can think of writing unit tests, may be start using some unit tests frameworks like JUnit, Mockito. I would recommend to read Test Driven Development book by Kent Beck as it shows you how to get started with TDD in simple ways.


Thanks Mohammed. Is the TDD book based on Java ? I could not get sample pages for the book.

You can preview the book from Google Books. yes the examples are in Java.
 
Andy Jack
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:
You can preview the book from Google Books. yes the examples are in Java.


Thanks for the link. This book was published in 2003, which is quite old. Would that be a problem if I try to use today's tools to learn testing ? If yes, then are there any other books like this
which were written more recently ?
 
Winston Gutkowski
Bartender
Pie
Posts: 10509
64
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy Jack wrote:I want to get into the habit of testing my code, not just with silly print statements but with all those frameworks and test cases those developers use.

Whatever you decide (and there's been a lot of excellent advice), don't abandon those "silly print statements" altogether. While you're actually working on a complicated piece of code, they can be invaluable for making sure you've ironed out all the "silly errors", leaving your test suite to concentrate on business logic. Indeed, some of them may even end up in your test suite...

Winston
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're looking for a book, I would recommend "Beginning Algorithms" by Simon Harris and James Ross. It gives a good grasp on Test Driven Development, and as a collateral damage you'll have a chance to learn more about Data Structures and Algorithms.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic