Thread: Help
View Single Post
  #1 (permalink)  
Old March 29th, 2008, 02:09 PM
jeptabo jeptabo is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jeptabo
Default 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

Reply With Quote