Software Testing Fundamentals and Techniques
Classified in Computers
Written at on English with a size of 3.93 KB.
1. Basics of Software Testing
- Definition of Software Testing: The process of verifying and validating that a software application or product meets specified requirements.
- Key Objectives: Ensure quality, detect errors, and assess functionality.
2. Differences Between:
- Errors: Mistakes made by developers during coding or design.
- Faults (Defects): Errors in the code that can cause failures when executed.
- Failures: The manifestation of a fault during program execution.
- Bugs: Common term for faults/defects found in the software.
3. Debugging
- Definition: The process of identifying, analyzing, and fixing bugs in software.
- Key Difference: Debugging fixes the bugs detected during testing.
4 & 5. Static Techniques and Testing Methods
Static Techniques:
- Benefits: Early defect detection, cost reduction, improved code quality.
- Downsides: Does not evaluate runtime behavior, requires skilled reviewers.
Dynamic Testing Techniques:
- Equivalence Class Testing: Divides input data into partitions for efficiency.
- Boundary Value Testing: Tests edges of input ranges (min, max, off-by-one errors).
- Decision Table Testing: Focuses on combinations of inputs and their outcomes.
- Data Flow Testing: Tracks variables from definition to usage to find anomalies.
- Slice-Based Testing: Focuses on analyzing a subset of the program's behavior.
Definitions of Coverage and Metrics
- Coverage: The degree to which the code has been tested.
- Coverage Metrics:
- Statement Coverage: Ensures every line of code is executed.
- Branch Coverage: Ensures every decision outcome (true/false) is tested.
- Condition Coverage: Tests all boolean expressions in conditions.
- MC/DC (Modified Condition/Decision Coverage): Ensures each condition in a decision has been tested independently.
8 & 9. Masking and Path-Based Testing
- Masking: A situation where one condition masks another due to logical operators.
- Short-Circuit Operators: Logical operators (
&&
,||
) that stop evaluation once the result is determined. - Path-Based Testing:
- Definition: Focuses on testing execution paths through the code.
- Benefits: Helps identify untested paths and ensures better code coverage.
- Drawbacks: Becomes complex for large programs.
- Metrics: Similar to Question 7, focusing on paths.
10. Graph-Based Testing and Complexity
- Program Graphs: Represents control flow in a program.
- Condensation Program Graphs: Abstracts program graphs by grouping nodes.
- Cyclomatic Complexity: Measures the number of linearly independent paths in the code.
11 & 12. Object-Oriented (OO) Testing
- Six Metrics for OO Testing:
- Coupling
- Cohesion
- Class Size
- Inheritance Depth
- Polymorphism
- Encapsulation
- Special Considerations:
- Encapsulation: Test through interfaces, not internal state.
- Inheritance: Ensure inherited and overridden methods are tested.
- Polymorphism: Test all implementations of polymorphic behavior.