What is JUnit testing?
JUnit is a software testing framework for Java that makes it easy to write repeatable tests. It’s used by the majority of folks who write code for a living, but it’s often misunderstood. JUnit is a testing framework—it doesn’t test your code for you. JUnit tests are written by programmers, and they must be run by programmers to determine whether they are passing or failing.
JUnit allows programmers to define test cases, which are bits of code that make assertions about other code. The most basic assertion is a simple check that an expression evaluates to true or false, but there are many more kinds of assertions that allow programs to be tested in depth. For example, one can verify that a particular object has certain properties after being modified by a method call.