JUnit Tutorial
Published: April 1, 2010 , Updated: June 23, 2011 , Author: mkyong

JUnit is the most famous unit test framework in Java. However it is only suitable for pure unit testing, for integration test, you should go for TestNG instead.
Happy learn JUnit ![]()
JUnit 4.x Tutorials
- Tutorial 1 – Basic usage
Introduces basic annotation supported in Junit 4. - Tutorial 2 – Expected Exception Test
Test the exception throw by the method. - Tutorial 3 – Ignore Test
Ignore certain method for unit test. - Tutorial 4 – Time Test
Make sure the testing method will return after certain time. - Tutorial 5 – Suite Test
Bundle a few unit test cases and run it together. - Tutorial 6 – Parameterized Test
How do pass parameter value for unit test.
JUnit Vs TestNG
- JUnit 4 Vs TestNG – Comparison
Detail feature comparison between JUnit 4 and TestNG.
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~
Thank you!
nice