# code review & testing

// [21] real interview questions. Answers and sources live in the practice app.

practice this topic
  1. Walk me through how you review a pull request.(mid)
  2. What do you look for when reviewing someone else's code?(mid)
  3. Does a change have to be perfect before you approve it?(mid)
  4. A teammate sends you a 2000-line pull request. What do you do?(senior)
  5. You leave review comments and the author pushes back on all of them, refusing to make changes. How do you handle it?(senior)
  6. How do you keep code reviews fast without rubber-stamping?(mid)
  7. How do you write code review comments that get acted on without demotivating the author?(mid)
  8. How do you test your code? Walk me through your personal testing workflow.(junior)
  9. How do you decide what to test and what not to test?(mid)
  10. Explain the test pyramid. When would you deviate from it?(mid)
  11. When do you mock a dependency and when do you use the real thing?(mid)
  12. How do you test code that talks to an external service or a database?(mid)
  13. What is a flaky test, and what is your strategy when a test suite becomes flaky?(senior)
  14. What makes a test good and maintainable?(junior)
  15. Tell me about the most difficult bug you fixed recently. How did you track it down?(mid)
  16. Have you found any bugs in our product? What would you improve?(junior)
  17. What role should static analysis and linters play alongside code review and tests?(mid)
  18. You inherit a legacy service with zero tests and you need to change it. What is your testing strategy?(senior)
  19. Your tests stub an external service. What stops the stub from drifting away from the real service — and what is a contract test?(senior)
  20. What is property-based testing, and when would you actually reach for it?(senior)
  21. How do you use code review to level up junior engineers without slowing the team down?(mid)