Java Unit Testing

Jakob Jenkov
Last update: 2014-05-24

This trail is about unit testing in Java. Unit testing means testing the smaller units of your application, like classes and methods.

The reason you test your code is to prove to yourself, and perhaps to the users / clients / customers, that your code works.

Unit tests are typically automated, meaning once they are implemented, you can run them again and again. That is, your computer can run them again and again, while you do something else.

This tutorial uses JUnit to implement the unit tests. There are other unit test frameworks for Java too, like TestNG.

Feel Free to Contact Me

If you disagree with anything I write here about Java Unit Testing, or just have comments, questions, etc, feel free to send me an email. You wouldn't be the first to do so. You can find my email address on the about page.

Jakob Jenkov

Featured Videos

Core Software Performance Optimization Principles

Thread Congestion in Java - Video Tutorial

Close TOC

All Trails

Trail TOC

Page TOC