Black Box Approach to Unit Testing

Saturday, March 28, 2009

There are three commonly used black box techniques for Unit Testing:

• Equivalence Partitioning
• Boundary Value Analysis
• Error Guessing

Equivalence Partitioning

A method of classifying Test Data, in groups based on its attributes. Following steps are involved:

- Identify Equivalence Classes
- Identify Test Cases

For Example - Input data for a program unit usually falls into a number of partition e.g. - "All negative integers, zero, all positive numbers".

Boundary Value Analysis

• Output domain
• User queries
• Numerical data
• Mouse picks on menu
• Output format requests
• Responses to prompts
• Command key input

Error Guessing

Iis is an ad Hoc method to identify tests likely to expose errors based on experience and intuition.

Some areas to guess are :

• Empty or Null lists / strings
• Zero instances / Occurrences
• Blanks or null characters in strings
• Negative numbers

Next is - Integration Testing.

0 comments:

Post a Comment