CTC Design & Methodology 3 — Questions and Answers
Question 1: Which testing methodology emphasizes writing tests before writing the application code?
- Exploratory testing
- Test-driven development (TDD) (Correct answer)
- Risk-based testing
- Ad hoc testing
Correct answer: Test-driven development (TDD)
TDD requires developers to write a failing unit test first, then write only the code necessary to make that test pass.
Question 2: A state transition diagram shows a login module with states: Logged Out, Entering Credentials, and Logged In. Which transition is INVALID?
- Logged Out → Entering Credentials on user input
- Entering Credentials → Logged In on valid credentials
- Logged In → Logged Out on logout action
- Logged In → Entering Credentials on valid credentials (Correct answer)
Correct answer: Logged In → Entering Credentials on valid credentials
Transitioning from Logged In back to Entering Credentials on valid credentials is illogical; a user already logged in would not re-enter credentials.
Question 3: Which risk factor is MOST likely to increase the priority of a test case in a risk-based testing approach?
- The feature was recently refactored with no defect history
- The module has high usage frequency and a history of defects (Correct answer)
- The code was written by a senior developer
- The feature has been stable for three releases
Correct answer: The module has high usage frequency and a history of defects
Risk-based testing prioritizes areas with high likelihood of failure (defect history) combined with high impact (usage frequency).
Question 4: What distinguishes a test condition from a test case?
- A test condition is a specific set of inputs and expected results; a test case is abstract
- A test condition is an aspect of the system to be exercised; a test case is the detailed steps to do so (Correct answer)
- A test condition is executed first; a test case is a post-execution record
- There is no meaningful distinction between the two
Correct answer: A test condition is an aspect of the system to be exercised; a test case is the detailed steps to do so
A test condition identifies what needs to be tested (e.g., 'valid login'), while a test case specifies exact inputs, steps, and expected outcomes.
Question 5: When designing tests for a system with 3 independent binary conditions, how many rules does a full decision table require?
- 3
- 6
- 8 (Correct answer)
- 16
Correct answer: 8
A full decision table for n binary conditions requires 2^n rules; 2^3 = 8 unique combinations.
Question 6: Which artifact documents the criteria that must be met before testing of a specific phase or feature can begin?
- Exit criteria
- Entry criteria (Correct answer)
- Test charter
- Test summary report
Correct answer: Entry criteria
Entry criteria define the preconditions that must be satisfied before testing starts, such as build availability or environment readiness.
Question 7: In exploratory testing, what is a 'test charter'?
- A formal test plan approved by management
- A brief mission statement guiding exploration of a specific area (Correct answer)
- A defect report template
- A regression test suite
Correct answer: A brief mission statement guiding exploration of a specific area
A test charter describes the scope, goal, and time-box for an exploratory testing session without prescribing exact test cases.
Which testing methodology emphasizes writing tests before writing the application code?