Writing and running tests is an essential part of delivering reliable software, in this write up I will be documenting my approach to writing effective integration test for web service using spring boot tools. This is going to be lengthy because we will test the persistence layer, service layer, web controllers and even exceptions so grab your cup of coffee.

Before we start integration test with Spring Boot let’s discuss how an integration test is different from a unit test. A unit test targets a small unit of code like a method or a class while an integration test on…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store