Question: Black Box Testing Read each of the following function descriptions and create black box test data to test each of the functions. This will be

Black Box Testing
Read each of the following function descriptions and create black box test data to test each of the
functions. This will be data that tests the functionality of the individual functions by performing unit
tests on the functions. You should not refer to the code at this stage
that will come later when you
create white box test data. Function: findString Data Expected Result Description
Test
1
(
first string,
Blackbox
)
str
=
abc
list
=
{
abc
,
def
,
ghi
}
nstrings
=
3
0
Tests to see if a string is
found in the first
position of string array.
Test
2
Test
3
Test
4
This is a list of the functions you need to create black box test data for:
/
*
*
Find the position of a string in an array of strings.
*
@param str
-
the string to find
*
@param list
-
the list of strings to search
*
@param nstrings
-
the number of strings in the list
*
@returns the position of the string in the list or
-
1
if not found
*
/
int findString
(
const char str
[
]
,
const char list
[
]
[
MAX
_
STRING
_
LEN
+
1
]
,
const int nstrings
)
;
/
*
*
Initialize all members of an array to a single value.
*
@param ar
-
the array to initialize
*
@param value
-
the value to set all array members to
*
@param size
-
the size of the array
*
/
void init
(
int ar
[
]
,
const int value, const int size
)
;
/
*
*
Add an item to the shopping cart.
*
@param cart
-
the cart to add to
*
@param item
-
the item to add
*
@returns zero on success or non
-
zero if an error occurs
*
/
int add
2
Cart
(
struct Cart
*
cart, const int item
)
;
/
*
*
Clear input buffer until next newline character.
*
/
void clear
(
)
;
White Box Testing
Now, you should consult the code supplied with this workshop. Examine the code for each of the
functions and add white box tests to the black box tests you created previously. Be sure to indicate if it
is a white box or black box test as shown in the example. You can add the white box tests as additional
rows to the table you created for each function.Show me the function,data,expected result & description step by step.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!