Fundamentals · Medium · Free
Unit vs integration vs end-to-end tests.
FresherFundamentalsSoftware Engineering & Tools
Test pyramid
For Unit vs integration vs end-to-end tests., interviewers listen for a crisp definition, how the pieces interact in a real system, and one trade-off or failure mode you have seen or would guard against.
| Type | Scope | Speed |
|---|---|---|
| Unit | Single class/function | Fast |
| Integration | DB, API, modules | Medium |
| E2E | Full browser flow | Slow, flaky if overused |
Many unit, fewer integration, minimal E2E.