Testing & QA interview questions

Unit vs integration vs end-to-end, mocking, TDD, flaky tests, coverage and how to test code you didn’t write.

Readiness: 0 of 10 nailed

How to use this page: 1. Read a question2. Type your answer3. Check with AI4. Open the model answer5. Timed drill when you’re 70% ready

Strategy

FoundationConcept

Unit vs integration vs end-to-end tests?

Mid-levelConcept

What is TDD? Do you practise it?

Mid-levelConcept

Is 100% code coverage a good goal?

JuniorConcept

What makes a good end-to-end test?

Mid-levelHow to reply

How do you manage regression testing under a tight deadline?

Writing tests

JuniorWrite it by hand

Write unit tests for a calculateDiscount(total, code) function.

JuniorConcept

What is mocking and when is it harmful?

FoundationReal-world scenario

Write test cases for a login form.

Maintenance

Mid-levelIt’s broken: why?

A test passes locally but fails randomly in CI. What are the usual causes?

Process

FoundationReal-world scenario

What makes a good bug report?

Also prepare