U3
Page 1: Levels of Testing
Overview of Testing Levels
Need for Levels of Testing: Execution-based software testing is essential for large systems, typically carried out in 3-4 major phases:
Unit Test
Integration Test
System Test
Acceptance Test
Unit Testing
Definition: Testing a single component.
Goal: Detect functional and structural defects within the unit.
Integration Testing
Definition: Testing several components as a group.
Goal: Investigate interactions among the components.
System Testing
Definition: Testing the entire system as a whole.
Goal: Evaluate usability, reliability, and performance.
Acceptance Testing
Definition: Developers demonstrate that the software meets all client requirements.
Goal: Gain client recommendation letters.
Page 2: System Development Approaches
Development Approaches
Bottom-Up Approach: Testing starts from the lowest level of modules.
Top-Down Approach: Testing begins at the highest level of the module hierarchy.
Programming Languages
Procedure-Oriented Languages: Focus on passive data and active procedures. Tests aim to generate input data for procedures.
Object-Oriented Languages: Composed of active data and encapsulated operations. Testing involves designing call orders to access various operations.
Levels of Abstraction
Procedural Systems: Levels include functions, subsystems, and complete systems.
Object-Oriented Systems: Levels include methods, classes, clusters of classes, and the entire system.
Unit Testing Characteristics
Definition of a unit in procedural vs. object-oriented systems.
Page 3: Components Suitable for Unit Test
Advantages of Unit Testing
Easier to design, execute, record, and analyze test results.
Easier to locate and repair defects.
Preparation for Unit Tests
General approach planning.
Designing test cases and procedures.
Defining relationships between tests.
Preparing auxiliary code.
Unit Test Planning
Preparation Process:
Phase 1: Describe the unit test approach and risks.
Phase 2: Identify features to be tested.
Phase 3: Add levels of detail.
Page 4: Detailed Unit Test Planning
Phase 1: Approach and Risks
Outline the unit testing approach.
Identify risks and test requirements.
Define completeness and termination conditions.
Phase 2: Feature Identification
Determine which features will be tested based on specifications.
Assess risks of not testing certain features.
Phase 3: Detail Addition
Refine resource and scheduling portions of the unit test plan.
Include descriptions of test result recording.
Page 5: Designing Unit Tests
Test Case Design
Importance of specifying test cases (i) the test cases and (ii) test procedures.
Use black and white box test design strategies.
Focus on method interactions in class testing as opposed to procedures in procedural testing.
Issues in Class Testing
Adequate feature testing.
Observing state transitions.
Retesting implications for class modifications.
Page 6: Test Harness
Definition
Auxiliary code developed to support testing.
Components of Test Harness: Drivers and stubs.
Functionality of Test Harness
Drivers: Call target units and pass input parameters.
Stubs: Represent called modules and display messages.
Importance of Test Harness
Complexity of harness dependent on code's nature.
Page 7: Running Unit Tests
Execution Criteria
Begins when units are available, test cases are designed, and test harness is prepared.
Recording Results
Use test logs to capture results and summarize test efforts (pass/fail).
Document reasons for failures.
Page 8: Integration Testing Goals
Main Goals of Integration Tests
Detect defects at the interface of units.
Assemble units into working subsystems and ultimately the entire system.
Integration Strategies for Procedural Systems
Bottom-Up Integration: Starts with lowest level modules.
Top-Down Integration: Begins from the top of the module hierarchy.
Page 9: Designing Integration Tests
Designing Procedures
Apply black or white box design strategies focusing on parameter pairs and calling relationships.
Generate test data for data and control flows.
Integration Test Planning
Combine all units, creating a plan based on relevant documentation: system architecture, requirements, etc.
Page 10: Scenario Testing
Definition
A testing technique that utilizes real-world scenarios to evaluate system behavior through credible and easy-to-evaluate scenarios.
Methods in Scenario Testing
System scenarios, use-case scenarios, and role-based scenarios.
Risks of Scenario Testing
Complication from product instability and lack of test coverage.
Page 11: System Testing Overview
Definition and Types
Goal: Verify system performance according to requirements.
Types include functional, performance, stress, configuration, security, and recovery testing.
Page 12: Performance Testing
Objectives
Ensure compliance with functional and quality (e.g., performance) requirements.
Evaluate resource allocation and performance impact factors.
Page 13: Stress Testing
Description
Testing under maximum resource load to identify breaking points or crashes in the system.
Page 14: Configuration Testing
Objectives
Evaluate system performance during hardware changes or reconfigurations.
Page 15: Internationalization Testing
Purpose
Verify the software can be adapted for various languages and regions.
Page 16: Ad-hoc Testing
Definition
Informal testing without structured planning, usually done after formal tests.
Page 17: Alpha, Beta and Acceptance Tests
Definitions
Alpha tests at developer’s site; beta tests in real-world conditions.
Acceptance tests validate that software meets user requirements before deployment.
Page 18: Object-Oriented Systems Testing
Levels of OO Testing
Unit Testing
Subsystem Testing
System Testing
Techniques
Grey box testing and other techniques focused on classes and methods.
Page 19: Usability and Accessibility Testing
Usability Testing Principles
Seven key traits of good UI including correctness, intuitiveness, consistency, and usefulness.
Accessibility Features
Importance of providing UI accessibility for disabled users.
Page 20: Configuration Testing
Overview
Process of checking the software operation across various hardware configurations and ensuring its compatibility.
Page 21: Compatibility Testing
Definition
Ensuring software interacts correctly with other software and specifies system requirements.
Page 22: Web Site Testing
Areas of Focus
Configuration, compatibility, usability, documentation, and localization testing specific to web pages and applications.
Page 23: Testing Documentation
Type and Importance
Documentation checks improve usability, reliability, and lower support costs.
Page 24: Correctness in Documentation
Importance of Testing Documentation
Treat documentation like software to find bugs in both.
Page 25: Documentation Testing Checklist
Areas to Cover
Technical accuracy, completeness, and running checks for errors.
Page 26: Best Practices in Documentation Testing
Recommendations
Follow user steps, examine figures, and test examples thoroughly.
Page 27: Summary
Key Takeaways
Each testing phase is vital for successful software development and must be approached systematically to ensure quality.