Print Page | Close Window

hi Guys Please Help

Printed From: One Stop Testing
Category: Software Testing @ OneStopTesting
Forum Name: Beginners @ OneStopTesting
Forum Discription: New to the Club...!!! Don't Worry, We are here for you...!!! Learn the very basics of Software Testing and other pertinent Informations.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=5435
Printed Date: 19Aug2025 at 4:35pm


Topic: hi Guys Please Help
Posted By: jepatabo
Subject: hi Guys Please Help
Date Posted: 29Mar2008 at 6:40am

im having a problem in understanding White box and black box testing, how can you unswer a typical question:

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.

Thanks in advance



-------------
Jean.



Print Page | Close Window