Software Testing & Quality Assurance Practice Questions & Quiz

70 questions / 10 random questions

test strategy specification-based techniques automation non-functional testing defect analysis quality metrics and release decisions
Try a 10-question Software Testing & Quality Assurance quiz

Random questions, instant feedback, and review for missed questions.

Start quiz →

Included topics (70 questions)

Q1

What should be done first when creating a quality plan for a new service?

Answer: Identify and prioritize user, business, and technical quality risks

Quality work should be allocated according to risks, including impact and likelihood. Quality goals, scope, techniques, environments, and exit criteria follow from those priorities.

Q2

Why are unit, integration, system, and acceptance testing separated?

Answer: To vary scope and purpose and catch different failures from components to business value

Each test level has a different target and purpose. Unit tests cover components, integration tests interfaces, system tests end-to-end behavior, and acceptance tests business and user needs.

Q3

Which test suite best follows the test pyramid?

Answer: Many fast unit tests, with integration and E2E focused on critical paths

A broad base of fast, diagnostic lower-level tests plus a focused set of slower integration and end-to-end tests balances speed, confidence, and maintainability.

Q4

An input accepts ages from 18 through 65. Which set represents equivalence partitions?

Answer: 17 or below, 18 through 65, and 66 or above

Equivalence partitioning divides inputs into valid and invalid classes expected to behave similarly, then samples each class. Boundary value analysis complements it at the edges.

Q5

A quantity field accepts 1 through 99. Which values best apply boundary value analysis?

Answer: 0, 1, 2, 98, 99, and 100

Boundary value analysis targets values just below, on, and just above each boundary, efficiently revealing comparison and off-by-one errors.

Q6

A discount rate depends on membership type, purchase amount, and coupon presence. Which technique is most suitable?

Answer: Decision table testing

A decision table maps combinations of conditions to outcomes, making missing, contradictory, and untested rules visible.

Q7

An order moves among received, paid, shipped, and canceled states, with different allowed actions in each state. Which technique fits best?

Answer: State transition testing

State transition testing checks current state, events, next state, and valid or invalid actions, including defects that occur only after specific sequences.

Q8

There are too many combinations of OS, browser, language, and role. Which technique covers interactions with fewer cases?

Answer: Use pairwise testing to cover every pair of factor values

Pairwise testing greatly reduces the suite while covering each pair of factor values at least once. High-risk combinations should still be added explicitly.

Q9

Which approach makes exploratory testing effective?

Answer: Set a charter and timebox, combine learning and execution, and keep evidence

Exploratory testing is not aimless clicking. A charter, timebox, observations, findings, and remaining coverage make the work focused and explainable.

Q10

Which information is most important when prioritizing risk-based testing?

Answer: Likelihood of failure and impact on users and the business

Risk is commonly assessed from likelihood and impact. Change size, complexity, defect history, usage, financial, safety, and regulatory consequences inform priority.

Q11

What is the main benefit of traceability from requirements through test results?

Answer: It shows verification status per requirement and change impact

Linking requirements, design, test conditions, cases, results, and defects exposes untested needs, supports regression selection, and provides release evidence.

Q12

Which characteristic describes good acceptance criteria?

Answer: Describe conditions, actions, and observable outcomes specifically

Acceptance criteria create shared understanding and a test oracle. They should define observable behavior with examples or measures rather than vague adjectives.

Q13

A requirement review finds the phrase 'respond promptly.' What is the best action?

Answer: Clarify the operation, load, measurement interval, and acceptable response time

Ambiguous non-functional requirements become testable by defining the subject, conditions, metric, and threshold. Finding ambiguity in static review reduces rework.

Q14

Which information is most useful when reporting a hard-to-reproduce defect?

Answer: Environment, build, preconditions, steps, expected and actual results, and logs

When reproducibility is low, execution context and evidence are critical. Timestamps and correlation IDs connect the report to distributed logs and traces.

Q15

Which statement correctly distinguishes defect severity from priority?

Answer: Severity reflects impact, while priority reflects urgency including business context

Severity describes failure impact; priority guides when to fix it. Release timing, workarounds, frequency, contracts, and business needs can make them differ.

Q16

The same class of production defect keeps recurring. Which quality assurance response is effective?

Answer: Analyze causes and escape points and feed them into reviews and automated checks

Quality assurance goes beyond finding and fixing individual defects. It improves the process by asking why the defect was introduced and why earlier controls failed to detect it.

Q17

What is the best way to select regression tests after a change?

Answer: Select impacted and critical paths from dependencies, journeys, and defect history

Regression scope should consider contracts, shared data, configuration, and downstream consumers, not just changed lines. Fast broad automation can complement focused impact-based selection.

Q18

Immediately after deployment, the team needs a quick check that critical functions work at a basic level. Which test fits?

Answer: A smoke test of key functions

Smoke testing quickly checks critical paths to determine whether a build or deployment is stable enough for deeper testing.

Q19

Which is the most reliable test oracle for determining expected results?

Answer: An expected result derived independently from requirements, rules, and standards

Expected results should be independent of the implementation to avoid copying the same misunderstanding into the test. Complex behavior may use reference implementations, known examples, or properties.

Q20

Production-like personal data is needed in a test environment. What is the best approach?

Answer: Limit purpose, use synthetic or irreversibly anonymized data, and control access

Test data still requires minimization, purpose limitation, access control, retention, and deletion. Prefer synthetic data preserving structure and distributions; justify any real-data use.

Q21

Which approach reduces defects missed because test and production environments differ?

Answer: Version the configuration as code and expose differences to reproduce production

Versioned environment definitions make OS, runtime, dependency, configuration, and service-contract differences visible and reproducible without copying production secrets.

Q22

What is the best first response to a test that fails intermittently in CI?

Answer: Capture logs and seeds on failure and isolate shared state and async waits

Flaky tests erode trust and hide real regressions. Preserve evidence, reproduce the condition, and make tests deterministic through state-based waits, injected time, and isolated data.

Q23

Integration tests make one another fail when run in parallel. Which approach improves isolation?

Answer: Give each test unique data and namespaces with cleanup

Tests should not depend on order or leftover state. Unique IDs, transactions, dedicated schemas, or disposable containers provide isolation depending on the target.

Q24

Why are unit tests with a mocked external payment API insufficient by themselves?

Answer: They pass an assumed contract but miss real schema and state differences

Mocks quickly test local behavior but can faithfully reproduce a wrong assumption. Contract tests, sandbox integration, and a small number of end-to-end tests cover the real boundary.

Q25

What is the main purpose of consumer-driven contract testing?

Answer: Capture consumer expectations as contracts and verify provider changes

Consumers publish the request and response expectations they rely on, and providers verify them in CI. The goal is early compatibility feedback for real usage.

Q26

Which locator strategy makes UI automation more maintainable?

Answer: Prefer roles and labels, with stable data attributes when needed

Locators based on user-facing semantics also exercise accessibility and resist structural changes. Stable data attributes are useful when semantic identification is insufficient.

Q27

What problem comes from frequent fixed five-second sleeps in async UI tests, and what is the better approach?

Answer: Too short fails and too long is slow, so wait conditionally for the needed state

Fixed waits are sensitive to environment speed and create both delay and flakiness. Waiting for observable completion with a bounded timeout is faster and more deterministic.

Q28

How does property-based testing complement example-based tests?

Answer: It checks invariants over many inputs and shrinks to a minimal counterexample

Generated cases explore boundaries and combinations people may not enumerate, while properties express invariants such as round trips, ordering, and ranges. Important examples remain useful.

Q29

What does mutation testing reveal?

Answer: Whether tests detect small injected changes in the source

If a test suite survives an intentionally changed operator or condition, it may execute the code without asserting behavior effectively. Equivalent mutants require interpretation.

Q30

Why does 100 percent code coverage not prove the absence of defects?

Answer: It shows execution but not assertion quality or missing requirements

Coverage is a useful indicator of unexecuted code. Weak assertions can execute every line, and behavior missing from both requirements and code cannot appear in coverage.

Q31

Which test checks whether response time and throughput meet targets at expected peak traffic?

Answer: A load test at expected peak

Load testing verifies performance objectives under expected normal and peak demand. Stress testing pushes beyond capacity to study degradation, failure, and recovery.

Q32

Average response time looks good, but a minority of users experience extreme delays. Which metric should be examined?

Answer: Percentiles such as p95 and p99 and their distributions by load

Averages can hide tail latency and distribution shape. Percentiles, histograms, error rate, and throughput should be correlated over time and load levels.

Q33

Which practice appropriately shifts security testing left?

Answer: Add threat analysis, secure code review, and SAST early in CI

Early controls reduce remediation cost, but no single tool is sufficient. Design, code, dependencies, and runtime behavior require complementary techniques and safe secret injection.

Q34

Which combination is most appropriate for accessibility testing?

Answer: Check keyboard use, focus order, and contrast with automated and manual tests

Automation efficiently catches machine-detectable issues, but focus behavior, meaningful names, and screen-reader experience require manual evaluation.

Q35

Which observation approach is effective in usability testing?

Answer: Give representative users realistic tasks and observe without leading

Observe representative users performing realistic goals and collect completion, time, errors, comprehension, and satisfaction. Record interventions separately.

Q36

What is most important when testing failure recovery?

Answer: Detection, failover, integrity, and recovery time after fault injection

Recoverability should be tested end to end under realistic faults, including RTO, RPO, in-flight work, duplication or loss, and restoration of normal monitoring.

Q37

Which condition is appropriate for a release quality gate?

Answer: Review critical-risk results, open defects, residual risk, and approval

A quality gate uses agreed evidence by risk and an explicit residual-risk decision, not a single count. Exceptions need rationale, owner, mitigation, and expiry.

Q38

How should defect removal efficiency be used for improvement?

Answer: Track where defects are found, including escapes, and evaluate trends

Detection-stage trends can indicate whether reviews and tests find defects earlier. Normalize definitions, severity, size, and period, and combine metrics to avoid gaming.

Q39

Which use of metrics should be avoided in a quality dashboard?

Answer: Treat the number of executed test cases alone as quality itself

When activity volume becomes the goal, teams can inflate counts with low-value cases. Dashboards should support decisions through user outcomes, risk, detection strength, and stability.

Q40

Which approach safely releases a change that has passed pre-release testing?

Answer: Roll out gradually, monitor guardrails, and roll back on anomalies

Pre-release environments cannot reproduce every production data, load, and dependency condition. Canaries and feature flags limit exposure while guardrails compare errors, latency, and business outcomes.

Q41

Before a major legacy-system refactor, current undocumented behavior must be preserved. Which test is appropriate?

Answer: Freeze current behavior in characterization tests and review only intentional changes

Characterization tests record what the existing system actually does as a safety net. Even suspicious behavior should change only after product decisions and impact review.

Q42

A unit test depending on current time and random values fails intermittently. Which design is appropriate?

Answer: Inject the clock and random generator and control them with fixed values or seeds

Moving nondeterministic inputs behind injectable boundaries makes time edges, expiry, and random branches reproducible. Record seeds with failures.

Q43

A test double should provide a lightweight in-memory implementation with state similar to an external service. Which type is appropriate?

Answer: A fake with a lightweight implementation

A fake is a working but simplified implementation not intended for production. A dummy only fills a parameter, a spy records interactions, and a stub returns prepared responses.

Q44

What compatibility check is most important when testing a database migration during a rolling deployment?

Answer: Old and new applications can both use the transitional schema

Rolling deployments include a mixed-version window. Test expand-and-contract, lock duration, reruns, partial failure, and old-version behavior with production-like data volume.

Q45

An optional field is added to a public API response. Which backward-compatibility test is appropriate?

Answer: Old clients tolerate the unknown field and new clients handle its absence

Client and server versions differ in distributed rollouts. Use a consumer matrix and contract tests for old/new cross-version combinations.

Q46

A short performance test passes, but memory and latency degrade after several hours. Which test is appropriate?

Answer: A long soak test at expected load observing heap and GC trends

Soak tests reveal time-dependent degradation such as leaks, pool exhaustion, cache growth, and log accumulation. Evaluate steady state and post-load recovery.

Q47

Which performance test verifies whether autoscaling can follow a sudden traffic increase?

Answer: A spike test with rapid load changes measuring scaling delay and recovery

Spike tests measure detection, provisioning, warm-up delay, and stability after scale-in. Stress testing instead explores limits and behavior beyond capacity.

Q48

Inventory reservation rarely loses updates. Which concurrency-test method is effective?

Answer: Use barriers to overlap reads and writes deliberately and verify invariants

Race conditions depend on timing. Widen the contention window with synchronization, record seeds, schedules, and transaction IDs, and assert invariants such as nonnegative stock.

Q49

A JSON parser should be robust against unexpected inputs. Which fuzz-testing approach is appropriate?

Answer: Mutate inputs automatically, monitor crashes and hangs, and minimize failures

Fuzzing explores boundary defects through many generated or mutated inputs. Use corpora, seeds, timeouts, and sanitizers, then add minimized failures to normal tests.

Q50

An image transformation has no easy direct oracle. Which is an appropriate metamorphic test?

Answer: Verify that a 360-degree rotation matches the original within tolerance

Metamorphic testing uses a relation that should hold across transformed inputs even when exact outputs are unknown. Specify tolerances and applicability conditions.

Q51

Which acceptance criteria are appropriate for releasing a probabilistic AI classifier?

Answer: Define precision/recall thresholds and confidence intervals on independent data

AI output requires statistical evaluation. Agree on task-relevant metrics, an independent test set, sample size, confidence intervals, subgroup performance, and safety limits.

Q52

Which test-impact-analysis approach appropriately shortens a large regression suite?

Answer: Select priority tests from changes and dependencies and audit with the full suite

Impact analysis provides fast risk-based feedback but can miss tests through mapping errors. Evaluate accuracy with full runs, random sampling, and escaped defects.

Q53

What is an appropriate process when temporarily quarantining a flaky test?

Answer: Assign an owner and deadline, keep it visible, fix the cause, and restore the gate

Quarantine is a temporary measure to preserve feedback trust, not a substitute for repair. Track flake rate, affected scope, and overdue quarantines.

Q54

Static analysis finds tens of thousands of existing warnings, hiding new defects. What is the appropriate improvement?

Answer: Baseline existing findings, reduce by risk, and gate new code against growth

Clean-as-you-code plus risk triage stops new debt while reducing legacy debt manageably. Suppressions need a reason, scope, and expiry.

Q55

Which practice improves defect detection in pull-request reviews?

Answer: Keep changes small and review rationale and test evidence with risk-based checklists

Static review detects defects early. Small diffs, clear intent, risk perspectives, independent review, and verifiable test evidence improve effectiveness.

Q56

Which analysis of an escaped production defect best supports recurrence prevention?

Answer: Separate introduction, nondetection, and escape and identify control gaps

Defect escape analysis examines both introduction causes and detection controls. Add a regression test and systemic process or design changes that prevent the defect class earlier.

Q57

Which investment decision appropriately uses cost-of-quality thinking?

Answer: Allocate prevention and appraisal effort to areas with high failure cost

Cost of quality includes prevention, appraisal, internal failure, and external failure. Optimize investment against business risk and failure cost rather than pursuing defect removal at any cost.

Q58

Why does a zero-finding automated accessibility scan not prove WCAG conformance?

Answer: Some criteria cannot be automated and keyboard and cognitive use need human evaluation

Accessibility evaluation combines automated, semi-automated, and manual testing. Assistive-technology and user testing cover issues machines cannot determine.

Q59

Which design safely runs synthetic tests in production?

Answer: Use dedicated accounts and identifiable data, bound side effects, and clean up

Synthetic monitoring continuously checks user journeys but creates production side effects. Design dedicated identity, bounded frequency, data labels, cleanup, cost limits, and security review.

Q60

Defect repair clusters just before release because quality is treated as only the QA team's responsibility. What is the appropriate improvement?

Answer: Have product, development, operations, and QA share quality risks and done criteria

A whole-team approach builds quality into requirements, design, implementation, and operations. QA contributes testing expertise and risk visibility, while the entire team owns quality decisions and improvement.

Q61

A Playwright Test calls expect(locator).toHaveText("Done") without await. How should it prevent the test from ending before the assertion completes?

Answer: Await the asynchronous assertion before ending the test.

toHaveText is asynchronous. Await its result so the test observes completion or failure. Declaring the test callback async alone does not await every Promise it creates.

Q62

A test checks only that no error is visible immediately after clicking Save. It passes even when saving fails later. What is a suitable improvement?

Answer: Wait for save completion, then verify saved data and error state.

Absence of an error before completion does not establish success. Wait for an observable completion condition and verify the saved result rather than merely waiting a fixed duration.

Q63

Many snapshot tests fail after a UI change. Even under release pressure, what is required before updating baselines?

Answer: Review differences against intended changes before updating baselines.

Updating snapshots approves current output as the new expectation. Review differences to avoid approving missing content or layout regressions; fix unintended changes in the implementation.

Q64

A CI test fails initially but passes on automatic retry. What is lost if reporting records only a final pass?

Answer: Initial instability is hidden, delaying diagnosis and trend detection.

A retry can recover a run without fixing its cause. Track first-attempt success separately from retry recovery and preserve evidence from the original failure.

Q65

For if (a && b), tests use only (true,true) and (false,false). What remains untested despite covering both decision outcomes?

Answer: Test a=true and b=false to exercise failure due to b.

Both decision outcomes do not ensure every condition is exercised. With short-circuit evaluation, false a skips b, so these tests never evaluate b as false.

Q66

Tests cover every pair of OS, browser, and authentication mode, yet one three-way combination fails. What is the right interpretation and response?

Answer: Pair coverage does not guarantee triples; add the relevant combination.

Pairwise coverage covers two-factor interactions, not every triple. Add the failure as a regression case and consider stronger interaction coverage based on risk.

Q67

A surviving mutant is shown to produce the same observable behavior as the original for every permitted input. How should it be treated?

Answer: Document it as an equivalent mutant and distinguish it from killable ones.

An equivalent mutant cannot be distinguished by a valid behavioral test. Document and review the equivalence argument; survival alone does not establish equivalence.

Q68

Each virtual user waits for a response before sending another request, so offered load falls as the server slows. How should a sustained arrival rate of 100 requests per second be tested?

Answer: Use an arrival-rate model and monitor missed starts and generator capacity.

In a closed model, slower responses delay new iterations. An open arrival-rate model decouples starts from completions, but generator capacity and dropped iterations still require monitoring.

Q69

An input accepts at most 12 UTF-8 bytes. Existing tests use only 12 and 13 ASCII characters. Which cases should be added?

Answer: Include multibyte text and verify boundaries by encoded byte length.

UTF-8 length varies by character. Four instances of あ occupy 12 bytes and five occupy 15. Mixed strings can exercise 11, 12, and 13-byte boundaries directly.

Q70

A tax-calculation test obtains expected values by calling the same production function it tests. How should it avoid passing when that function has a rounding defect?

Answer: Use independently derived expectations and boundary cases from agreed rules.

Reusing the same implementation shares its defects with the oracle. Derive expectations independently from the agreed rounding rules and review boundary examples.

certdrill.dev is an independent, unofficial learning site and is not affiliated with LPI Japan, IPA, AWS, Microsoft Azure, or any exam provider. Questions and explanations are original content.