White-Box Testing
Steven
Zeil
August 3,
2013
Styles of Testing
Testing traditionally can be conducted in three
styles
- Black-Box testing
- Try to choose "smart" tests based on the
requirements, without looking at the code.
- White-Box testing
- Try to choose "smart" tests based on the
structure of the code, with minimal reference to the
requirements.
- Random testing
- Try to use directed random selection to choose
tests that are "representative" of how the program will be
used.
We’ve already looked at black-box
techniques. In this lesson we take up white-box testing.
Complementary Strategies
Black-box and white-box testing are
complementary.
- projects should combine elements of each
- Black-box tests
- can be designed earlier
- are better at catching errors of omission and
errors in design
- White-box tests
- must await the development of the code
- are better at catching errors of commission and
errors after design
Combining Black- and White-Box
Testing
Best to
- Do BB testing first
- Measure how well your BB tests did at WB
coverage
- Add tests as needed to achieve your WB
goals
[]