Testing Flashcards
What is the primary goal of testing?
To reduce the risk of failure that costs money and causes harm.
What is the formula for testing cost-benefit analysis?
Effort in Testing (£) = Reduced Probability × Cost of Failure (£).
What does testing reveal?
The presence of errors, not their absence.
What are the two aims of testing?
Demonstrate software meets requirements and discover incorrect or undesirable behavior.
What is a test harness?
A collection of software and data for automated testing, including an execution engine and script repository.
Why use a test harness?
To automate test execution, generate reports, and improve productivity and repeatability.
What is unit testing?
Testing individual components in isolation.
What types of test cases are used in unit testing?
Verification (normal operation) and Defect Detection (anomalous inputs).
What is Test-Driven Development (TDD)?
A development approach where tests are written before code, guiding incremental coding.
What are TDD benefits?
Code coverage, regression testing, simplified debugging, and documentation.
What is regression testing?
Testing to ensure changes do not break existing functionality.
What are the steps in regression testing?
Re-run all tests, ensure they pass, and commit changes only if successful.
Why is automated testing preferred for regression testing?
It is more efficient and faster than manual testing.
What are emergent properties in system quality?
Reliability, scalability, and usability, which are not easily testable with code.
What causes software bugs?
Human errors in design or programming.
How are software bugs measured?
Using software metrics like errors per 1,000 lines of code.
What is the cost-quality trade-off triangle?
Quality is inversely related to time, cost, and features.
Why does testing follow a diminishing returns pattern?
The more tests run, the fewer new bugs are found, leading to stopping tests when predicted bugs end.
What documentation supports testing?
Requirements specification, user manual, design specifications, test plans, and quality assurance documents.
What are software inspections?
Code and documentation reviews to find defects without executing the system.
What is a common form of inspection?
Code walkthroughs or pair programming.