FREE InfoparkDaily Learning · Fresher to experienced
Software testing (QA)
30 important interview questions.
Prepare for software testing (qa) interviews with 30 important questions and answers on testing fundamentals, test design, defects, test types, Agile, Selenium automation, API testing and test strategy. The answers are short and interview-friendly, so freshers and experienced candidates can understand them and explain them in their own words.
- 30questions
- 5topics
- 9practical tasks
- Testing fundamentals
- Test design and documentation
- Defects and test types
- Agile and QA process
- Automation and API testing
- Practical tasks
Part 1 · Questions 1–6
Testing fundamentals
1 What is software testing and why is it important?
Answer
Software testing checks whether an application works as expected and finds defects before users do. It reduces the risk of failures, protects the company's reputation and saves money — bugs found late, in production, cost far more to fix than bugs found early.
2 What is the difference between verification and validation?
Answer
- Verification: "Are we building the product right?" Reviews of requirements, designs and code against specifications, often without running the software.
- Validation: "Are we building the right product?" Running the software to confirm it meets the user's actual needs.
3 What is the difference between SDLC and STLC?
Answer
SDLC (Software Development Life Cycle) covers the whole process of building software: requirements, design, development, testing, deployment and maintenance. STLC (Software Testing Life Cycle) is the testing part: requirement analysis, test planning, test case design, environment setup, test execution and test closure.
4 What is the difference between an error, a defect and a failure?
Answer
- Error (mistake): a human mistake, such as a developer misreading a requirement.
- Defect (bug): the flaw that mistake creates in the code.
- Failure: what the user sees when the defective code runs and the system behaves wrongly.
5 What is the difference between black-box, white-box and grey-box testing?
Answer
- Black-box: test inputs and outputs without looking at the code.
- White-box: test with knowledge of the internal code — paths, branches, conditions.
- Grey-box: partial knowledge, such as knowing the database structure while testing through the UI.
6 Explain the seven principles of testing.
Answer
- Testing shows that defects are present, not that there are none.
- Exhaustive testing is impossible — prioritise by risk.
- Test early; defects are cheaper to fix early.
- Defects cluster in a few modules.
- Repeating the same tests stops finding new bugs (the pesticide paradox), so update tests.
- Testing depends on context — a banking app isn't tested like a game.
- A bug-free system that doesn't meet user needs is still a failure.
Part 2 · Questions 7–11
Test design and documentation
7 What is a test case, and what does a good one contain?
Answer
A test case is a set of steps to check one behaviour. A good one has an ID, title, preconditions, test data, clear steps, the expected result, the actual result and a status. Anyone should be able to run it and get the same outcome.
8 What is the difference between a test plan and a test strategy?
Answer
- Test strategy: high-level and often organisation-wide — the overall approach, test levels, tools and standards.
- Test plan: project-specific — scope, schedule, resources, environments, entry and exit criteria, risks and deliverables.
9 What are equivalence partitioning and boundary value analysis?
Answer
Both reduce the number of test cases while keeping good coverage. For an age field that accepts 18 to 60:
- Equivalence partitioning: pick one value from each group — below 18 (invalid), 18–60 (valid), above 60 (invalid).
- Boundary value analysis: test at and around the edges, where bugs are most common — 17, 18, 19 and 59, 60, 61.
10 What is a traceability matrix (RTM)?
Answer
A table that maps each requirement to the test cases that cover it, and then to their results and defects. It shows that every requirement is tested and helps judge the impact when a requirement changes.
11 What are positive and negative testing?
Answer
- Positive testing: valid inputs, checking the system does what it should — a correct login works.
- Negative testing: invalid or unexpected inputs, checking the system handles them safely — a wrong password shows an error and doesn't crash.
Part 3 · Questions 12–18
Defects and test types
12 Explain the defect life cycle.
Answer
New → Assigned → Open → Fixed → Retest → Closed. Along the way a defect can also be Rejected (not a bug), Deferred (fix later), marked Duplicate, or Reopened if the retest fails.
13 What is the difference between severity and priority?
Answer
- Severity: how badly the defect affects the system (technical impact).
- Priority: how soon it should be fixed (business urgency).
Example: a spelling mistake in the company name on the home page is low severity but high priority. A crash in a rarely used report is high severity but may be lower priority.
14 What makes a good bug report?
Answer
A clear title, environment (build, browser, device), steps to reproduce, expected result, actual result, severity, and evidence such as screenshots, videos or logs. The developer should be able to reproduce it without asking you questions.
15 What is the difference between smoke and sanity testing?
Answer
- Smoke testing: a quick, broad check of a new build's critical features to decide if it's stable enough for detailed testing.
- Sanity testing: a quick, narrow check that a specific fix or change works, before deeper regression testing.
16 What is the difference between regression testing and retesting?
Answer
- Retesting: run the failed test again to confirm a specific defect is fixed.
- Regression testing: run a wider set of tests to make sure the change didn't break anything that used to work.
Regression suites are the first candidates for automation.
17 What is the difference between functional and non-functional testing?
Answer
- Functional: does the feature do what it should? Login, search, payment flow.
- Non-functional: how well does it work? Performance, load, security, usability, compatibility.
18 What is UAT?
Answer
User Acceptance Testing is done by end users or the client, usually in the final stage, to confirm the software meets business needs in real-world scenarios. Alpha testing happens at the developer's site; beta testing is done by real users in their own environment.
Part 4 · Questions 19–21
Agile and QA process
19 What is the role of a tester in an Agile team?
Answer
Testers join from the start of each sprint: they clarify user stories and acceptance criteria, design tests while development happens, test stories as soon as they're ready, automate regression, and take part in stand-ups, sprint planning and retrospectives. Quality is the whole team's responsibility.
20 What is exploratory testing?
Answer
Testing without pre-written scripts, where the tester learns the application, designs tests and runs them at the same time, guided by experience. It's good at finding unexpected bugs. Time-boxed sessions with a goal (a "charter") keep it focused.
21 What are entry and exit criteria?
Answer
- Entry criteria: conditions to start testing — requirements signed off, build deployed, test environment and data ready.
- Exit criteria: conditions to stop — planned tests executed, no open critical defects, coverage targets met.
Part 5 · Questions 22–30
Automation and API testing
22 When should you automate a test, and when shouldn't you?
Answer
Automate tests that are repeated often (regression, smoke), stable, data-driven or tedious to do by hand. Don't automate one-time tests, features that change constantly, or checks that need human judgement such as usability and visual design.
23 What is Selenium WebDriver?
Answer
Selenium WebDriver is an open-source tool that controls real browsers (Chrome, Firefox, Edge) through code, so you can automate web UI tests. It supports Java, Python, C#, JavaScript and more, and is usually combined with a test framework such as TestNG, JUnit or pytest.
24 What locators does Selenium support, and which is best?
Answer
ID, name, class name, tag name, link text, partial link text, CSS selector and XPath. Prefer a unique, stable ID, then CSS selectors. Use XPath when you need to find elements by text or move up the DOM. Avoid long absolute XPaths, which break when the page changes.
25 What is the difference between implicit, explicit and fluent waits?
Answer
- Implicit wait: a global timeout for finding any element.
- Explicit wait: waits for a specific condition on a specific element, such as "clickable" — the most reliable choice.
- Fluent wait: an explicit wait with a custom polling interval and exceptions to ignore.
Avoid fixed Thread.sleep() calls; they make tests slow and flaky.
26 What is the Page Object Model?
Answer
A design pattern where each page of the app has a class holding its locators and actions (such as login(user, pass)). Tests call those methods instead of using locators directly. When the UI changes, you update one page class instead of every test.
27 How do you test a REST API?
Answer
Send requests with Postman or code (REST Assured, pytest with requests) and check:
- Status codes (200, 201, 400, 401, 404, 500)
- Response body and its schema
- Headers and response time
- Authentication and authorisation
- Error handling for invalid and missing input
// REST Assured (Java)
given().header("Authorization", "Bearer " + token)
.when().get("/api/users/1")
.then().statusCode(200).body("name", equalTo("Anu"));28 How do you handle flaky automated tests?
Answer
Find the cause instead of just re-running: usually timing (use explicit waits), shared or changing test data (make each test create its own data), test order dependency, or an unstable environment. Quarantine a flaky test until it's fixed so it doesn't hide real failures.
29 How does test automation fit into CI/CD?
Answer
Automated tests run on every commit or pull request in a pipeline (Jenkins, GitHub Actions, GitLab CI). Fast unit and API tests run first; slower UI tests run later or nightly. A failing test stops the pipeline, so broken code doesn't reach production.
30 What is the test pyramid?
Answer
Many fast unit tests at the bottom, fewer API and integration tests in the middle, and a small number of slow UI end-to-end tests at the top. This gives fast feedback and stable suites. An "ice-cream cone" — mostly UI tests — is slow and fragile.
Beyond the 30 questions
Practical interview tasks
Interviewers also ask you to write code and talk through your work. Practise these too.
| Area | Practise this |
|---|---|
| Test design | Write test cases for a login page (positive and negative) |
| Test design | Apply boundary values to a field that accepts 1–100 |
| Bug report | Write a bug report for a broken checkout button |
| Scenarios | List test scenarios for an ATM withdrawal or a lift |
| Selenium | Automate login and verify the dashboard title |
| Selenium | Handle a dropdown, an alert and a new tab |
| API | Test a GET and a POST endpoint in Postman with assertions |
| SQL | Verify data saved by the UI using a SELECT query |
| Framework | Explain your framework: POM, test data, reports, CI |
Want hands-on practice? Follow the software testing (qa) learning path, try the InfoparkDaily Learning tutorials and quizzes, or browse the full interview question bank. Ready to apply? See the latest IT jobs.
More interview guides
- Web development (70)
- Java backend (30)
- Python development (30)
- SQL & databases (30)
- Data analyst (30)
- DevOps & cloud (30)
Original content by InfoparkDaily Learning. Answers are guidance — explain them in your own words and add examples from your projects.