Testing interview questions
100 Backend Engineering practice questions. Read what a strong answer covers, then practise it out loud against the clock.
Practise Testing questionsBeginner
- Acceptance tests and BDD
- Arrange, act, assert
- Code coverage
- End-to-end tests
- Fixing a bug found in production
- High coverage but bugs still escape
- Integration tests
- Mocks, stubs, fakes and spies
- Naming tests well
- Parameterised tests
- Regression tests
- Running tests in CI
- Smoke tests
- Starting to test a codebase with no tests
- Test fixtures and setup
- Test isolation
- Test suite takes 40 minutes
- Test with random data fails occasionally
- Test-driven development
- Testing code that sends emails
- Testing edge cases and boundaries
- Testing error paths
- Testing HTTP APIs
- Tests break on every refactoring
- Tests call a real third-party API
- Tests fail around midnight
- Tests interfere through a shared database
- Tests pass locally but fail in CI
- The testing pyramid
- Unit tests
- What flaky tests are
- What makes a good unit test
- Which tests for a create-user endpoint?
- Why automated tests matter
Intermediate
- Component tests for a service
- Deciding what to test in a large legacy service
- Fuzz testing
- Hermetic tests
- Integration tests are slow because of containers
- Load testing before a big sale
- Load, stress, spike and soak tests
- Managing test data
- Mocks no longer match the real API
- Mutation testing
- Property-based testing
- Running tests in parallel
- Shared staging environment is always broken
- Shift-left testing
- Snapshot and golden file tests
- Sociable vs solitary unit tests
- Taming a flaky test suite
- Team resists writing tests
- Testcontainers
- Testing a data migration script
- Testing a message queue consumer
- Testing a nightly scheduled job
- Testing an idempotent endpoint
- Testing an integration with a payment provider
- Testing authorisation rules thoroughly
- Testing caching behaviour
- Testing code behind feature flags
- Testing database migrations
- Testing in production
- Testing incoming webhooks during development
- Testing retries and timeouts
- Tests pass with H2 but fail with PostgreSQL
- The pitfalls of over-mocking
Experienced
- A performance regression slipped into production
- Automated compatibility checks for schemas
- Chaos engineering as a testing practice
- Cutting a two-hour test suite to 15 minutes
- Designing a test strategy for a payments service
- Deterministic simulation testing
- Differential testing
- Fault injection testing
- Flaky end-to-end tests block releases
- Formal methods for system design
- Introducing chaos experiments for the first time
- Load test passed but production failed
- Measuring test effectiveness
- Performance regression testing in CI
- Proving tenant isolation with tests
- Realistic test data without personal information
- Releasing confidently without a staging environment
- Reproducing a production-only bug
- Shadow testing and traffic replay
- Synthetic monitoring
- Test impact analysis
- Test strategy for microservices
- Testing a distributed rate limiter
- Testing a Kafka stream processing pipeline
- Testing a saga across services
- Testing a search relevance change
- Testing an event-sourced aggregate
- Testing backward compatibility across API versions
- Testing complex billing date logic
- Testing disaster recovery
- Testing features that use non-deterministic AI outputs
- Untangling tests coupled to the database
- Validating a migration on a huge table