Software Testing Software Testing 5 — Questions and Answers
Question 1: What is the purpose of a 'test stub' in software testing?
- A placeholder that simulates a module not yet developed or unavailable (Correct answer)
- A document summarizing test results
- A metric for measuring test execution speed
- An automated tool for generating test data
Correct answer: A placeholder that simulates a module not yet developed or unavailable
A test stub is a minimal implementation of a component that simulates the behavior of a real module so testing can proceed without the actual component.
Question 2: What does 'code coverage' specifically measure in white-box testing?
- How many requirements are covered by tests
- The percentage of source code executed during testing (Correct answer)
- How many defects are found per line of code
- The number of test cases written per module
Correct answer: The percentage of source code executed during testing
Code coverage measures what percentage of the source code lines, branches, or paths are actually executed when the test suite runs.
Question 3: In software testing, what is 'risk-based testing'?
- Testing software that handles financial risk calculations
- Prioritizing test efforts based on the probability and impact of potential failures (Correct answer)
- Testing only the riskiest code paths
- Avoiding tests that could harm the production system
Correct answer: Prioritizing test efforts based on the probability and impact of potential failures
Risk-based testing allocates testing resources by focusing on areas where failures are most likely to occur and would have the greatest business impact.
Question 4: What is the 'pesticide paradox' in software testing?
- Using too many testing tools causes diminishing returns
- Repeatedly running the same tests stops finding new defects over time (Correct answer)
- Automated tests eventually poison the test environment
- Testing too thoroughly kills developer motivation
Correct answer: Repeatedly running the same tests stops finding new defects over time
The pesticide paradox states that if the same tests are repeated over and over, they eventually cease to find new bugs, just as pests become resistant to pesticides.
Question 5: Which type of non-functional testing checks how the application behaves when many users access it simultaneously?
- Stress testing
- Load testing (Correct answer)
- Volume testing
- Endurance testing
Correct answer: Load testing
Load testing evaluates system behavior under expected simultaneous user loads to verify it meets performance requirements.
Question 6: What is 'boundary value analysis' in test design?
- Analyzing the business value of each test case
- Testing at the edges of input partitions where defects are most likely (Correct answer)
- Measuring the maximum memory usage of a function
- Checking the boundary between frontend and backend systems
Correct answer: Testing at the edges of input partitions where defects are most likely
Boundary value analysis tests input values at the edges of equivalence partitions (minimum, maximum, and just inside/outside boundaries) where errors commonly occur.
Question 7: What is the role of a 'test manager' in a software testing team?
- Writing all test cases for the project
- Executing automated test scripts
- Planning, monitoring, and controlling the testing activities and team (Correct answer)
- Developing the test automation framework
Correct answer: Planning, monitoring, and controlling the testing activities and team
A test manager oversees the entire testing process, including planning, resource allocation, scheduling, progress monitoring, and stakeholder communication.
What is the purpose of a 'test stub' in software testing?