Backend testing interview questions

The test pyramid, fakes and mocks, real-database tests, contract tests, time and randomness, flaky tests, fixtures, migrations, property-based tests and chaos experiments.

4 quick facts

– interview-ready · 10 questions in this topic

– of 10 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. The test pyramid for a backendPick the fix
  2. Fakes, stubs and mocksPredict
  3. Integration tests with a real databasePredict
  4. Contract testing between servicesOrder the steps
  5. Testing code that uses time and randomnessPredict
  6. Flaky testsPick the fix
  7. Test data and fixturesPredict
  8. Testing database migrationsPick the fix
  9. Property-based testingPredict
  10. Chaos experiments and failure testingOrder the steps

Practise this topic

Flashcards · 14

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 10 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 2 sets

Timed, out loud, then tick what you covered. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.

Sources: Topic outline informed by System Design Primer by Donne Martin and the Zalando RESTful API Guidelines, both licensed under CC BY 4.0. Every question and answer is written by Best Latest Apps. Credits and license