CS Fundamentals

Software Testing interview questions

Software testing interviews probe your ability to design test cases, choose testing strategies, and ensure software quality through systematic verification and validation.

18 questions (6 easy · 6 medium · 6 hard), each with what a strong answer covers and where people lose the point. Free to read, no account.

On this page (18 questions)

1.What is the difference between verification and validation in software testing?

Warm-up

What a strong answer covers

  • Define verification as checking if the software meets specifications (are we building the product right?).
  • Define validation as checking if the software meets user needs (are we building the right product?).
  • Provide an example: verifying that a login form accepts valid email formats vs. validating that users can actually log in.
  • Mention that both are essential and occur throughout the lifecycle.

Where people lose the point

  • Using the terms interchangeably or confusing them.
  • Claiming verification is only for developers and validation only for testers.
  • Omitting the role of user acceptance testing in validation.
Link to this question

2.Explain equivalence partitioning and boundary value analysis with an example.

Warm-up

What a strong answer covers

  • Define equivalence partitioning as dividing input data into partitions where the system behaves similarly; testing one value from each partition.
  • Define boundary value analysis as testing values at the edges of partitions (min, max, just inside, just outside).
  • Example: a field accepts ages 18-65. Partitions: invalid low (<18), valid (18-65), invalid high (>65). Boundary tests: 17, 18, 65, 66.
  • Explain that these techniques reduce test cases while maintaining coverage.

Where people lose the point

  • Testing only one boundary value instead of both lower and upper.
  • Confusing equivalence partitioning with random testing.
  • Forgetting to include invalid partitions.
Link to this question

3.What is the difference between unit testing and integration testing?

Warm-up

What a strong answer covers

  • Unit testing focuses on individual components (functions, methods) in isolation, often using mocks.
  • Integration testing verifies interactions between components (e.g., database, API, modules).
  • Unit tests are fast, run frequently, and catch logic errors early; integration tests are slower and catch interface mismatches.
  • Both are part of the test pyramid: many unit tests, fewer integration tests, even fewer end-to-end tests.

Where people lose the point

  • Claiming unit tests replace integration tests.
  • Writing integration tests that are too broad (e.g., full system tests).
  • Not using mocks in unit tests, making them dependent on external systems.
Link to this question

4.Describe the test pyramid and its importance in test automation strategy.

Core

What a strong answer covers

  • The test pyramid has three layers: unit tests (base), integration tests (middle), end-to-end tests (top).
  • Unit tests are numerous, fast, and cheap; integration tests fewer and slower; E2E tests fewest and slowest.
  • The pyramid guides investment: write more low-level tests for quick feedback, fewer high-level tests for critical paths.
  • An inverted pyramid (too many E2E tests) leads to slow, brittle suites.

Where people lose the point

  • Thinking the pyramid is a strict ratio rather than a guideline.
  • Ignoring the middle layer (integration tests) entirely.
  • Writing E2E tests for every scenario, making the suite slow and flaky.
Link to this question

5.What is the difference between a mock and a stub? When would you use each?

Core

What a strong answer covers

  • A stub provides predefined responses to method calls; it is used to control indirect inputs.
  • A mock is pre-programmed with expectations about which calls will be made and can verify interactions (e.g., assert that a method was called with specific arguments).
  • Use stubs when you only need to provide data; use mocks when you need to verify behavior.
  • Example: stub a database call to return a user object; mock a payment service to verify that charge() is called once.

Where people lose the point

  • Using the terms interchangeably.
  • Over-mocking: mocking everything leads to brittle tests.
  • Using mocks when a stub would suffice, adding unnecessary complexity.
Link to this question

6.Compare Test-Driven Development (TDD) and Behavior-Driven Development (BDD).

Core

What a strong answer covers

  • TDD: write a failing unit test, then write code to pass it, then refactor. Focuses on developer-level correctness.
  • BDD: write scenarios in natural language (Given-When-Then) that describe system behavior from user perspective. Focuses on business requirements.
  • TDD uses unit tests; BDD uses acceptance tests that can be automated.
  • Both promote test-first thinking, but BDD emphasizes collaboration between developers, testers, and business stakeholders.

Where people lose the point

  • Claiming BDD replaces TDD (they complement each other).
  • Writing BDD scenarios that are too technical (e.g., 'Given the database has a user').
  • Not automating BDD scenarios, losing the benefit of living documentation.
Link to this question

7.What is code coverage? Explain statement, branch, and path coverage.

Core

What a strong answer covers

  • Code coverage measures the percentage of code executed by tests.
  • Statement coverage: percentage of executable statements executed.
  • Branch coverage: percentage of decision outcomes (e.g., if-else branches) executed.
  • Path coverage: percentage of all possible paths through the code executed (often impractical).
  • High coverage does not guarantee test quality; it's a metric, not a goal.

Where people lose the point

  • Assuming 100% statement coverage means no bugs.
  • Confusing branch coverage with path coverage.
  • Chasing coverage numbers without meaningful assertions.
Link to this question

8.What is the difference between load testing and stress testing?

Core

What a strong answer covers

  • Load testing simulates expected user load to measure performance (response time, throughput).
  • Stress testing pushes beyond expected load to find the system's breaking point and how it fails.
  • Load testing answers 'can the system handle normal traffic?'; stress testing answers 'what happens under extreme traffic?'
  • Both are types of performance testing and use similar tools (JMeter, Gatling).

Where people lose the point

  • Using the terms interchangeably.
  • Only doing load testing and ignoring stress testing, missing failure modes.
  • Not monitoring system resources (CPU, memory) during tests.
Link to this question

9.How would you test for SQL injection vulnerabilities?

Hard

What a strong answer covers

  • Identify input fields that interact with the database (search, login, forms).
  • Inject malicious SQL payloads like ' OR '1'='1, '; DROP TABLE users; --, and UNION SELECT statements.
  • Observe error messages, unexpected data, or successful login without credentials.
  • Use automated tools like SQLMap or OWASP ZAP for comprehensive scanning.
  • Verify that the application uses parameterized queries or prepared statements to prevent injection.

Where people lose the point

  • Only testing with simple payloads and missing advanced techniques.
  • Assuming that escaping input is sufficient (parameterization is better).
  • Not testing all input vectors (URL parameters, headers, cookies).
Link to this question

10.Explain the concept of continuous testing in a CI/CD pipeline.

Hard

What a strong answer covers

  • Continuous testing means running automated tests at every stage of the pipeline (commit, build, deploy).
  • Unit tests run on every commit; integration and acceptance tests run on merge; performance and security tests run on staging.
  • Tests must be reliable, fast, and provide quick feedback to developers.
  • Failed tests block the pipeline, preventing defective code from reaching production.
  • Requires test automation, infrastructure as code, and monitoring.

Where people lose the point

  • Running all tests on every commit, causing long feedback loops.
  • Ignoring flaky tests, which erode trust in the pipeline.
  • Not including non-functional tests (performance, security) in the pipeline.
Link to this question

11.What is exploratory testing and when is it most effective?

Hard

What a strong answer covers

  • Exploratory testing is simultaneous learning, test design, and execution without predefined scripts.
  • Testers explore the application, using heuristics and domain knowledge to find unexpected bugs.
  • Most effective when: requirements are vague, time is limited, or testing complex scenarios that are hard to script.
  • Often used in agile sprints to complement automated tests.
  • Requires skilled testers who can think critically and adapt.

Where people lose the point

  • Confusing exploratory testing with ad-hoc testing (exploratory is structured with charters).
  • Thinking exploratory testing replaces automated testing.
  • Not documenting findings or session notes.
Link to this question

12.How do you prioritize which test cases to automate?

Hard

What a strong answer covers

  • Prioritize tests that are run frequently (regression, smoke tests) and provide high value.
  • Automate tests that are time-consuming or error-prone when done manually.
  • Consider business criticality: core functionality, high-risk areas, and features with frequent changes.
  • Avoid automating tests that are unstable, require human judgment (e.g., visual layout), or are run rarely.
  • Use a cost-benefit analysis: automation effort vs. manual execution time saved.

Where people lose the point

  • Automating everything without considering maintenance cost.
  • Automating tests that are not stable, leading to flaky results.
  • Ignoring manual exploratory testing in favor of full automation.
Link to this question

13.Give an example of boundary value analysis for a numeric input field that accepts values from 1 to 100 inclusive.

Warm-up

What a strong answer covers

  • Identify boundaries: 1 and 100 (inclusive), and just outside: 0 and 101.
  • Test values: 0 (invalid low), 1 (valid min), 2 (just above min), 99 (just below max), 100 (valid max), 101 (invalid high).
  • Also test typical values like 50 to ensure normal operation.
  • Explain that this catches off-by-one errors common in programming.

Where people lose the point

  • Only testing 1 and 100, missing the boundaries just outside.
  • Testing only one boundary (e.g., only lower).
  • Not testing a value inside the range to confirm normal behavior.
Link to this question

14.What is regression testing and why is it important?

Warm-up

What a strong answer covers

  • Regression testing re-runs existing tests after code changes to ensure new code hasn't broken existing functionality.
  • It is critical for maintaining software quality during iterative development.
  • Automated regression suites are essential for continuous integration.
  • Selective regression (risk-based) can be used when full regression is too costly.

Where people lose the point

  • Thinking regression testing is only done before release.
  • Not updating regression tests when requirements change.
  • Running full regression manually, which is time-consuming and error-prone.
Link to this question

15.Compare black-box and white-box testing. When would you use each?

Core

What a strong answer covers

  • Black-box testing focuses on inputs and outputs without knowledge of internal code; uses techniques like equivalence partitioning, boundary value analysis, decision tables.
  • White-box testing uses knowledge of internal structure to design tests; techniques include statement, branch, and path coverage.
  • Black-box is used for functional testing from user perspective; white-box is used for unit and integration testing to ensure code paths are exercised.
  • Both are complementary; a comprehensive test strategy uses both.

Where people lose the point

  • Claiming one is better than the other.
  • Using black-box techniques for unit tests (they are white-box by nature).
  • Not considering gray-box testing (partial knowledge).
Link to this question

16.Describe the components of a well-written test case.

Warm-up

What a strong answer covers

  • Test case ID, title, description, preconditions, test steps, expected results, actual results, and status.
  • Preconditions define the state before execution (e.g., user logged in, database populated).
  • Steps are clear, sequential, and unambiguous.
  • Expected results are specific and verifiable (e.g., 'User sees error message: Invalid password').
  • Test cases should be independent and reusable.

Where people lose the point

  • Writing vague expected results like 'System works correctly'.
  • Including steps that depend on previous test case outcomes.
  • Omitting preconditions, leading to inconsistent execution.
Link to this question

17.What is penetration testing and how does it differ from vulnerability scanning?

Hard

What a strong answer covers

  • Penetration testing (pen testing) is a simulated cyberattack to identify exploitable vulnerabilities; it involves manual techniques and creative thinking.
  • Vulnerability scanning uses automated tools to identify known vulnerabilities (e.g., outdated libraries, misconfigurations).
  • Pen testing goes deeper: it attempts to chain vulnerabilities to achieve a goal (e.g., data exfiltration).
  • Both are complementary: scanning finds low-hanging fruit; pen testing finds complex attack paths.

Where people lose the point

  • Using the terms interchangeably.
  • Assuming a vulnerability scan is sufficient for security assessment.
  • Not defining the scope and rules of engagement for pen testing.
Link to this question

18.How do you test an AI/ML model? What unique challenges exist?

Hard

What a strong answer covers

  • Testing ML models involves data validation, model evaluation (accuracy, precision, recall, F1), and bias detection.
  • Challenges: non-deterministic outputs, data drift, lack of oracles for expected behavior, and interpretability.
  • Use techniques like A/B testing, shadow deployment, and continuous monitoring in production.
  • Test data quality: missing values, outliers, label correctness.
  • Model robustness: adversarial testing, edge cases.

Where people lose the point

  • Testing ML models like traditional software (asserting exact outputs).
  • Ignoring data quality issues.
  • Not monitoring for concept drift after deployment.
Link to this question
No account needed

Answer one real Software Testing question now

A question a Software Testing panel actually asks, answered out loud, scored on what you said and how you said it. Under two minutes, and nothing to sign up for.

What is the difference between verification and validation in software testing?

We never store the audio. Your answer is deleted within 24 hours unless you save the result.

How Software Testing answers get judged

The weights a Software Testing interviewer is holding, whether or not they say so out loud. Round Zero scores your practice answers against exactly these, and quotes your own words back as the evidence for each.

Correctness

30%

Accuracy of technical concepts, definitions, and examples. No factual errors.

Conceptual Depth

25%

Demonstrates understanding beyond surface level; explains trade-offs, edge cases, and underlying principles.

Practical Application

20%

Provides concrete examples, real-world scenarios, and demonstrates how to apply concepts in practice.

Communication

15%

Clear, structured, and concise explanation. Uses appropriate terminology. Easy to follow.

Critical Thinking

10%

Identifies limitations, compares alternatives, and shows awareness of when and why to use different approaches.

Role tracks that include Software Testing

Related CS Fundamentals skills

All skills →

Now say them out loud

You have read what strong Software Testing answers contain. The next thing that moves the needle is producing one under time, out loud, and finding out where it falls apart.

  • These questions asked back, with follow-ups
  • Flashcards for the ones you keep missing
  • A scored mock that quotes your own answers

Browse every skill

Practising Software Testing: common questions

What Software Testing interview questions should I practice?
Start with the core areas Software Testing interviewers probe: What is the difference between verification and validation in software testing; Explain equivalence partitioning and boundary value analysis with an example.; What is the difference between unit testing and integration testing. This page outlines strong answers and common mistakes, and the scored path drills each one with follow-ups.
Is the Software Testing practice free?
Yes. The Software Testing path runs free inside Round Zero: lessons, practice questions and flashcards. Drills are unlimited on every plan, free included. So is the full scorecard. Free also covers 3 complete scored interviews, no card.
How is this different from a Software Testing question list?
A static list gives you questions with no feedback. Round Zero runs a live scored practice that probes your actual answers, rotates difficulty, and tells you exactly what to fix, grounded in a Software Testing rubric.
How should I prepare for a Software Testing interview?
Learn the concepts, drill the questions until answers come fast, then prove it in a scored mock. Round Zero sequences all three so you know you are ready, not just that you read about Software Testing.
How is a Software Testing answer scored?
Software Testing answers are scored on correctness, conceptual depth, practical application, communication, critical thinking, with evidence quoted from what you actually said, so feedback is specific instead of generic praise.