Testing interview practice.
Rehearse with explained interview questions. Describe the mechanism, trace an example, and explain a trade-off before revealing the answer.
How to use this session
- Choose a level and session length. Try each prompt before opening the notes.
- Compare your explanation with the source answer and revisit any concept you missed.
- Mark the questions you reviewed. Sign in to save session history; your draft answers stay in this page.
Code is provided for reading and tracing. These sessions do not execute or automatically grade code.
Testing practice
Think first. Reveal second.
Explain your reasoning before opening the notes. A focused session lets you choose your question count; mock rounds follow the original guide.
Loading your question pool…
Preview the Testing question pool
- Unit vs integration vs E2E tests?
Unit tests check a small piece of logic, integration tests verify collaborating components, and E2E tests exercise a complete user or API flow. They catch different classes of failure and have different setup and execution costs. A balanced strategy puts detailed business-rule checks near the unit level and preserves real integration coverage where mocks would hide bugs.
- What are Jest, React Testing Library and Supertest?
Jest provides test execution, assertions and tools for replacing dependencies. React Testing Library helps test components through behavior visible to users, while Supertest sends HTTP requests to an application for API assertions. They can be combined, but none automatically chooses meaningful cases or guarantees realism.
- Mock vs stub vs spy vs fixture?
Test doubles replace real collaborators so a test can control conditions or observe interactions. A stub supplies a response, a spy records calls, and a mock often combines replacement with expected interactions; terminology varies by library. Fixtures supply stable input data so cases are repeatable.