How to approach JUnit for unit testing
A while ago I answered the following question on SearchSoftwareQuality.com’s Ask The Software Quality Expert: Questions & Answers.
Here is a clip from my answer:
You can find the full posting here.
Since writing that post, I've had the pleasure to hear Anthony Panozzo share his experience on getting started with Test Driven Development. While not a JUnit story, it's a wonderful read for someone just getting started and I'd add it to my list of references.
I like JUnit from what I hear. I do not know how to use it. Please kindly advise me how to use it.
Here is a clip from my answer:
Given that you asked specifically about JUnit, I would also recommend the JUnit documentation on SourceForge. A great example which walks you through specific tests (follow along in JUnit as you read it) is JUnit Test Infected: Programmers Love Writing Tests. Once you've read a bit about it, the best way to learn is to start doing it. Just start. The more you do it, the easier it gets.
You can find the full posting here.
Since writing that post, I've had the pleasure to hear Anthony Panozzo share his experience on getting started with Test Driven Development. While not a JUnit story, it's a wonderful read for someone just getting started and I'd add it to my list of references.