Why is testing described as an investigative process rather than a verification process?
Because its primary purpose is generating information about risk to inform decisions—not proving correctness.
Can testing prove a program is bug-free?
No. Testing can only show the presence of bugs—never guarantee their absence.
You’ve run 500 tests and they all pass. A stakeholder asks if the software is bug-free. How do you respond?
No—passing tests only prove those specific scenarios work. Untested paths, edge cases, and unknown conditions remain unverified.
Why is verification testing necessary but insufficient on its own?
It confirms requirements are met (necessary) but only finds problems you already thought to look for (insufficient for unknowns).
Your test suite covers all documented requirements and passes. A user reports a crash. What type of testing might have caught this?
Investigative (exploratory) testing—asking “what if” questions beyond the requirements checklist.
How do verification and investigation testing complement each other?
Verification ensures known requirements work. Investigation discovers unknown problems. Mature products need both.
What is a Test Oracle?
A mechanism for determining whether a test passed or failed—the source of expected behavior.
You’re writing a test but realize you don’t know what “correct” output looks like. What concept are you missing?
A test oracle—without knowing expected behavior you cannot determine pass/fail.
Why do some tests lack clear oracles?
When correct behavior is subjective (UX quality) or undefined (exploratory edge cases). These require human judgment or heuristics.
Why are there two fundamental approaches to test case creation?
Because you can either test from external behavior (specification-based) or internal structure (code-based)—each reveals different issues.
How do black-box and white-box testing differ in what they can reveal?
Black-box finds behavior that doesn’t match specifications. White-box finds code paths that aren’t exercised or have internal issues.
You’re testing an API by sending requests and checking responses, with no access to source code. What approach is this?
Black-box (specification-based) testing.
You examine a function’s code, notice an edge case in a conditional branch, and write a test for it. What approach is this?
White-box (code-based) testing.
Why can specification-based tests be developed before code is complete?
Because they’re independent of implementation—they only need to know expected inputs and outputs.
Why does specification-based testing often leave coverage gaps?
You can’t see which code paths remain untested—a requirement may be “covered” while error-handling branches are never exercised.
Why does code-based testing enable coverage metrics that specification-based cannot?
Because you can instrument the code to measure which lines/branches tests actually execute.
Your black-box tests all pass, but a bug exists in an error-handling branch. Why might black-box testing miss this?
Black-box testing can’t see internal code paths—it may never exercise error handling if specifications don’t cover those scenarios.
When should you combine both testing approaches?
Most projects benefit from both: specification-based for requirement coverage and acceptance criteria; code-based for finding untested paths.
How does the ‘postal service vs. phone call’ analogy explain Selenium vs. Playwright speed?
Selenium (WebDriver) is like mailing letters—each command requires a round-trip. Playwright (CDP) is like an open phone line—continuous bidirectional communication.
Why does the communication protocol matter so much for test performance?
Tests send many commands. Per-command latency accumulates. Lower latency protocols (CDP, WebSocket) dramatically reduce total execution time.
Where does Playwright sit in relation to the browser—inside or outside?
Outside. Playwright controls the browser externally via WebSocket. Only Cypress runs inside the browser.
Why does Cypress running inside the browser create both advantages and limitations?
Advantages: direct state access, synchronous DOM manipulation. Limitations: same-origin restrictions, shared execution context reduces isolation.
Which browser automation tool provides maximum browser coverage, and why?
Selenium—WebDriver is a W3C standard implemented by all major vendors including Safari and older browsers.
Your app must work in Safari. Which tools can you use?
Selenium (full Safari support) or Playwright (WebKit engine approximation). Cypress has limited Safari support.