Completeness example

De Software testing
Ir para: navegação, pesquisa

Consider the following requirement:

  • It is required to write a program that inputs two integers and outputs the maximum of these.

Suppose that program max is developed to satisfy the requirement above,. The expected output of max when the input integers are 13 and 19 can be easily determined to be 19. Suppose now that the tester wants to know if the two integers are to be input to the program on one line followed by a carriage return, or on two separate lines with a carriage return typed in after each number. The requirement, as stated above, fails to provide an answer to this question.


  • <bib>mathur:2008, 11</bib>