Test Automation
Test Automation
Using software tools to execute tests automatically, compare results, and report findings without manual effort.
Full definition
Test automation is the practice of using specialized tools and scripts to execute tests automatically, reducing manual effort and increasing testing speed and consistency.
What to automate (good candidates):
- Regression tests (run repeatedly on every build)
- Smoke tests (fast verification of critical paths)
- Data-driven tests (same test, many data combinations)
- Cross-browser/cross-device tests
- API tests (fast, stable, high ROI)
What NOT to automate:
- Exploratory testing (requires human intuition)
- Usability testing (requires human judgment)
- One-time tests (automation ROI requires repetition)
- Features that change frequently (high maintenance cost)
The test automation pyramid:
- Bottom (many): Unit tests — fast, cheap, isolated
- Middle (some): Integration/API tests — moderate speed, good coverage
- Top (few): UI/E2E tests — slow, expensive, realistic
Popular automation frameworks:
- Selenium WebDriver: Industry standard, multi-language
- Playwright: Modern, fast, auto-wait
- Cypress: Developer-friendly, JavaScript-focused
- Appium: Mobile automation
- RestAssured/Supertest: API automation
Interview tip
Know when NOT to automate. This shows maturity. Also, be able to explain the test pyramid and why most tests should be at the unit/API level.