Testing interview questions

15 Testing questions from the Spring bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

2. Which term means: "an annotation bootstrapping the full application context for integration-style tests"?

Junior
  1. A.@WebMvcTest
  2. B.@SpringBootTest
  3. C.@DataJpaTest
  4. D.@MockBean

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which term means: "a sliced test annotation loading only the web layer to test controllers in isolation"?

Mid
  1. A.@WebMvcTest
  2. B.@MockBean
  3. C.MockMvc
  4. D.@SpringBootTest

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which term means: "a sliced test annotation configuring only the persistence layer, by default against an in-memory database"?

Mid
  1. A.@WebMvcTest
  2. B.MockMvc
  3. C.@MockBean
  4. D.@DataJpaTest

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

11. Which term means: "the utility that performs and asserts on HTTP requests against controllers without starting a real server"?

Mid
  1. A.@SpringBootTest
  2. B.@MockBean
  3. C.MockMvc
  4. D.@WebMvcTest

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which term means: "an annotation that places a mock collaborator into the test's application context, replacing the real one"?

Mid
  1. A.MockMvc
  2. B.@SpringBootTest
  3. C.@WebMvcTest
  4. D.@MockBean

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Testing question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers