What is the fundamental difference between Manual Testing and Automated Testing?
The core difference lies in execution control and efficiency:
Explain the layers of the Test Automation Pyramid from base to peak.
Formulated by Mike Cohn, the pyramid suggests a healthy distribution of automated tests:
Unit Tests (Base): Test individual functions or methods. They are fast, cheap, and should make up the majority of your test suite.
API / Integration Tests (Middle): Verify communication between services or components.
UI / End-to-End (E2E) Tests (Peak): Test the entire user journey. They are slow, brittle, and expensive, so you should have the fewest of these.
What is Regression Testing, and why is it prime for automation?
Definition: Testing existing software after modifications (like bug fixes or new features) to ensure that old functionality hasn't broken.
It is perfect for automation because:
It must be run repeatedly with every single code change.
The test steps are highly predictable and stable.
What is the Page Object Model (POM) in UI automation?
POM is a design pattern that creates an object repository for web elements.
The Structure: Every web page (or component) has its own corresponding Page Class.
The Benefit: Reduces code duplication. If a button's ID changes on the UI, you only have to update it in one place (the Page Class), rather than in dozens of separate test scripts.
Define Data-Driven Testing (DDT).
A framework archetype where test scripts are completely separated from the test data.
How it works: A single test script loops through an external data source (like an Excel spreadsheet, CSV, or JSON file).
Example: Testing a login form by passing 100 different combinations of usernames and passwords using just one automated script.