Q
Problem solve Get help with specific problems with your technologies, process and projects.

How to approach JUnit for unit testing

JUnit is a useful tool for those conducting unit tests. Expert Mike Kelly explains how to begin using JUnit and recommends resources for those new to unit testing.

I like JUnit from what I hear. I do not know how to use it. Please kindly advise me how to use it.

In 2005 Dana Spears and I held a workshop on unit testing in Indianapolis. I published some of the findings of...

that workshop here. At the end of that article, I recommended a number of resources for getting started. That list included Kent Beck's Test-Driven Development: By Example (Addison-Wesley, 2002, ISBN 0321146530) and TestDriven.com.

Software testing resources:
Building beautiful software tests around JUnit

Unit testing critical for improving software quality

Find software bugs, defects using code coverage

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.

This was last published in November 2009

Dig Deeper on Software Security Testing and Quality Assurance

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchMicroservices

TheServerSide.com

SearchCloudApplications

SearchAWS

SearchBusinessAnalytics

SearchFinancialApplications

SearchHealthIT

DevOpsAgenda

Close