In order to prove that a piece of software works, the software must be tested to determine if the requirements of the application are met. There are several different types of tests used throughout the development process. The two main types of testing are white box and black box testing. White box test cases are used to test specific paths through the code. At decision points you can test the boundaries of the decision (boundary testing) and the partitions of the decision (partition testing). Black box tests treat the program like a black box; what happens in the program is invisible and unimportant to the user. Black box test cases only look at specific inputs and outputs of an application.

There are several different levels of testing that are done throughout the software development process. These are outlined in the table below:

Test Type Description White or Black Box?
Acceptance Testing conducted by a customer to verify that the system meets the acceptance criteria of the requested application. Black Box
Integration Tests the interaction of small modules of a software application. White or Black Box
Unit Tests a small unit (i.e. a class) of a software application, separate from other units of the application. White Box
Regression Tests new functionality in a program. Regression testing is done by running all of the previous unit tests written for a program, if they all pass, then the new functionality is added to the code base. White Box
Functional and System Verifies that the entire software system satisfies the requirements. Black Box
Beta Ad-hoc, third party testing. Black Box

There are several times during the software development process that testing can be done. In the waterfall software process, testing is done after all code has been developed and before release of the product. The spiral model has a quadrant devoted to testing. Testing is done several times as the development "spirals in." Agile software methods advocate test driven development (TDD), which means that test cases are written before any coding is done. Therefore the planned tests drive the application coding forward. TDD is most frequently done with unit tests, where a unit test is written first and then application code is written that passes the test. With TDD all test cases are added to a repository. When new code is added to the code base, all tests must pass to ensure that the new code does not break the application.

Verification and validation of a software application are an important result of software testing. Verification and validation can also be done by code inspections and reviews. Verification determines if the product developed during a certain phase of development meets the requirements determined in the previous phase of development. Validation determines if a final piece of software meets the customer requirements.

Author: Laurie Williams and Sarah Heckman
Maintained By: Sarah Heckman
Last Updated: 2008-08-25