Software Testing Summary Notes
Software Testing Summary Notes
Program Testing
Purpose:
o Show that the program works as intended.
o Identify and fix defects before use.
Methods:
o Execute the program with artificial data to detect errors.
o Part of the Verification and Validation (V&V) process.
Testing Goals
1. Validation Testing:
o Confirm the system meets requirements.
o Ensure all system features and combinations are tested.
2. Defect Testing:
o Find incorrect or undesirable behaviors (e.g., crashes, incorrect computations,
data corruption).
Verification:
o "Are we building the product right?"
o Ensures conformance to specifications.
Validation:
o "Are we building the right product?"
o Ensures the product meets user needs.
V&V Confidence:
o Aim is to establish confidence that the system is 'fit for purpose'.
o Confidence depends on:
Software Purpose: Criticality to the organization.
User Expectations: Users may tolerate failures if benefits outweigh
recovery costs.
Marketing Environment: Early market release may take precedence over
defect resolution.
Stages of Testing
1. Development Testing:
o Unit Testing: Testing individual program units (e.g., functions, methods).
o Component Testing: Testing integrated units with a focus on interfaces.
o System Testing: Testing the system as a whole to validate component
interactions.
2. Release Testing:
o Conducted by a separate team.
o Validates system readiness for external use.
o Includes requirements-based and defect testing.
3. User Testing:
o Conducted by actual users in real environments.
o Types:
Alpha Testing: Collaborative testing at the developer's site.
Beta Testing: Users provide feedback on a system release.
Acceptance Testing: Customers test to approve system delivery.
Automated Testing:
o Automate testing to ensure repeatability and speed.
Components of a Test:
System Testing
Software Inspections:
o Analysis of static system representation to discover problems (static verification).
o No execution required.
o Effective at finding early defects.
Software Testing:
o Dynamic verification by observing system behavior during execution.
o Requires test data to assess behavior.
Comparison:
o Inspections cannot evaluate non-functional characteristics like performance.
o Testing and inspections are complementary, not opposing, methods.
Advantages of Software Inspection
Automated Testing
Benefits:
o Speeds up regression testing.
o Ensures consistent test execution.
Structure:
Process:
o Write tests before coding.
o Develop code incrementally.
o Move to the next task only after passing tests.
Advantages:
o Ensures code coverage.
o Regression testing
o Simplifies debugging.
o Serves as documentation.
1. Requirements-Based Testing:
o Develop tests based on individual system requirements.
2. Scenario Testing:
o Simulate real-world usage scenarios to validate combined requirements.
3. Performance Testing:
o Gradually increase load to evaluate system behavior.
o Stress Testing: Overload the system to observe failure points.
4. Regression Testing:
o Ensure new changes do not disrupt existing functionality.
o manual testing process, regression testing is expensive but, with
automated testing, it is simple and straightforward.
Exercise Questions
Multiple-Choice Questions (MCQs)
1. What is the main goal of defect testing? A) Ensure system meets requirements. B)
Identify incorrect behaviors. C) Validate user expectations. D) Measure performance
under stress.
2. Which stage tests integrated system components as a whole? A) Unit Testing B)
Component Testing C) System Testing D) Release Testing
3. Which process ensures high-quality code during development? A) Stress Testing B)
Regression Testing C) Test-Driven Development (TDD) D) Use-Case Testing
True/False Questions
1. Stress testing evaluates the system's behavior under normal conditions. (True/False)
2. Inspections can validate system performance and usability. (True/False)
3. Release testing is performed by the same team responsible for system development.
(True/False)
Answers
MCQs:
True/False:
1. False
2. False
3. False
Short Answers:
1. Validation ensures the product meets user needs; verification ensures compliance with
specifications.
2. Inspections uncover issues early without requiring system execution, saving time and
resources.
3. Scenario testing reflects real-world use cases, helping validate combined functionalities.
4. Stress testing reveals performance limits, ensuring robustness under peak loads.