Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

Testing

Recruitment and knowledge question base. Filter, search and test your knowledge.

Topics

Unit vs integration vs end-to-end tests — what’s the difference?

easyunitintegratione2e
Open question

Answer

Unit tests verify small pieces in isolation, integration tests verify collaboration between components, and end-to-end tests validate full user flows across the system.

What is the test pyramid and why does it matter?

easytest-pyramidstrategyquality
Open question

Answer

The test pyramid says you should have many unit tests, fewer integration tests, and a small number of E2E tests. It matters because it balances speed, cost, and confidence.

Mocks vs stubs vs fakes — what’s the difference?

mediummocksstubsfakes
Open question

Answer

Stubs provide fixed responses, mocks verify interactions, and fakes are lightweight implementations (e.g., in-memory DB). They serve different goals in tests.

What causes flaky tests and how do you fix them?

mediumflakystabilityci
Open question

Answer

Flaky tests fail nondeterministically due to timing, shared state, or environment issues. Fix them by isolating state, controlling time, waiting for conditions not sleeps, and stabilizing environments.

What is contract testing and when is it useful?

mediumcontract-testingapimicroservices
Open question

Answer

Contract testing verifies that services agree on request/response schemas and behaviors without full end-to-end tests. It’s useful in microservices and external integrations.

What is property-based testing and when would you use it?

hardproperty-basedinvariantstesting
Open question

Answer

Property-based testing checks general properties over many generated inputs rather than fixed examples. It’s useful for edge cases and complex logic.

What does code coverage tell you and what does it not?

mediumcoveragequalitymetrics
Open question

Answer

Coverage shows which lines/branches were executed, but not whether tests assert correct behavior. High coverage doesn’t guarantee quality; low coverage doesn’t mean tests are useless.

What is TDD and when does it help?

mediumtddworkflowdesign
Open question

Answer

TDD (Test-Driven Development) is writing a failing test first, then making it pass and refactoring. It helps clarify requirements and design when logic is complex or risky.

How do you test asynchronous or concurrent code?

hardasyncconcurrencydeterminism
Open question

Answer

Use deterministic clocks, await completion, and assert on outcomes. For concurrency, test invariants, use controlled schedulers, and avoid timing-based sleeps.

How do you manage test data and fixtures?

mediumfixturesfactoriesdata
Open question

Answer

Use small, readable fixtures or factories, reset state between tests, and keep data close to the test intent. For integration tests, seed minimal data and clean up reliably.