Backend Development
Spring Boot
Subjective
Oct 03, 2025
Explain Spring Boot Testing. What is @SpringBootTest?
Detailed Explanation
@SpringBootTest loads complete application context for integration testing:\n\n@SpringBootTest\nclass UserServiceTest {\n @Autowired\n private UserService userService;\n \n @Test\n void testFindUser() {\n User user = userService.findById(1L);\n assertThat(user.getName()).isEqualTo("John");\n }\n}
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts