Even in small programs the number of possible logical paths can be enormous. Take a program about 100 lines long, with a couple of nested loops executing 20 times each. There are approximately 1014 possible paths that may be executed. At one test per millisecond, that would be 3170 years alone!
Exhaustive Testing is Impossible.
Exhaustive Testing Example
The functional domain of the following function consists of values true and false:
Void PrintBoolean (bool error)
{
if (error)
cout << “true”;
else
cout << “false”;
cout << endl;
}
It makes sense to apply exhaustive testing to this above function, because there are only two possible input values.
Void PrintInteger(int intValue)
{
cout << intValue;
}
It is not practical to test this above function by running it with every possible data input as the number of elements in the set of int values is clearly too large.
[Source]
I make it more like 31 thousand, 7 hundred and 9 years and 9 and a half months rather than 3,170 years. Am I calculating it wrongly?
(10 to the 14 tests at 1000 tests per second gives 10 to the 11 seconds. Divide by 60 to give minutes, by 60 again to give hours, by 24 to give days and by 365 to give 31,709 years 9.5 months.
I think?
C.