Testing for Software Engineerings
Software testing is the practice of running code to find defects and to show that requirements are met. A testing strategy mixes unit, integration and end-to-end tests in a pyramid shape, adds regression suites, and chooses what to test by risk. Automated tests give fast feedback on every change.
Stage: Testing and Quality · Part of the Software Engineering roadmap · Last reviewed 19 November 2026
What to learn in Testing
- Write a unit test with arrange, act and assert steps and a clear failure message
- Use mocks or stubs to isolate a unit from a database or network call
- Decide the right mix of unit, integration and end-to-end tests for a service
- Apply boundary value analysis and equivalence partitioning to pick test inputs
- Measure coverage and explain why high coverage alone does not prove quality
Testing interview questions
What is the testing pyramid?
The testing pyramid suggests many fast unit tests at the base, fewer integration tests in the middle and a small number of slow end-to-end tests on top. It balances speed, cost and confidence. Inverting it, with mostly UI tests, gives slow, flaky suites that are expensive to maintain.
What is the difference between a mock and a stub?
A stub returns canned answers so the unit under test can run, and you assert on the result. A mock also records how it was called, so you assert on interactions, such as that a payment gateway was invoked once with the right amount. Over-mocking can tie tests to implementation details.
Where Testing fits in the Software Engineering roadmap
Testing belongs to the Testing and Quality stage (intermediate level). Prove it works.
Other units in this stage
Back to the full Software Engineering roadmap