🧪

Software Testing & QA MCQ

Test your Software Testing and Quality Assurance knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.

100 Questions 40 Beginner 40 Intermediate 20 Advanced

How This Practice Test Works

Every question below expands right on this page — click a question to reveal its four options, pick the one you think is correct, and you'll get instant feedback along with the correct answer and a short explanation of the reasoning. Questions are grouped by difficulty, so start with the 40 beginner questions to confirm your fundamentals, work through the 40 intermediate ones, and finish with the 20 advanced questions that mirror what exams and technical screenings actually ask. There's no sign-up, no timer, and no limit — retake the test as often as you like.

Curated by Tech Baithak Editorial Team  ·  Last updated: June 2026

1

What is the primary goal of software testing?

B

Correct Answer

To find defects and verify that the software meets requirements and behaves as expected

Explanation

Testing aims to find defects and build confidence that the software works correctly, not to guarantee a complete absence of bugs.

2

What is a "test case"?

A

Correct Answer

A set of conditions, inputs, and expected results used to verify a particular feature or behavior

Explanation

A test case describes the steps, inputs, and expected outcomes needed to check whether a specific functionality works correctly.

3

What is the difference between "verification" and "validation"?

B

Correct Answer

Verification checks if the product is built correctly (per specs); validation checks if the right product was built (meets user needs)

Explanation

Verification asks "are we building it right?" (conformance to specs), while validation asks "are we building the right thing?" (meets actual needs).

4

What is "unit testing"?

B

Correct Answer

Testing individual components or functions in isolation from the rest of the system

Explanation

Unit tests verify the smallest testable parts of code (functions, methods, classes) independently, usually with dependencies mocked or stubbed out.

5

What is "integration testing"?

A

Correct Answer

Testing how multiple modules or components work together when combined

Explanation

Integration tests check that combined modules interact correctly, catching issues that arise only when components work together.

6

What is "system testing"?

B

Correct Answer

Testing the complete, integrated system to verify it meets specified requirements

Explanation

System testing evaluates the fully integrated application as a whole against the overall functional and non-functional requirements.

7

What is "acceptance testing"?

A

Correct Answer

Testing performed to determine whether the system satisfies acceptance criteria and is ready for delivery to the customer or user

Explanation

Acceptance testing (often UAT — User Acceptance Testing) confirms the software meets business requirements and is acceptable for release.

8

What is "regression testing"?

B

Correct Answer

Re-running existing tests to ensure that recent code changes have not broken previously working functionality

Explanation

Regression testing guards against new changes unintentionally breaking previously functioning features.

9

What is "smoke testing"?

B

Correct Answer

A quick, shallow test to check that the most critical functions of an application work, often run after a new build

Explanation

Smoke testing ("build verification testing") quickly confirms the core functionality works before investing time in deeper testing.

10

What is "black-box testing"?

B

Correct Answer

Testing the functionality of an application without knowledge of its internal code structure

Explanation

Black-box testing focuses on inputs and outputs, evaluating behavior against requirements without examining the internal implementation.

11

What is "white-box testing"?

B

Correct Answer

Testing that examines the internal structure, code, and logic of the application

Explanation

White-box testing (also called clear-box or structural testing) requires knowledge of the code's internals, such as branches and paths, to design test cases.

12

What is "manual testing"?

A

Correct Answer

Testing performed by a human tester executing test cases without automation tools

Explanation

Manual testing relies on a person performing test steps and observing results, useful for exploratory or usability-focused testing.

13

What is "automated testing"?

A

Correct Answer

Testing where scripts or tools execute test cases and compare actual results to expected results without manual effort

Explanation

Automated testing uses code or tools to run tests repeatedly and consistently, ideal for regression suites and frequent execution.

14

What is a "test plan"?

A

Correct Answer

A document outlining the scope, approach, resources, and schedule of testing activities

Explanation

A test plan defines what will be tested, how, by whom, with what resources, and on what timeline.

15

What is a "bug" (or "defect")?

B

Correct Answer

A flaw or error in the software that causes it to behave incorrectly or produce unexpected results

Explanation

A defect is a deviation between the expected and actual behavior of the software, often caused by a coding mistake.

16

What is the purpose of "test data"?

B

Correct Answer

To provide the specific input values used to execute a test case and verify the resulting output

Explanation

Test data is the input fed into a test case; well-chosen test data exercises both normal and edge-case scenarios.

17

What does "test coverage" measure?

B

Correct Answer

The extent to which the source code or requirements have been exercised by a test suite

Explanation

Coverage metrics (e.g. line, branch, or requirement coverage) indicate how much of the code or requirements are exercised by tests.

18

What is "exploratory testing"?

B

Correct Answer

An informal testing approach where the tester simultaneously designs and executes tests, learning the application as they go

Explanation

Exploratory testing relies on tester creativity and experience to discover defects without predefined scripts, often complementing scripted testing.

19

What is a "test environment"?

A

Correct Answer

A combination of hardware, software, network configuration, and data set up to execute tests

Explanation

A test environment mirrors (to varying degrees) the production setup so tests run under realistic conditions.

20

What is the "defect life cycle" (or "bug life cycle")?

A

Correct Answer

The stages a defect goes through from being reported to being resolved and closed

Explanation

Common stages include New, Assigned, Open, Fixed, Retest, Verified, and Closed (or Reopened if the fix fails).

21

What is the difference between "severity" and "priority" of a defect?

B

Correct Answer

Severity measures the impact of the defect on the system; priority indicates how urgently it should be fixed

Explanation

A defect can be high severity (crashes the app) but low priority (rarely occurs), or low severity (a typo) but high priority (visible on the homepage).

22

What is "User Acceptance Testing" (UAT)?

B

Correct Answer

Testing performed by end users or clients to confirm the system meets their needs before going live

Explanation

UAT is the final validation step where actual users verify the software supports their real-world tasks and requirements.

23

What is a "test case management tool" used for?

A

Correct Answer

To organize, manage, and track test cases, test execution, and results

Explanation

Tools like TestRail or Zephyr help teams plan, organize, execute, and report on testing activities.

24

What is "boundary value analysis"?

B

Correct Answer

A technique that tests values at the edges of valid input ranges, since errors often occur at boundaries

Explanation

Boundary value analysis tests the minimum, maximum, and just-inside/outside values of a range, since off-by-one errors commonly occur there.

25

What is "equivalence partitioning"?

A

Correct Answer

Dividing input data into groups (partitions) expected to be treated the same way, then testing one representative value from each group

Explanation

Equivalence partitioning reduces the number of test cases needed by grouping inputs that should produce similar results and testing one from each group.

26

What is "static testing"?

A

Correct Answer

Examining code, requirements, or documents without executing the program, e.g. via reviews or static analysis tools

Explanation

Static testing finds issues early through reviews, walkthroughs, and static analysis, without running the code.

27

What is "dynamic testing"?

A

Correct Answer

Testing the software by executing it and observing its behavior with specific inputs

Explanation

Dynamic testing runs the actual software to verify its behavior, as opposed to static testing which reviews artifacts without execution.

28

What is the purpose of a "checklist" in testing?

B

Correct Answer

To provide a quick reference of items or conditions to verify, helping ensure nothing important is missed

Explanation

Checklists are lightweight aids that help testers remember important checks, especially for repetitive or common scenarios.

29

What is "usability testing"?

A

Correct Answer

Testing focused on how easy and intuitive the software is for real users to use

Explanation

Usability testing evaluates the user experience, looking at ease of use, learnability, and user satisfaction.

30

What is "compatibility testing"?

A

Correct Answer

Testing whether the application works correctly across different browsers, devices, operating systems, or environments

Explanation

Compatibility testing ensures consistent behavior across various platforms, browsers, screen sizes, and configurations.

31

What is "performance testing" used to evaluate?

B

Correct Answer

How a system behaves in terms of speed, responsiveness, and stability under a given workload

Explanation

Performance testing measures responsiveness, throughput, and stability under expected or peak loads.

32

What is the difference between "load testing" and "stress testing"?

B

Correct Answer

Load testing checks behavior under expected user volumes; stress testing pushes beyond normal capacity to find the breaking point

Explanation

Load testing validates performance at expected/normal loads, while stress testing intentionally overloads the system to observe failure behavior and recovery.

33

What is a "test script"?

B

Correct Answer

A set of instructions, often in code, that automates the execution of a test case

Explanation

Test scripts encode the steps and assertions of a test case so it can be run automatically by a testing tool or framework.

34

What is the "test pyramid" a metaphor for?

A

Correct Answer

A recommended proportion of test types: many fast unit tests at the base, fewer integration tests in the middle, and even fewer end-to-end tests at the top

Explanation

The test pyramid encourages a larger base of fast, cheap unit tests, with progressively fewer slower, more expensive integration and UI/end-to-end tests.

35

What is "ad-hoc testing"?

A

Correct Answer

Testing performed informally and randomly, without following any documented test cases or plan

Explanation

Ad-hoc testing is unstructured and relies on tester intuition to find defects that scripted tests might miss.

36

What is "alpha testing"?

A

Correct Answer

Testing performed by the development team and/or internal staff before releasing the product to external users

Explanation

Alpha testing occurs internally, typically before beta testing, to catch major issues before the product reaches outside users.

37

What is "beta testing"?

A

Correct Answer

Testing conducted by a limited group of external real users in a near-production environment before full release

Explanation

Beta testing gathers feedback from real users in real-world conditions, helping uncover issues not found in internal testing.

38

Why is it important to write a clear "expected result" for each test case?

B

Correct Answer

It defines what "pass" looks like, allowing the tester to objectively determine whether the actual result matches

Explanation

Without a clearly defined expected result, it is impossible to objectively judge whether a test passed or failed.

39

What does "QA" stand for in software development?

B

Correct Answer

Quality Assurance

Explanation

Quality Assurance refers to the processes and activities aimed at ensuring the quality of software throughout development, not just testing at the end.

40

What is the difference between "Quality Assurance" (QA) and "Quality Control" (QC)?

B

Correct Answer

QA is process-oriented and preventive (improving how software is built); QC is product-oriented and focuses on identifying defects in the finished product

Explanation

QA focuses on preventing defects by improving development processes, while QC focuses on detecting defects in deliverables, often through testing.

1

What is "Test-Driven Development" (TDD)?

A

Correct Answer

A practice where automated tests are written before the production code, driving the design through a red-green-refactor cycle

Explanation

TDD follows a cycle of writing a failing test (red), writing minimal code to pass it (green), then improving the code (refactor).

2

What is "Behavior-Driven Development" (BDD)?

A

Correct Answer

A development approach that describes software behavior using natural-language scenarios (e.g. Given/When/Then) understandable by both technical and non-technical stakeholders

Explanation

BDD extends TDD by framing tests as readable behavior specifications (often with tools like Cucumber), bridging communication between business and technical teams.

3

What is a "mock object" used for in unit testing?

A

Correct Answer

To replace a real dependency with a controllable substitute that can simulate behavior and verify interactions

Explanation

Mocks simulate the behavior of real objects (e.g. an API client) and let tests verify that certain interactions occurred, isolating the unit under test.

4

What is the difference between a "mock" and a "stub"?

B

Correct Answer

A stub provides predetermined responses to calls; a mock additionally allows verification that specific interactions occurred

Explanation

Stubs return canned answers without caring how they are called; mocks go further by asserting that expected calls were made with expected arguments.

5

What is "code coverage" and what is a limitation of relying on it too heavily?

A

Correct Answer

It measures how much code is executed by tests, but high coverage does not guarantee that the tests check correct behavior or assert meaningful outcomes

Explanation

Code can be "covered" by a test that executes it without verifying the result is correct, so coverage is a useful but incomplete quality signal.

6

What is "continuous integration" (CI) testing?

A

Correct Answer

Running automated tests every time code is committed/merged, to catch integration issues early

Explanation

CI pipelines automatically build and test code on each change, providing fast feedback and catching integration problems before they accumulate.

7

What is "shift-left testing"?

A

Correct Answer

Moving testing activities earlier in the development lifecycle to catch defects sooner and reduce cost of fixing them

Explanation

Shift-left testing emphasizes early involvement of testing (e.g. during requirements and design), since defects are cheaper to fix earlier.

8

What is "exploratory" vs "scripted" testing best used for?

A

Correct Answer

Exploratory testing is well-suited to discovering unexpected issues through tester insight, while scripted testing ensures consistent, repeatable coverage of known requirements

Explanation

The two approaches complement each other: scripted tests provide repeatable baseline coverage, while exploratory testing uncovers issues scripts may miss.

9

What is a "test fixture"?

A

Correct Answer

A fixed, known state or set of objects established before a test runs, ensuring consistent and repeatable conditions

Explanation

Fixtures (e.g. setup/teardown methods, seeded data) provide a consistent starting point so tests are repeatable and independent of execution order.

10

Why is test independence (tests not depending on each other or on execution order) important?

B

Correct Answer

Independent tests can run in any order or in parallel, and a failure in one test does not cascade into false failures in others

Explanation

Tests that depend on shared state or order can produce flaky results and make it hard to isolate the actual cause of a failure.

11

What is a "flaky test"?

B

Correct Answer

A test that sometimes passes and sometimes fails without any changes to the code being tested, often due to timing, ordering, or environment issues

Explanation

Flaky tests undermine trust in the test suite because failures don't reliably indicate real problems, often caused by race conditions, shared state, or external dependencies.

12

What is "API testing"?

A

Correct Answer

Testing performed directly on application programming interfaces to verify functionality, reliability, performance, and security of endpoints

Explanation

API testing verifies requests and responses (status codes, payloads, headers) at the interface level, often faster and more stable than UI tests.

13

What is "end-to-end (E2E) testing"?

A

Correct Answer

Testing a complete user workflow through the entire application stack, simulating real user scenarios from start to finish

Explanation

E2E tests validate that all integrated parts of a system (UI, backend, database, etc.) work together correctly for realistic user journeys.

14

What is "session-based test management"?

A

Correct Answer

An approach to organizing and tracking exploratory testing using time-boxed sessions with defined charters and debrief notes

Explanation

Session-based testing structures otherwise unstructured exploratory testing into trackable, time-boxed chunks with clear goals and reportable outcomes.

15

What is "risk-based testing"?

A

Correct Answer

Prioritizing testing effort based on the likelihood and impact of potential failures in different areas of the system

Explanation

Risk-based testing focuses limited testing resources on the highest-risk areas, balancing impact and probability of defects.

16

What is "non-functional testing"?

A

Correct Answer

Testing that checks aspects like performance, security, usability, and reliability, rather than specific behaviors or functions

Explanation

Non-functional testing addresses "how well" the system performs (speed, scalability, security) rather than "what" it does.

17

What is "security testing"?

A

Correct Answer

Testing aimed at uncovering vulnerabilities, threats, and risks that could allow unauthorized access or data loss

Explanation

Security testing identifies weaknesses such as injection flaws, broken authentication, or data exposure before attackers can exploit them.

18

What is "pairwise testing" (or "all-pairs testing")?

A

Correct Answer

A combinatorial technique that tests all possible pairs of input parameter values to reduce the total number of test combinations while still catching most defects

Explanation

Pairwise testing dramatically reduces test combinations compared to exhaustive testing while still covering interactions between pairs of parameters, where many defects occur.

19

What is the role of a "test oracle"?

A

Correct Answer

A mechanism or source used to determine the expected, correct result for a given test, to compare against the actual result

Explanation

An oracle could be a specification, a previous version of the system, a formula, or domain expertise — anything that tells you what the "correct" output should be.

20

What is "exploratory automation" or "automation-assisted exploratory testing"?

A

Correct Answer

Combining tools (e.g. for generating data, navigating quickly, or capturing logs) with human exploratory testing to increase efficiency and coverage

Explanation

Automation can support exploratory testing by handling repetitive setup tasks, freeing testers to focus on investigation and analysis.

21

What is the purpose of "smoke testing" within a CI/CD pipeline?

A

Correct Answer

To quickly verify that a new build is stable enough for further testing, preventing wasted effort on a fundamentally broken build

Explanation

Smoke tests act as a fast gate — if they fail, the build is rejected immediately, saving time that would be spent on more thorough testing of a broken build.

22

What is "data-driven testing"?

A

Correct Answer

A testing approach where test logic is separated from test data, allowing the same test script to run with multiple sets of input/output data

Explanation

Data-driven testing externalizes test inputs and expected outputs (e.g. in a spreadsheet or file), enabling broad coverage with minimal script duplication.

23

What is "keyword-driven testing"?

A

Correct Answer

A framework where test actions are represented by keywords (e.g. "Click", "EnterText") that map to underlying automation code, allowing non-programmers to write tests

Explanation

Keyword-driven testing abstracts test steps into reusable keywords, separating test design from implementation details, often used to involve non-technical testers.

24

What is "contract testing" in the context of microservices?

A

Correct Answer

Testing that verifies a service provider and its consumers agree on the expected format and behavior of their API interactions, often without requiring both services to run together

Explanation

Contract tests (e.g. using Pact) validate that a consumer's expectations match a provider's actual API, catching integration issues early without full end-to-end environments.

25

What is "mutation testing"?

A

Correct Answer

A technique that introduces small deliberate changes ("mutants") into the code and checks whether the existing tests fail, measuring the effectiveness of the test suite

Explanation

If a mutant survives (tests still pass despite the code change), it suggests the test suite has a gap in detecting that kind of fault, unlike code coverage which only shows whether code ran.

26

What is the purpose of a "defect density" metric?

A

Correct Answer

To measure the number of confirmed defects relative to the size of the software (e.g. per thousand lines of code), helping assess quality and compare modules

Explanation

Defect density helps identify which modules are riskier or lower quality, guiding where to focus additional testing or refactoring.

27

What does "test environment parity" mean and why does it matter?

A

Correct Answer

Keeping test environments as similar as possible to production, so that test results are more representative of real-world behavior

Explanation

Differences between test and production environments (configuration, data volume, infrastructure) can hide bugs that only appear in production, so closer parity reduces "it worked in testing" surprises.

28

What is a "smoke test suite" typically composed of?

A

Correct Answer

A small set of high-level tests covering the most critical functionality, designed to run quickly

Explanation

Smoke suites are intentionally small and fast, covering critical paths so a broken build is detected quickly before running the full test suite.

29

What is the benefit of "parallel test execution"?

A

Correct Answer

Running multiple tests simultaneously to reduce the overall time needed to get feedback from a test suite

Explanation

Parallel execution shortens feedback loops, especially valuable for large test suites in CI pipelines, but requires tests to be independent of each other.

30

What is the difference between "functional testing" and "non-functional testing"?

A

Correct Answer

Functional testing verifies what the system does (specific features/behaviors); non-functional testing verifies how well it does it (performance, usability, security)

Explanation

Functional tests check correctness of behaviors against requirements, while non-functional tests assess qualities like speed, scalability, and security.

31

What is "exploratory charter" used for in session-based testing?

A

Correct Answer

It defines the mission or focus area for an exploratory testing session, guiding the tester's attention without being a rigid script

Explanation

A charter provides direction (e.g. "explore the checkout flow for edge cases with discounts") while leaving room for the tester to investigate freely within that scope.

32

What is the purpose of "regression test suite optimization" (e.g. test selection or prioritization)?

A

Correct Answer

To run a subset of relevant or high-priority tests based on code changes, reducing execution time while maintaining confidence

Explanation

As regression suites grow, selecting or prioritizing the most relevant tests (e.g. based on changed files) helps balance speed with risk coverage.

33

What is "exploratory" testing's relationship with documentation, compared to scripted testing?

A

Correct Answer

Exploratory testing typically produces lighter, after-the-fact documentation (notes, session reports) rather than detailed step-by-step scripts written in advance

Explanation

While scripted tests are documented in detail before execution, exploratory testing is often documented afterward via notes, bug reports, or session logs.

34

What is "snapshot testing" (common in UI component testing)?

A

Correct Answer

Capturing the rendered output of a component and comparing it against a previously saved reference to detect unintended changes

Explanation

Snapshot tests flag any difference from the stored snapshot, prompting a review to confirm whether the change is intentional or a regression.

35

What is the goal of "accessibility testing"?

A

Correct Answer

To verify that an application can be used effectively by people with disabilities, including those using assistive technologies

Explanation

Accessibility testing checks compliance with standards (e.g. WCAG) and usability for users relying on screen readers, keyboard navigation, and similar tools.

36

What is the main trade-off when deciding how much of a test suite to automate?

A

Correct Answer

Automation has an upfront cost to build and maintain but pays off for tests run repeatedly, while manual testing may be more efficient for one-off or highly exploratory work

Explanation

Automation investment makes sense for stable, frequently-run tests (e.g. regression), while exploratory or rapidly-changing areas may not yet justify automation cost.

37

What is a "traceability matrix" used for in testing?

A

Correct Answer

Mapping requirements to corresponding test cases to ensure every requirement is covered by at least one test

Explanation

A traceability matrix helps verify completeness of test coverage relative to requirements and supports impact analysis when requirements change.

38

In a CI/CD pipeline, what is a "quality gate"?

A

Correct Answer

A defined set of criteria (e.g. passing tests, minimum coverage, no critical vulnerabilities) that a build must meet before progressing to the next stage

Explanation

Quality gates automatically block builds that don't meet defined standards, helping enforce consistent quality without manual gatekeeping.

39

What is "cross-browser testing" specifically focused on?

A

Correct Answer

Verifying that a web application renders and functions correctly across different web browsers and their versions

Explanation

Cross-browser testing catches rendering and behavioral differences caused by varying browser engines, versions, and feature support.

40

What is a "sanity test" and how does it differ from a smoke test?

A

Correct Answer

A sanity test is a narrow, focused check that a specific bug fix or feature works as expected, while a smoke test broadly verifies the overall build stability

Explanation

Sanity testing is a quick, targeted check (often after a minor fix) to confirm a specific area works, whereas smoke testing is a broader check of core functionality across the whole build.

1

In the test pyramid, what is a key risk of having too many end-to-end (E2E) tests relative to unit tests (the "inverted pyramid" or "ice cream cone" anti-pattern)?

A

Correct Answer

E2E tests tend to be slower, more brittle, and harder to debug, so an overreliance on them leads to long feedback loops and flaky pipelines

Explanation

E2E tests exercise the full stack and are sensitive to environment issues, making them slower and flakier; the pyramid favors many fast unit tests with fewer, targeted E2E tests for critical flows.

2

What is "test isolation" at the database level, and why is it especially challenging for integration tests?

A

Correct Answer

Ensuring each test runs against a clean, independent data state; it is challenging because shared databases, transactions, and ordering can cause tests to interfere with each other

Explanation

Techniques like transactional rollbacks, dedicated test schemas, or containerized databases help integration tests avoid leaking state between runs.

3

How does "mutation testing" help evaluate the quality of a test suite beyond code coverage, and what is its main practical drawback?

A

Correct Answer

It reveals whether tests can actually detect introduced faults (mutants), but running many mutants against a full test suite can be computationally expensive

Explanation

Mutation testing's "mutation score" (killed mutants / total mutants) is a stronger signal of test effectiveness than line coverage, but the combinatorial cost of running the suite against many mutants can be significant for large codebases.

4

What is "test data management" in large-scale enterprise testing, and why is it a non-trivial problem?

A

Correct Answer

Coordinating the creation, masking, refreshing, and isolation of realistic test data across environments, which is difficult due to data privacy regulations, data volume, and dependencies between systems

Explanation

Realistic, compliant (e.g. anonymized) test data that covers edge cases while respecting privacy laws like GDPR is a significant ongoing engineering challenge in many organizations.

5

How can "observability" (logs, metrics, traces) complement traditional testing in production environments, e.g. via "testing in production" or canary releases?

A

Correct Answer

Observability allows teams to detect issues that only manifest under real production conditions (scale, data, integrations) which pre-production testing cannot fully replicate, enabling fast detection and rollback

Explanation

Techniques like canary releases combine gradual rollout with close monitoring, catching issues real users encounter that synthetic test environments might miss, while limiting blast radius.

6

What is the "Pesticide Paradox" in software testing?

A

Correct Answer

The observation that running the same set of tests repeatedly will eventually stop finding new bugs, as the software becomes "immune" to that particular test set

Explanation

To counter the pesticide paradox, test cases need to be regularly reviewed, revised, and supplemented with new tests to find different categories of defects.

7

What is the difference between "verification of correctness" and "validation of value" when assessing automated test suites in an Agile environment, and how can teams avoid a suite that is "green but useless"?

A

Correct Answer

A passing ("green") suite only confirms tests didn't fail — it doesn't confirm the tests assert meaningful, business-relevant behavior; mutation testing, code review of tests, and mapping tests to requirements help validate their value

Explanation

Tests that assert trivial things (e.g. "function exists") can pass while providing little confidence; reviewing test intent and using techniques like mutation testing helps surface such gaps.

8

In exploratory testing, what is the significance of "tacit knowledge" and why is it hard to fully replace with automation?

A

Correct Answer

Tacit knowledge refers to a tester's intuition and experience-based judgment about where defects are likely to hide, which is difficult to encode explicitly into automated scripts

Explanation

Experienced testers often "sense" risky areas based on patterns they've seen before; this intuition is valuable but resists being fully captured as deterministic rules in automated tests.

9

What is "chaos engineering" and how does it relate to traditional QA testing?

A

Correct Answer

Deliberately injecting failures (e.g. killing servers, adding latency) into a system to verify resilience, complementing traditional testing by validating behavior under real-world failure conditions

Explanation

Chaos engineering (e.g. Netflix's Chaos Monkey) proactively tests system resilience against infrastructure failures, an area traditional functional testing often does not cover.

10

What challenges arise when testing systems built on "eventual consistency" (e.g. distributed databases), and how do testers typically address them?

A

Correct Answer

Assertions made immediately after a write may fail because the read may not yet reflect that write across all nodes; tests often need retry/poll logic with timeouts or to explicitly wait for consistency before asserting

Explanation

Tests against eventually consistent systems must account for propagation delay, often using polling with timeouts or test-specific synchronization hooks to avoid flaky failures.

11

How does "property-based testing" differ from traditional example-based unit testing?

A

Correct Answer

Instead of asserting specific input/output examples, property-based testing defines general properties that should hold for a wide range of automatically generated inputs, often uncovering edge cases developers wouldn't think to test manually

Explanation

Tools like QuickCheck or Hypothesis generate many random inputs and check that defined invariants (properties) hold, often finding edge cases (e.g. empty lists, extreme values) missed by hand-written examples.

12

What is the danger of "overfitting" automated tests to the current implementation rather than the desired behavior?

A

Correct Answer

Tests become brittle, failing on harmless refactors because they assert implementation details rather than observable behavior, increasing maintenance cost without adding confidence

Explanation

Tests tightly coupled to internal structure (e.g. asserting exact private method calls) break whenever the implementation changes, even if the externally observable behavior is unchanged — a maintenance burden without proportional value.

13

What is the "test automation pyramid" critique sometimes raised regarding UI-based automation tools (e.g. record-and-playback)?

A

Correct Answer

Record-and-playback tests are quick to create but tend to be fragile (breaking on minor UI changes), hard to maintain at scale, and slow, so they should be a thin layer over more robust API/unit-level automation

Explanation

While easy to start with, record-and-playback scripts often hardcode UI selectors and timing assumptions, making them costly to maintain as the UI evolves — hence their recommended limited role at the top of the pyramid.

14

How can "test smells" (analogous to code smells) indicate deeper problems in a test suite, and give an example?

A

Correct Answer

Test smells are patterns suggesting maintainability or reliability issues, e.g. "assertion roulette" (multiple unexplained assertions in one test, making failures hard to diagnose) or excessive setup/mocking that signals poor design in the code under test

Explanation

Recognizing test smells (like overly complex setup, duplicated logic, or testing multiple concerns in one test) helps teams refactor both tests and the production code they exercise for better design.

15

In performance testing, what is the difference between "throughput" and "latency", and why might optimizing for one negatively affect the other?

A

Correct Answer

Throughput measures how many requests a system handles per unit time, while latency measures the time to complete a single request; techniques that increase throughput (e.g. batching) can increase latency for individual requests

Explanation

A system can be tuned to process many requests efficiently in aggregate (high throughput) at the cost of each individual request taking longer (higher latency), e.g. via request batching or queuing.

16

What is "fault injection testing" and how does it differ from simply writing negative test cases?

A

Correct Answer

Fault injection deliberately introduces failures into the running system or its dependencies (e.g. network errors, disk failures) to observe real system behavior, going beyond negative test cases that simply pass invalid inputs to functions

Explanation

While negative tests check how code handles bad inputs, fault injection examines how the broader system reacts to environmental failures like timeouts, crashes, or corrupted data, often revealing gaps in error handling and recovery.

17

Why might a team adopt "consumer-driven contract testing" instead of full end-to-end integration tests for microservices?

A

Correct Answer

It allows each service team to verify compatibility independently and quickly (without spinning up the entire system), catching breaking API changes earlier with much faster feedback than full E2E suites

Explanation

Consumer-driven contracts (e.g. Pact) let consumer teams define expectations that provider teams verify against, decoupling test execution from needing all services running simultaneously.

18

What is the significance of "idempotency testing" for APIs, particularly in distributed systems with retries?

A

Correct Answer

It verifies that repeating the same request (e.g. due to a network retry) does not produce unintended side effects like duplicate records or double charges

Explanation

In distributed systems, network failures can cause clients to retry requests; idempotency testing ensures repeated identical requests (e.g. using an idempotency key) don't cause duplicate effects.

19

How does "model-based testing" generate test cases, and what is a key advantage over manually written test cases?

A

Correct Answer

It derives test cases automatically from a formal model of the system's expected behavior (e.g. a state machine), allowing systematic generation of cases including paths a human might overlook

Explanation

By systematically exploring states and transitions defined in a model, model-based testing can generate comprehensive test suites and adapt them automatically when the model changes.

20

What organizational challenge does "you build it, you test it, you run it" (common in DevOps culture) address compared to traditional siloed QA teams, and what risk does it introduce if not balanced properly?

A

Correct Answer

It increases developer ownership and speeds feedback by removing handoffs to QA, but risks losing specialized testing expertise (deep exploratory or performance skills) if testing becomes an afterthought under deadlines

Explanation

Shifting testing responsibility to developers speeds delivery and improves quality awareness, but organizations often still benefit from QA specialists who coach, build tooling, and handle complex cross-cutting testing concerns.