-
What is the primary objective of White Box testing in a system with $n$ internal paths?
- To validate user interface design
- To verify internal logic and code structure
- To test system requirements only
- To perform black box validation
Correct Answer: To verify internal logic and code structure
Explanation: White box testing focuses on the internal structures of the application, ensuring that paths are executed according to the logic.
-
In cyclomatic complexity, if a program has $e$ edges, $n$ nodes, and $p$ connected components, what is the formula $V(G)$?
- $e - n + 2p$
- $e + n - 2p$
- $n - e + p$
- $e - n + p$
Correct Answer: $e - n + 2p$
Explanation: Cyclomatic complexity is calculated as $V(G) = e - n + 2p$ to measure the number of linearly independent paths.
-
Which testing level focuses on finding defects in the interaction between $2$ or more modules?
- Unit testing
- Integration testing
- System testing
- Acceptance testing
Correct Answer: Integration testing
Explanation: Integration testing specifically targets the interfaces and interactions between modules.
-
If a test case covers $100$ out of $200$ total lines of code, what is the branch coverage percentage?
- $25\%$
- $50\%$
- $75\%$
- Cannot be determined
Correct Answer: Cannot be determined
Explanation: Line coverage does not equate to branch coverage; branch coverage requires knowing the decision points, not just lines.
-
Which document describes the scope, approach, and resources for testing a project with $k$ features?
- Test Summary Report
- Test Plan
- Bug Report
- Requirements Specification
Correct Answer: Test Plan
Explanation: The Test Plan is the master document that outlines the scope, resources, and strategy for testing.
-
What does the 'Shift Left' approach imply in the software development lifecycle of $S$ phases?
- Testing at the end of development
- Testing early in the development cycle
- Moving developers to QA roles
- Reducing test automation
Correct Answer: Testing early in the development cycle
Explanation: Shift Left means starting testing activities as early as possible in the development lifecycle.
-
Which testing type is performed by end-users in a real-world environment before release?
- Alpha testing
- Beta testing
- Regression testing
- Mutation testing
Correct Answer: Beta testing
Explanation: Beta testing is conducted by real users in their own environment before the product is fully released.
-
What is the purpose of a regression test when $m$ modifications are made to the codebase?
- To verify new features
- To ensure existing functionality remains intact
- To check system performance
- To document requirements
Correct Answer: To ensure existing functionality remains intact
Explanation: Regression testing ensures that changes or bug fixes have not adversely affected existing features.
-
What metric represents the number of defects found per $1000$ lines of code?
- Defect Density
- Test Coverage
- MTBF
- Pass/Fail Ratio
Correct Answer: Defect Density
Explanation: Defect Density is calculated as the total number of confirmed defects divided by the size of the software (e.g., KLOC).
-
Which testing technique uses a set of $x$ input values to trigger errors based on boundary conditions?
- Equivalence Partitioning
- Boundary Value Analysis
- Error Guessing
- Exploratory Testing
Correct Answer: Boundary Value Analysis
Explanation: Boundary Value Analysis (BVA) focuses on the values at the edges of equivalence partitions.
-
In a software project, what does MTBF stand for?
- Mean Time Between Failures
- Maximum Test Buffer Frequency
- Minimum Task Breakdown Function
- Measured Time Before Fix
Correct Answer: Mean Time Between Failures
Explanation: MTBF is a reliability metric indicating the average time elapsed between inherent failures of a system.
-
What is the main goal of performance testing when $n$ concurrent users access the system?
- Checking functionality
- Measuring speed, responsiveness, and stability
- Improving UI aesthetics
- Identifying security gaps
Correct Answer: Measuring speed, responsiveness, and stability
Explanation: Performance testing determines how a system performs under various workload conditions.
-
Which of these is NOT a principle of software testing?
- Exhaustive testing is possible
- Defect clustering
- Pesticide paradox
- Testing shows the presence of bugs
Correct Answer: Exhaustive testing is possible
Explanation: Exhaustive testing is impossible; instead, testers use risk-based approaches to select test cases.
-
Mutation testing involves inserting $f$ faults into the source code to evaluate what?
- Code readability
- Test suite effectiveness
- Hardware compatibility
- Compiler efficiency
Correct Answer: Test suite effectiveness
Explanation: Mutation testing checks if the test suite is capable of detecting intentionally introduced faults.
-
Which test artifact identifies the severity and priority of a defect numbered $d_i$?
- Test Case
- Traceability Matrix
- Bug Report
- Test Script
Correct Answer: Bug Report
Explanation: A bug report tracks individual defects and classifies them by priority and severity.
-
What is the primary benefit of automation testing for a suite of $N$ repetitive tests?
- Increased human creativity
- Faster execution and reusability
- Zero maintenance costs
- Elimination of all bugs
Correct Answer: Faster execution and reusability
Explanation: Automation allows for rapid execution of repetitive test cases across multiple environments.
-
Which test design technique groups inputs into $n$ valid and invalid classes?
- Equivalence Partitioning
- Decision Table Testing
- State Transition Testing
- Use Case Testing
Correct Answer: Equivalence Partitioning
Explanation: Equivalence Partitioning divides input data into ranges, assuming all values in a class behave similarly.
-
What does a 'Stub' represent in unit testing with $k$ components?
- A dummy component that replaces a missing dependent module
- A tool for UI automation
- A final build report
- A type of security threat
Correct Answer: A dummy component that replaces a missing dependent module
Explanation: A stub is a minimal implementation of a component used to facilitate testing of a unit that depends on it.
-
What does a Decision Table test cover when there are $c$ conditions and $a$ actions?
- Complex business logic involving multiple combinations
- Sequential UI navigation
- Hardware drivers
- Network latency
Correct Answer: Complex business logic involving multiple combinations
Explanation: Decision tables are ideal for documenting and testing complex business rules involving multiple input combinations.
-
The exit criteria for a testing phase usually defines the $p$ percent of what?
- Defects closed
- UI themes implemented
- Documentation pages
- Hardware updates
Correct Answer: Defects closed
Explanation: Exit criteria define the conditions that must be met to consider a testing phase complete, such as fixing a specific percentage of defects.