Design Patterns    |     Security    |     Testing    |     Distributed Computing    |     Contact
Software Testing

Test Design Techniques

Specification-based (black box)
Software is viewed as a black box with inputs and outputs.
There is no knowledge of the internal structure of the system.
Structure-based (white-box)
Test cases are derived based on the internal structure of the software
Based on program statements, conditions, loops, paths through code.
Experience-based
Based on skill, knowledge and intuition
Involves both technical people (developers, architects) and non-technical (business analysts)

Specification-based (black box)

An important task in the testing process is determining the optimal number of test cases that insure a good coverage and reasonable test resources consumption.

Consider a shopping cart page where there is an input box that specifies the quantity ordered. Assume there is a one digit input box that accepts valid numerical values between 0 and 9.

In order to exhaustively test this input box we need to test how the software responds to any data the user may enter using the keyboard, which includes:

  • Lower case letters from a to z
  • Uppercase letters from A to Z
  • Numbers from 0 to 9
  • Special characters

We need at least 68 test cases in order to test a simple one digit input box. If we consider these test cases in the context of all controls in the shopping cart page (drop down lists with inventory selection, product characteristics, etc) the number of test cases required to test one single page gets out of control.

The question is: how do we build the test cases so that they are representative?

There are four specification-based techniques for defining and building an optimal number of test cases:

  • Equivalence partitioning
  • Boundary value analysis
  • Decision table testing
  • State transition testing