Skip to content
Sharp

Testing interview questions

API Contract Testing, Arrange Act Assert, Basic pytest Assertions, Boundary And Failure Tests, Fixtures, Monkeypatching and Mocks

225 questions with answers and explanations · 207 flashcards

Questions (page 4 of 5)

  1. If you wrote a test around reliability stories, what should the test prove first?Multiple choiceHard
  2. If you wrote a test around tmp_path and file tests, what should the test prove first?Multiple choiceHard
  3. What does a strong engineer do when reasoning through monkeypatching and mocks code?Multiple choiceMedium
  4. Which option treats monkeypatching and mocks as an engineering policy decision instead of a syntax trick?Multiple choiceHard
  5. What does a strong engineer do when reasoning through fixtures code?Multiple choiceMedium
  6. You cannot rewrite everything today. What is the best incremental improvement around fixtures?Multiple choiceMedium
  7. Which boundary choice best fits tmp_path and file tests in a maintainable Python system?Multiple choiceHard
  8. Which judgment is strongest when choosing a data shape for reliability stories?Multiple choiceHard
  9. A senior interviewer asks for one tradeoff behind monkeypatching and mocks. What is the strongest follow-up?Multiple choiceHard
  10. You cannot rewrite everything today. What is the best incremental improvement around monkeypatching and mocks?Multiple choiceMedium
  11. What is the healthiest performance judgment around tmp_path and file tests?Multiple choiceHard
  12. What assumption should be made explicit when working with parameterized tests?Multiple choiceMedium
  13. When is parameterized tests being used in the wrong way?Multiple choiceMedium
  14. What is the clearest sign that code around fixtures should be refactored?Multiple choiceMedium
  15. What is the clearest sign that code around parameterized tests should be refactored?Multiple choiceMedium
  16. When is tmp_path and file tests being used in the wrong way?Multiple choiceHard
  17. When is reliability stories being used in the wrong way?Multiple choiceHard
  18. A teammate submits shaky monkeypatching and mocks code. Which review comment is the strongest?Multiple choiceMedium
  19. Another engineer will maintain this code later. What choice helps the most around monkeypatching and mocks?Multiple choiceMedium
  20. What kind of contract clarity matters most for monkeypatching and mocks?Multiple choiceHard
  21. What kind of contract clarity matters most for reliability stories?Multiple choiceHard
  22. Which boundary choice best fits fixtures in a maintainable Python system?Multiple choiceMedium
  23. What assumption should be made explicit when working with monkeypatching and mocks?Multiple choiceMedium
  24. Which explanation would sound strongest in an interview when discussing tmp_path and file tests?Multiple choiceHard
  25. Which response shows the healthiest evidence-first mindset around reliability stories?Multiple choiceHard
  26. Which option treats parameterized tests as an engineering policy decision instead of a syntax trick?Multiple choiceHard
  27. A teammate submits shaky reliability stories code. Which review comment is the strongest?Multiple choiceHard
  28. Which response shows the healthiest evidence-first mindset around parameterized tests?Multiple choiceHard
  29. What do interviewers usually hear as a strong signal when you discuss tmp_path and file tests well?Multiple choiceHard
  30. What is the clearest sign that code around monkeypatching and mocks should be refactored?Multiple choiceMedium
  31. Another engineer will maintain this code later. What choice helps the most around tmp_path and file tests?Multiple choiceHard
  32. Which option is the safer default when shipping code around monkeypatching and mocks?Multiple choiceHard
  33. Which option describes the most likely pitfall around reliability stories?Multiple choiceHard
  34. A bug appears around reliability stories. What is the strongest first debugging move?Multiple choiceHard
  35. What assumption should be made explicit when working with fixtures?Multiple choiceMedium
  36. What kind of contract clarity matters most for parameterized tests?Multiple choiceHard
  37. What do interviewers usually hear as a strong signal when you discuss parameterized tests well?Multiple choiceHard
  38. A senior interviewer asks for one tradeoff behind reliability stories. What is the strongest follow-up?Multiple choiceHard
  39. Which explanation would best help the team align on reliability stories?Multiple choiceHard
  40. A teammate submits shaky parameterized tests code. Which review comment is the strongest?Multiple choiceMedium
  41. Which judgment is strongest when choosing a data shape for parameterized tests?Multiple choiceMedium
  42. Which option is the safer default when shipping code around tmp_path and file tests?Multiple choiceHard
  43. What is the healthiest performance judgment around fixtures?Multiple choiceMedium
  44. Which response shows the healthiest evidence-first mindset around tmp_path and file tests?Multiple choiceHard
  45. Which boundary choice best fits monkeypatching and mocks in a maintainable Python system?Multiple choiceMedium
  46. Which explanation would best help the team align on fixtures?Multiple choiceMedium
  47. Which boundary choice best fits parameterized tests in a maintainable Python system?Multiple choiceMedium
  48. If monkeypatching and mocks fails in production, what handling philosophy is strongest?Multiple choiceMedium
  49. What does a strong engineer do when reasoning through parameterized tests code?Multiple choiceMedium
  50. What is the healthiest performance judgment around reliability stories?Multiple choiceHard