Test Doubles interview questions

15 Test Doubles questions from the Testing 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 Stub?

Junior
  1. A.a stand-in object that returns hardcoded canned responses to calls made during a check
  2. B.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  3. C.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  4. D.a working lightweight implementation, such as an in-memory database, used instead of the real one

Answer + AI explanation with Pro

2. Which term means: "a stand-in object that returns hardcoded canned responses to calls made during a check"?

Junior
  1. A.Stub
  2. B.Spy
  3. C.Mock
  4. D.Dummy

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.Stub — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.Stub — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  3. C.Stub — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  4. D.Stub — a stand-in object that returns hardcoded canned responses to calls made during a check

Answer + AI explanation with Pro

4. What is Mock?

Mid
  1. A.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.a working lightweight implementation, such as an in-memory database, used instead of the real one
  3. C.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  4. D.a stand-in object that returns hardcoded canned responses to calls made during a check

Answer + AI explanation with Pro

5. Which term means: "a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met"?

Mid
  1. A.Stub
  2. B.Mock
  3. C.Fake
  4. D.Spy

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.Mock — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.Mock — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  3. C.Mock — a working lightweight implementation, such as an in-memory database, used instead of the real one
  4. D.Mock — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward

Answer + AI explanation with Pro

7. What is Fake?

Mid
  1. A.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  2. B.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  3. C.a stand-in object that returns hardcoded canned responses to calls made during a check
  4. D.a working lightweight implementation, such as an in-memory database, used instead of the real one

Answer + AI explanation with Pro

8. Which term means: "a working lightweight implementation, such as an in-memory database, used instead of the real one"?

Mid
  1. A.Mock
  2. B.Stub
  3. C.Fake
  4. D.Dummy

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.Fake — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  2. B.Fake — a stand-in object that returns hardcoded canned responses to calls made during a check
  3. C.Fake — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  4. D.Fake — a working lightweight implementation, such as an in-memory database, used instead of the real one

Answer + AI explanation with Pro

10. What is Spy?

Junior
  1. A.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  3. C.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  4. D.a stand-in object that returns hardcoded canned responses to calls made during a check

Answer + AI explanation with Pro

11. Which term means: "a wrapper that records how a real or substitute object was called so the calls can be asserted afterward"?

Junior
  1. A.Stub
  2. B.Spy
  3. C.Fake
  4. D.Mock

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.Spy — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.Spy — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
  3. C.Spy — a stand-in object that returns hardcoded canned responses to calls made during a check
  4. D.Spy — a working lightweight implementation, such as an in-memory database, used instead of the real one

Answer + AI explanation with Pro

13. What is Dummy?

Junior
  1. A.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
  2. B.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  3. C.a working lightweight implementation, such as an in-memory database, used instead of the real one
  4. D.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward

Answer + AI explanation with Pro

14. Which term means: "a placeholder object passed only to fill a parameter list, never actually used by the code under examination"?

Junior
  1. A.Dummy
  2. B.Fake
  3. C.Spy
  4. D.Stub

Answer + AI explanation with Pro

15. Which statement is correct?

Junior
  1. A.Dummy — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
  2. B.Dummy — a working lightweight implementation, such as an in-memory database, used instead of the real one
  3. C.Dummy — a stand-in object that returns hardcoded canned responses to calls made during a check
  4. D.Dummy — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward

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 Test Doubles 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