• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to get practice in TDD / Code (first) testing ?  RSS feed

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have skimmed some books on TDD and I don't find any of them good, except Pragmatic unit testing in java with junit. Unfortunately, this book is introductory and does not have enough examples to get skilled and also build some memory. I also read a bit of "Practical Unit Testing with JUnit and Mockito" which was good, but had too many unrelated examples and no project.

I am confused and I am looking for ways to learn TDD. Are there any project ideas or open source projects where I can practice TDD ? I want to become a better developer, but I am unable to find ways to get there sooner. Please suggest something for me.
 
Saloon Keeper
Posts: 9254
177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should probably think of something for yourself to work on, preferably complex enough that you need to write your own interfaces, or even an entire API library. However, you can do TDD on small projects.

For instance, you could program a game of FreeCell, and start out by creating skeletons for the cards, the cascades, the game, etc. When you have determined that the contract for a cascade should be that you can build cards that are one smaller than and have a different color from the last card on the cascade, you can write a test for that requirement.

When you've convinced yourself that all the contracts you've written are sufficient and sensible (for the time being), and you've written all the tests that check these contracts, you can start implementing.
 
Sheriff
Posts: 12348
201
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TDD tutorials by experts like James Shore and J B Rainsberger: james shore tdd j b rainsberger tdd
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!