Back to Tech Interviews
Unit Testing Interview Master
Curated 20+ questions covering unit testing principles, TDD, AAA structure, mocks vs stubs, and code coverage metrics.
Total: 20 QuestionsLearned: 0 / 20 (0%)
Difficulty Filters
Tools & Options
Showing 20 of 20 questions
Beginner
What is Unit Testing, and why is it important?
Intermediate
Explain the F.I.R.S.T. principles of Unit Testing.
Beginner
What is the AAA (Arrange-Act-Assert) pattern?
Advanced
Explain the differences between Dummy, Mock, Stub, Spy, and Fake (Test Doubles).
Intermediate
What is Test-Driven Development (TDD), and what is the Red-Green-Refactor cycle?
Intermediate
What is Code Coverage, and what are its different metrics?
Beginner
Does 100% Code Coverage mean code is bug-free?
Beginner
What is the Testing Pyramid?
Beginner
What is the difference between a Unit Test and an Integration Test?
Advanced
What is Mutation Testing?
Intermediate
What is Mocking, and why should we avoid over-mocking?
Intermediate
Explain Behavior-Driven Development (BDD).
Beginner
What is regression testing?
Beginner
What is a test runner vs a test assertion library?
Intermediate
Explain Parameterized Tests.
Advanced
What is Hermetic testing?
Intermediate
How do you test private methods in a class?
Intermediate
What is a flaky test, and how do you resolve it?
Beginner
Explain code-first vs test-first development.
Scenario
