Help
im finding difficult to answer a question on white and black box testing... example
A single element buffer can hold an integer number from the following range: -5 to 5.
If the buffer is âemptyâ, a number can be inserted to the buffer, but deletion results in an error. If the buffer is âfullâ, a number cannot be inserted (i.e. an error should be reported), but deletion will work (i.e. the number stored in the buffer will be removed).
Consider two operations on such a buffer: insert(number) and delete.
A pseudo code for delete is given below:
if status==empty then error
else { status=full;
if content<0 then write (ânegativeâ)
else if content >0 then write (âpositiveâ)
else write (âzeroâ) }
(i) Use a âblack boxâ approach to generate test cases for insert(number).
(ii) Use a âwhite boxâ approach to generate test cases for delete. You are also required to draw a control graph for this operation.
Regards,
Jean
|