Integration Testing Lecture Notes
Integration Testing Lecture Notes
Integration Testing
By Ramesh Fadatare (Java Guides)
Integration Testing
As the name suggests, integration tests focus on integrating different layers of the
application. That also means no mocking is involved.
Basically, we write integration tests for testing a feature which may involve
interaction with multiple components.
Examples:
Employee Management Feature ( EmployeeRepository, EmployeeService, EmployeeController)
User Management Feature (UserController, UserService, and UserRepository)
Login Feature (LoginRespository, LoginController, Login Service) etc
@SpringBootTest
Mockito
@SpringBootTest
Mockito
@SpringBootTes
Spring Boot provides @SpringBootTest annotation for Integration testing. This
annotation creates an application context and loads full application context.
@SpringBootTes
It starts the embedded server, creates a web environment and then enables @Test methods to
do integration testing.
fi
fi
fi