Monday, September 20, 2021

What is Junit and how it works?

 Junit is a unit testing framework for java programing language. It is necessary for test driven development.

 To include Junit in project create another source folder and create a class for Junit testing .

Then Junit jars will include in classpath.

When runs a Junit test it first create the instance of the Junit class then call the method annotated with @Test.

Keep in mind-Absence of fail() it is success in Junit.

No comments:

Post a Comment

Testing controller

------Controller------------- @RestController @RequestMapping("/items") public class ItemController {     private final ItemServic...