Testing
- A process by which we increase our confidence in an implementation by observing it's behavior
- Testing cam revel the presence of errors but not their absence
Levels of Abstraction in Functionality
- Idea
- Specification
- Implementation
Dangers
- Spurious Test Failures: passes when should not
- False Positives: fails when should not
Levels of Testing
Unit Testing
- Individual components tested in isolation
- UUT (unit under test)
Ways of Unit Testing
- Black Box: Testing based on specification (don't look at code)
- White Box: Testing based on the code structure
Integration Testing
- Modules tested in combination to check whether they interface correctly
Ways of Integration Testing
- Bottom Up: Start with basic modules
- Top Down: Start with larger modules (main, interfaces)
System Testing
- Verify that the system as a whole meets requirements
Ways of Unit Testing
- Alpha: Tested by developers before releasing
- Beta: Tested by a group of willing customers before general releasing
- Acceptance: End-customer receives product and gives feedback
TDD (Test Driven Development)