Testing interview questions

15 real Testing questions from the Spring bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is @SpringBootTest?

Junior
  1. A.an annotation that places a mock collaborator into the test's application context, replacing the real one
  2. B.the utility that performs and asserts on HTTP requests against controllers without starting a real server
  3. C.a sliced test annotation configuring only the persistence layer, by default against an in-memory database
  4. D.an annotation bootstrapping the full application context for integration-style tests
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.@SpringBootTest — an annotation bootstrapping the full application context for integration-style tests
  2. B.@SpringBootTest — an annotation that places a mock collaborator into the test's application context, replacing the real one
  3. C.@SpringBootTest — the utility that performs and asserts on HTTP requests against controllers without starting a real server
  4. D.@SpringBootTest — a sliced test annotation configuring only the persistence layer, by default against an in-memory database
Reveal the answer + AI explanation — free account

4. What is @WebMvcTest?

Mid
  1. A.an annotation bootstrapping the full application context for integration-style tests
  2. B.a sliced test annotation configuring only the persistence layer, by default against an in-memory database
  3. C.the utility that performs and asserts on HTTP requests against controllers without starting a real server
  4. D.a sliced test annotation loading only the web layer to test controllers in isolation
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.@WebMvcTest — a sliced test annotation loading only the web layer to test controllers in isolation
  2. B.@WebMvcTest — an annotation that places a mock collaborator into the test's application context, replacing the real one
  3. C.@WebMvcTest — the utility that performs and asserts on HTTP requests against controllers without starting a real server
  4. D.@WebMvcTest — an annotation bootstrapping the full application context for integration-style tests
Reveal the answer + AI explanation — free account

7. What is @DataJpaTest?

Mid
  1. A.the utility that performs and asserts on HTTP requests against controllers without starting a real server
  2. B.a sliced test annotation configuring only the persistence layer, by default against an in-memory database
  3. C.an annotation bootstrapping the full application context for integration-style tests
  4. D.a sliced test annotation loading only the web layer to test controllers in isolation
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.@DataJpaTest — a sliced test annotation loading only the web layer to test controllers in isolation
  2. B.@DataJpaTest — the utility that performs and asserts on HTTP requests against controllers without starting a real server
  3. C.@DataJpaTest — an annotation bootstrapping the full application context for integration-style tests
  4. D.@DataJpaTest — a sliced test annotation configuring only the persistence layer, by default against an in-memory database
Reveal the answer + AI explanation — free account

10. What is MockMvc?

Mid
  1. A.a sliced test annotation loading only the web layer to test controllers in isolation
  2. B.a sliced test annotation configuring only the persistence layer, by default against an in-memory database
  3. C.the utility that performs and asserts on HTTP requests against controllers without starting a real server
  4. D.an annotation that places a mock collaborator into the test's application context, replacing the real one
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.MockMvc — an annotation bootstrapping the full application context for integration-style tests
  2. B.MockMvc — a sliced test annotation loading only the web layer to test controllers in isolation
  3. C.MockMvc — an annotation that places a mock collaborator into the test's application context, replacing the real one
  4. D.MockMvc — the utility that performs and asserts on HTTP requests against controllers without starting a real server
Reveal the answer + AI explanation — free account

13. What is @MockBean?

Mid
  1. A.an annotation that places a mock collaborator into the test's application context, replacing the real one
  2. B.an annotation bootstrapping the full application context for integration-style tests
  3. C.the utility that performs and asserts on HTTP requests against controllers without starting a real server
  4. D.a sliced test annotation configuring only the persistence layer, by default against an in-memory database
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.@MockBean — a sliced test annotation configuring only the persistence layer, by default against an in-memory database
  2. B.@MockBean — a sliced test annotation loading only the web layer to test controllers in isolation
  3. C.@MockBean — an annotation bootstrapping the full application context for integration-style tests
  4. D.@MockBean — an annotation that places a mock collaborator into the test's application context, replacing the real one
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Testing free