QA
INTVW

QA Interview Questions — Complete Guide

MANUAL · API · AUTOMATION · SELENIUM · JAVA · PLAYWRIGHT · APPIUM · POSTMAN · JMETER · SQL · AGILE · CI/CD

🎓 Next Gen QA IT Coaching Classes
📞 Mr. Khan Sir  |  8700350994
Manual & Automation Selenium · Playwright · Appium Online & Offline B.Tech / BCA / MCA / CBSE
🧪
Manual Testing
15 Questions
Q1. What is Software Testing?
Process of evaluating software to find bugs, verify it meets requirements and works as expected before delivery to end users.
Q2. What is SDLC? Name all phases.
Software Development Life Cycle: 1. Requirement Gathering → 2. System Design → 3. Implementation → 4. Testing → 5. Deployment → 6. Maintenance
Q3. What is STLC? Name all phases.
Software Testing Life Cycle: 1. Requirement Analysis → 2. Test Planning → 3. Test Case Development → 4. Environment Setup → 5. Test Execution → 6. Test Closure
Q4. What is Verification vs Validation?
Verification = "Are we building the product RIGHT?" (static, no execution). Validation = "Are we building the RIGHT product?" (dynamic, actual testing).
Q5. What is Smoke vs Sanity vs Regression?
Smoke = Wide/shallow build stability check. Sanity = Narrow/deep check after specific bug fix. Regression = Full re-testing after ANY code change.
Q6. What is Black Box vs White Box vs Grey Box?
Black Box = No code knowledge, test I/O. White Box = Full code knowledge, structural. Grey Box = Partial knowledge, mix of both.
Q7. What is Boundary Value Analysis (BVA)?
Testing values at the EDGES of valid/invalid ranges. For age 18-60, test: 17, 18, 19, 59, 60, 61. Bugs occur most at boundaries.
Q8. What is Equivalence Partitioning?
Dividing input data into valid and invalid partitions. Test ONE value from each partition. For age 18-60: test 10 (invalid), 35 (valid), 70 (invalid).
Q9. What is Severity vs Priority?
Severity = technical impact, set by QA tester. Priority = business urgency, set by Manager/PO. Logo missing = Minor Severity but High Priority.
Q10. What is Bug Life Cycle?
New → Assigned → Open/In Progress → Fixed → Retest → Closed. Can also go: Reopened, Deferred, Rejected/Not a Bug, Duplicate.
Q11. What is RTM?
Requirement Traceability Matrix — maps each requirement to its test cases. Ensures no requirement is missed. Shows test coverage status.
Q12. What is Exploratory Testing?
Simultaneous learning + designing + executing tests. No predefined scripts. Uses tester's experience and intuition to find bugs creatively.
Q13. What is UAT?
User Acceptance Testing — end users test software to verify it meets business requirements. Last phase before go-live. Done at client's location.
Q14. Difference: Error, Bug, Failure?
Error = Human mistake in thinking/coding. Bug/Defect = Result of error in code. Failure = System doesn't work as expected due to bug.
Q15. What is a Test Plan? Key contents?
Document describing test scope, strategy, resources, schedule, risks. Contains: objectives, in-scope/out-scope, environment, entry/exit criteria, deliverables.
🔗
API Testing
12 Questions
Q1. What is API Testing?
Testing APIs directly at the business logic layer without UI. Validates functionality, reliability, security, and performance. Faster than UI testing.
Q2. What is REST API?
Representational State Transfer — architectural style using HTTP. Stateless, resource-based URLs, JSON/XML responses. Most popular API type today.
Q3. GET vs POST vs PUT vs PATCH vs DELETE?
GET=Read. POST=Create. PUT=Full Update. PATCH=Partial Update. DELETE=Delete. GET has no body. POST/PUT/PATCH have request body.
Q4. What are HTTP Status Codes?
2xx=Success (200 OK, 201 Created, 204 No Content). 3xx=Redirect. 4xx=Client Error (400, 401, 403, 404). 5xx=Server Error (500, 502, 503).
Q5. 401 vs 403?
401 Unauthorized = Not authenticated (no login/token). 403 Forbidden = Authenticated but NO permission to access the resource.
Q6. What is Idempotent?
Calling same API multiple times gives the same result. GET, PUT, DELETE are idempotent. POST is NOT idempotent — creates new record each call.
Q7. What to verify in API response?
Status code, response body fields/values, data types, response time, headers (Content-Type), error messages for negative cases.
Q8. PUT vs PATCH difference?
PUT = Replaces ENTIRE resource (all fields required). PATCH = Updates ONLY specific fields (partial update). PATCH is more efficient for small changes.
Q9. Path param vs Query param?
Path param = part of URL: /users/123. Query param = after ?: /users?page=1&limit=10. Path = specific resource, Query = filter/sort/paginate.
Q10. What is JSON? Types?
JavaScript Object Notation — lightweight data format. Types: String, Number, Boolean (true/false), null, Array [], Object {}.
Q11. What is API Authentication types?
API Key (header/query), Bearer Token (JWT after login), Basic Auth (base64 user:pass), OAuth 2.0 (token-based, Google/GitHub style).
Q12. What is Negative API Testing?
Testing with invalid inputs — wrong data types, missing required fields, expired token, unauthorized access — to verify proper error handling and messages.
🤖
Automation Testing
10 Questions
Q1. What is Automation Testing?
Using tools/scripts to automatically execute test cases without manual effort. Faster, more reliable, ideal for regression and repetitive tests.
Q2. When to automate a test case?
Automate when: repetitive tests, regression suite, stable features, large data sets, smoke tests, tests needing speed/frequency. Don't automate one-time or exploratory tests.
Q3. What is Test Automation Framework?
Structured set of guidelines for automation: Data-driven (Excel data), Keyword-driven (keywords), Hybrid (both), BDD (Gherkin/Cucumber), POM (Page Object).
Q4. What is Page Object Model (POM)?
Design pattern where each web page = one class. Page elements and actions are defined in page class. Test class calls page methods. Reduces code duplication.
Q5. What is Data-Driven Testing?
Running same test with multiple data sets from external source (Excel, CSV, JSON). In TestNG: @DataProvider. Tests login with 10 different username/password combos.
Q6. What is BDD? Tools used?
Behavior Driven Development — tests written in plain English (Gherkin). Given/When/Then format. Tools: Cucumber (Java), Behave (Python), SpecFlow (.NET).
Q7. Manual vs Automation Testing?
Manual: Human executes, flexible, good for exploratory/UI. Automation: Script executes, faster/reusable, good for regression/load. Both are needed.
Q8. What is CI/CD in testing?
Continuous Integration/Delivery — automation tests run automatically on every code commit. Tools: Jenkins, GitHub Actions, GitLab CI. Fast feedback to devs.
Q9. What is flaky test?
Test that passes sometimes and fails sometimes without code change. Causes: timing issues, dynamic data, unstable waits. Fix with explicit waits and stable locators.
Q10. Name automation tools you know.
Selenium (Web-Java), Playwright (Web-JS/Python/Java), Appium (Mobile), Postman/RestAssured (API), JMeter (Performance), Cypress (Web-JS).
🌐
Selenium WebDriver
15 Questions
Q1. What is Selenium WebDriver?
Open-source framework for automating web browsers. Supports Chrome, Firefox, Edge, Safari. Works with Java, Python, C#, JS. Uses W3C protocol directly.
Q2. What are Selenium locators?
ID (fastest), Name, ClassName, TagName, LinkText, PartialLinkText, XPath, CSS Selector. Priority: ID > Name > CSS > XPath.
Q3. XPath vs CSS Selector?
XPath: can navigate UP (parent/sibling), supports text search. CSS: faster, simpler, goes DOWN only. Use CSS for simple, XPath for complex or text-based locating.
Q4. Implicit vs Explicit Wait?
Implicit: Global wait for ALL elements (set once). Explicit: Wait for SPECIFIC condition (elementToBeClickable, visibilityOf). Always prefer Explicit over Implicit.
Q5. What is Fluent Wait?
Advanced wait with custom polling interval and ignore exceptions. FluentWait with .withTimeout(30s).pollingEvery(2s).ignoring(NoSuchElementException). Best for dynamic elements.
Q6. driver.close() vs driver.quit()?
driver.close() = Closes CURRENT window only. driver.quit() = Closes ALL windows and ends WebDriver session. Always use quit() in @AfterMethod.
Q7. How to handle dropdowns?
Use Select class: selectByVisibleText("India"), selectByValue("IN"), selectByIndex(2). For custom dropdowns (non-select tag), use click + XPath/CSS.
Q8. How to handle multiple windows?
Get all handles: getWindowHandles(). Store parent handle. Loop through handles → switch to new one. Switch back: driver.switchTo().window(parentHandle).
Q9. How to handle frames/iFrames?
Switch in: driver.switchTo().frame("name") or by index or WebElement. Switch out: driver.switchTo().defaultContent() or parentFrame() for nested frames.
Q10. How to handle Alerts?
Switch: driver.switchTo().alert(). Accept: alert.accept(). Dismiss: alert.dismiss(). Get text: alert.getText(). Send text (prompt): alert.sendKeys("text").
Q11. What is Actions class?
For advanced interactions: hover (moveToElement), right-click (contextClick), double-click, drag & drop, key chords (Ctrl+A). Always call .perform() at end.
Q12. What is JavascriptExecutor?
Executes JS in browser: js.executeScript("arguments[0].click()",el). Used for: click hidden elements, scroll, set value, highlight elements, remove readonly.
Q13. What is StaleElementReferenceException?
Element was found but DOM changed (page refresh/navigation) — reference becomes stale. Fix: Re-find element after page change, or use try-catch with retry logic.
Q14. How to take screenshot in Selenium?
((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE). Copy with FileUtils. In Selenium 4, can take element screenshot with element.getScreenshotAs().
Q15. What is Page Object Model?
Design pattern: each page = one class. Use @FindBy for elements, PageFactory.initElements() in constructor. Test class calls page methods. Maintainable, reusable framework.
☕
Java for QA
10 Questions
Q1. What are Java OOP concepts?
4 Pillars: Encapsulation (hide data), Inheritance (extend class), Polymorphism (many forms), Abstraction (hide complexity). All used in Selenium framework design.
Q2. What is the difference between == and .equals()?
== compares object reference (memory address). .equals() compares actual content/value. For String comparison always use .equals(), never ==.
Q3. What is ArrayList vs Array?
Array: Fixed size, faster. ArrayList: Dynamic size, add/remove elements. In Selenium, findElements() returns List<WebElement> — ArrayList under the hood.
Q4. What is try-catch in Java?
Exception handling: try block runs code, catch handles exceptions, finally runs always. Used in Selenium for StaleElement, NoSuchElement exceptions.
Q5. What is interface vs abstract class?
Interface: All methods abstract (Java 8 onwards can have default). Abstract class: Mix of abstract and concrete methods. Class can implement multiple interfaces but extend only one abstract class.
Q6. What is static keyword?
Static members belong to CLASS not instance. Can be called without creating object. Used for: driver instance, utility methods, constants, counter variables.
Q7. What is String vs StringBuilder?
String: Immutable — new object on every change (slow for loops). StringBuilder: Mutable — modifies same object (fast). Use StringBuilder for building dynamic strings.
Q8. What are access modifiers?
public (everywhere), protected (same package + subclass), default (same package), private (same class only). Used in POM for encapsulation.
Q9. What is constructor?
Special method called when object is created. Same name as class, no return type. In POM, constructor initializes PageFactory and stores driver reference.
Q10. What are Collections in Java?
List (ordered, duplicates): ArrayList, LinkedList. Set (unordered, no duplicates): HashSet. Map (key-value): HashMap. Used in Selenium: Set<String> for window handles.
🎭
Playwright
12 Questions
Q1. What is Playwright?
Modern browser automation framework by Microsoft. Supports Chromium, Firefox, WebKit. Works with JS, TypeScript, Python, Java, C#. Auto-waits built in — no explicit waits needed.
Q2. Playwright vs Selenium — key differences?
Playwright: Auto-wait, multi-browser in one test, network interception, parallel by default, faster. Selenium: Older, more language support, larger community, Grid for parallel.
Q3. What is auto-waiting in Playwright?
Playwright automatically waits for elements to be visible, stable, and actionable before interacting. No need for Thread.sleep() or explicit waits in most cases.
Q4. How to locate elements in Playwright?
page.locator("css"), getByText("Login"), getByRole("button"), getByLabel("Email"), getByPlaceholder("..."), getByTestId("id").
Q5. How to perform assertions in Playwright?
Using expect(): await expect(locator).toBeVisible(), toHaveText("text"), toBeEnabled(), toHaveValue(), toContainText(), toBeChecked().
Q6. What is Playwright fixtures?
Built-in setup/teardown system. page, browser, context are fixtures. Custom fixtures extend base: test.extend({}). Replaces @BeforeMethod/@AfterMethod of TestNG.
Q7. What is Browser Context in Playwright?
Isolated browser session — own cookies, storage, cache. Like incognito window. Multiple contexts run in parallel. Used for testing multiple users simultaneously.
Q8. How to handle multiple tabs in Playwright?
Use context.waitForEvent("page") to catch new tab. Or const newPage = await context.newPage(). Each tab is a separate Page object.
Q9. What is network interception in Playwright?
page.route(url, handler) — intercept and mock API calls. Useful for testing offline mode, error scenarios, or speeding up tests by mocking slow APIs.
Q10. How to take screenshots in Playwright?
page.screenshot({path:"shot.png"}) for full page. locator.screenshot() for element. Add fullPage: true for complete scrollable page capture.
Q11. What is Playwright Test Runner?
Built-in test framework with test() and expect(). Runs tests in parallel by default. Config in playwright.config.ts. Generates HTML reports automatically.
Q12. What is headless mode?
Browser runs without visible UI — faster, used in CI/CD pipelines. Set headless: true in config. Playwright runs headless by default in CI environments.
📱
Appium — Mobile Automation Testing
12 Questions
Q1. What is Appium?
Open-source framework for mobile app automation. Supports iOS and Android. Tests native, hybrid, and web apps. Uses WebDriver protocol. No app recompilation needed.
Q2. Native vs Hybrid vs Web App?
Native: Built for one platform (Android/iOS), best performance. Hybrid: Web wrapped in native container (Cordova). Web App: Mobile browser app, cross-platform.
Q3. What are Desired Capabilities?
Key-value pairs telling Appium: platformName (Android/iOS), deviceName, app (APK path), automationName (UiAutomator2/XCUITest), appPackage, appActivity.
Q4. UiAutomator2 vs XCUITest?
UiAutomator2 = Android automation engine (Google). XCUITest = iOS automation engine (Apple). Set via automationName capability. Each platform uses its own engine.
Q5. How to find elements in Appium?
By.id (resource-id), By.xpath, By.AccessibilityId (content-desc/accessibility), By.className (android.widget.Button), MobileBy.AndroidUIAutomator.
Q6. How to perform swipe/scroll in Appium?
Use TouchAction: press(x1,y1).waitAction(500).moveTo(x2,y2).release().perform(). Or Appium Actions API: PointerInput with TOUCH source for swipe gestures.
Q7. What is Appium Inspector?
GUI tool to inspect mobile app elements — shows element hierarchy, attributes, XPath. Like browser DevTools for mobile apps. Used to find reliable locators.
Q8. Real Device vs Emulator vs Simulator?
Real Device: Actual phone, most accurate. Emulator: Android virtual device (AVD). Simulator: iOS virtual device (Xcode). Real device = best results for production testing.
Q9. How to handle keyboard in Appium?
element.sendKeys("text") to type. driver.hideKeyboard() to dismiss. driver.isKeyboardShown() to check visibility. Use Keys.ENTER for submit action.
Q10. What is Appium Server?
Node.js server that receives WebDriver commands from test script and translates them to platform-specific commands (UIAutomator2 for Android, XCUITest for iOS).
Q11. How to run tests on BrowserStack/Sauce Labs?
Use cloud capabilities: browserstack.user, browserstack.key, device name, OS version. Connect to remote URL. Run tests on real cloud devices without own device lab.
Q12. What is appPackage and appActivity?
appPackage: Android app's package name (e.g. com.example.app). appActivity: Screen to launch first (e.g. .MainActivity). Found using adb shell dumpsys command.
📮
Postman
10 Questions
Q1. What is Postman?
API testing tool for sending HTTP requests, viewing responses, writing test scripts, managing collections and environments. Used for manual and automated API testing.
Q2. What are Postman Collections?
Organized folders containing related API requests. Can be exported as JSON, shared with team, and run automatically via Collection Runner or Newman CLI.
Q3. What are Postman Environments?
Sets of key-value variables for different setups (Dev/QA/Prod). Access with {{variable}}. Switch environments with one click to test same collection in different setups.
Q4. How to write tests in Postman?
In Tests tab using JavaScript: pm.test("name", ()=> pm.expect(pm.response.code).to.equal(200)). Can assert status, body values, response time, headers.
Q5. How to chain API requests in Postman?
In Tests tab: const json = pm.response.json(), then pm.environment.set("token", json.token). Next request uses {{token}} in header/URL automatically.
Q6. What is Newman?
CLI tool to run Postman collections from command line / CI/CD pipeline. Install: npm install -g newman. Run: newman run collection.json -e env.json. Generates reports.
Q7. What are Pre-request Scripts?
Scripts that run BEFORE the request. Used to: set variables, generate dynamic data (timestamps, random emails), set auth tokens before requests.
Q8. How to handle authentication in Postman?
Auth tab → Select type: Bearer Token ({{token}}), Basic Auth (user+pass), API Key (header/query). Set at collection level to apply to all requests.
Q9. What is form-data vs raw in Postman body?
form-data: For file uploads and form fields. raw JSON: For sending JSON body (most REST APIs). x-www-form-urlencoded: URL-encoded key-value pairs.
Q10. How to run a collection automatically?
Use Collection Runner inside Postman (GUI), OR use Newman from command line for CI/CD integration. Both run all requests in sequence with test reports.
⚡
Performance Testing — JMeter
10 Questions
Q1. What is Performance Testing?
Testing speed, responsiveness, stability and scalability under various load conditions. Types: Load, Stress, Spike, Endurance, Volume, Scalability testing.
Q2. What is JMeter?
Open-source Apache tool for performance and load testing. Tests web apps, REST APIs, databases. Simulates thousands of virtual users simultaneously. GUI and CLI modes.
Q3. Load vs Stress vs Spike Testing?
Load: Test under expected normal load. Stress: Test beyond capacity to find breaking point. Spike: Sudden large increase in users. Endurance: Long duration testing.
Q4. What is Thread Group in JMeter?
Core element defining virtual users: Number of Threads (users), Ramp-up period (seconds to start all users), Loop count (how many times). Base of every JMeter test plan.
Q5. What are JMeter Listeners?
Components that display/analyze test results: View Results Tree (debug), Summary Report (overview), Aggregate Report (stats), Response Time Graph, Throughput Graph.
Q6. What is Throughput in JMeter?
Number of requests processed per second. Higher = better. Shows how many users/requests server can handle. Key metric alongside response time and error rate.
Q7. What is Ramp-up period?
Time to gradually start all virtual users. 100 users, 50s ramp-up = 2 users/second. Prevents server shock. Simulates realistic user arrival pattern.
Q8. What are JMeter Assertions?
Response Assertion: Check response text/code. Duration Assertion: Response under X ms. JSON Assertion: Validate JSON path value. Size Assertion: Check response size.
Q9. What is Correlation in JMeter?
Extracting dynamic values (session tokens, IDs) from one response to use in next request. Use Regular Expression Extractor or JSON Extractor to capture values.
Q10. What is Think Time in JMeter?
Delay between user actions to simulate real human behavior. Add using Timer elements (Constant Timer, Gaussian Random Timer). Without it, test is unrealistically aggressive.
🗄️
SQL for Testers
8 Questions
Q1. Why do QA testers need SQL?
To verify data in database after test actions. Validate data is correctly inserted/updated/deleted. Backend validation beyond UI. Query test data setup.
Q2. What are SQL commands (DDL/DML/DCL)?
DDL: CREATE, ALTER, DROP (structure). DML: SELECT, INSERT, UPDATE, DELETE (data). DCL: GRANT, REVOKE (permissions). TCL: COMMIT, ROLLBACK (transactions).
Q3. What is SELECT query? Common clauses?
SELECT columns FROM table WHERE condition GROUP BY col HAVING filter ORDER BY col LIMIT n. Most important query for QA data validation.
Q4. Types of SQL JOINs?
INNER JOIN: Only matching rows. LEFT JOIN: All from left + matches. RIGHT JOIN: All from right + matches. FULL JOIN: All from both tables.
Q5. What is WHERE vs HAVING?
WHERE: Filters rows BEFORE grouping. HAVING: Filters groups AFTER GROUP BY. WHERE can't use aggregate functions (COUNT, SUM), HAVING can.
Q6. What SQL queries does QA use most?
SELECT to read data, COUNT(*) to verify records, WHERE id=? to check specific record, ORDER BY created_at DESC to get latest, UPDATE to set test data.
Q7. What is Primary Key vs Foreign Key?
Primary Key: Unique identifier for each row, NOT NULL. Foreign Key: References primary key of another table. Maintains referential integrity between tables.
Q8. What is NULL in SQL?
NULL = missing/unknown value. Can't compare with = or !=. Use IS NULL or IS NOT NULL. NULL + anything = NULL. COUNT(*) counts NULLs, COUNT(col) does not.
🔄
Agile / Scrum
8 Questions
Q1. What is Agile methodology?
Iterative software development using short sprints (2-4 weeks). Delivers working software each sprint. Welcomes changing requirements. Values collaboration over documentation.
Q2. What is Scrum?
Agile framework with defined roles (Scrum Master, Product Owner, Dev Team), ceremonies (Planning, Daily Standup, Review, Retrospective), and artifacts (Backlog, Sprint Backlog).
Q3. What is a User Story?
"As a [user], I want [feature] so that [benefit]." Requirements from user's perspective. Has Acceptance Criteria defining when it's "done". Estimated in story points.
Q4. What is Sprint Planning vs Sprint Review?
Sprint Planning: Team selects stories from backlog, estimates effort. Sprint Review: Demo of completed work to stakeholders. Sprint Retro: What to improve next sprint.
Q5. What is Definition of Done (DoD)?
Team agreement on what "complete" means: Code written + Code reviewed + Unit tested + QA tested + Deployed to staging + No open critical bugs.
Q6. What is QA's role in Agile?
QA participates from day 1: review user stories, write test cases during sprint, execute tests same sprint, report bugs in JIRA, retest fixes, attend all ceremonies.
Q7. Waterfall vs Agile?
Waterfall: Sequential, testing at end, rigid. Agile: Iterative, testing each sprint, flexible. Agile finds bugs early; Waterfall finds bugs late (costly to fix).
Q8. What is Kanban?
Agile framework using visual Kanban board with columns: To Do → In Progress → Testing → Done. No fixed sprints. Continuous flow. Work-in-progress limits.
🚀
CI/CD · Git · DevOps for QA
8 Questions
Q1. What is CI/CD?
CI (Continuous Integration): Auto-build + auto-test on every code commit. CD (Continuous Delivery/Deployment): Auto-deploy to environment after tests pass. Tools: Jenkins, GitHub Actions, GitLab CI.
Q2. What is Jenkins?
Open-source automation server for CI/CD. Creates pipelines that auto-run Selenium/Playwright tests on each code push. Sends email alerts on test failures.
Q3. Basic Git commands for QA?
git clone (get repo), git pull (get latest), git add/commit/push (save & upload changes), git branch (list branches), git checkout (switch branch).
Q4. What is Docker in testing?
Containers for consistent test environments. "Works on my machine" problem solved. Run Selenium Grid in Docker containers. Same environment across Dev, QA, and CI/CD.
Q5. What is Selenium Grid?
Runs Selenium tests on multiple machines/browsers in parallel. Hub distributes tests to Nodes. Reduces total execution time drastically. Supports cross-browser testing.
Q6. What is TestNG? Key annotations?
Java testing framework. Annotations: @Test, @BeforeMethod/@AfterMethod, @BeforeClass/@AfterClass, @BeforeSuite/@AfterSuite, @DataProvider, @Parameters.
Q7. What is Maven?
Build and dependency management tool. pom.xml lists all dependencies (Selenium, TestNG, etc.). Maven downloads them automatically. Also runs tests with mvn test command.
Q8. What is Allure / Extent Report?
Test reporting tools. Generate beautiful HTML reports with screenshots, pass/fail stats, execution timeline. Allure: open-source, powerful. ExtentReports: popular for Selenium projects.