  Knowledge Center

Completeness of Software Testing. Introduction

The purpose of software testing is to detect the situation when the results of the program do not match the input data. The easiest way to do this is to try all possible variants of the input data and verify the results. Unfortunately, use of this method almost never succeeds. Even for the simplest of programs the number of cases of input data is astronomical.

For example, let our software solves a very simple task. The user enters from the keyboard two integers, and the program gives the sum of it. We will consider only 16-bit numbers.

How many variants should we to check? We will have the first items 2 ^ 16. Second - the same number. Their combination will be: 2 ^ 16 * 2 ^ 16 = 2 32 ≈ 4 billion.

Let the test of one option would require a second (actually not every two numbers can be entered in a second, much less to verify the result, but for simplicity let it be so). Then for all options it would require more than 4 billion seconds = 66,666,666, (6) minutes = 1111111, (1) hours = 46 296, (296) days ≈ 126.75 year. So only your grandchildren will end the testing of your program (although where should they come from, after all, you need 126 years of continuous work).

Hence the sad conclusion that exhaustive testing (i.e., enumeration of all possible execution) for any non-trivial programs is impossible.

The criteria for a classification of all possible variants for running the program in terms of accuracy testing of the program, called the criteria of completeness of testing.

There are two approaches to the formulation of criteria of completeness of testing: criteria of a "black box" and the criteria of "white box".

The criteria for black box testing described in terms of task of internal structure of the program.

The criteria of white-box take into account the structure of the program.