Question: Black Box Testing Given the function specification as below, can you design test cases by applying each of the following black box testing methods? Input

Black Box Testing
Given the function specification as below, can you design test cases by applying each of the following black box testing methods?
Input Partitioning
Output Partitioning
Boundary Value Robustness Testing
Given an array of no more than 100 unique integers sorted in ascending order, arr, and an integer x, the function returns an integer that meets the following conditions:
If there is no such a value of j that arr[j] equals x, then return 1.
Otherwise, return the value of j that arr[j] equals x.
The function throws an Exception for any invalid input, e.g., arr is null, or x is not an integer.
Input Partitioning:
Test cases do not miss any important input partition; Test cases do not include redundant input partitions.
Output Partitioning:
Test cases do not miss any important output partition; Test cases do not include redundant output partitions.
Boundary Value Robustness Testing:
Test cases do not miss any important boundary value; Test cases do not include redundant boundary values.
Input Partitioning
List all the combinations of the equivalence classes for input parameters (arr and x):
Partition, Equivalence Class for arr, Equivalence Class for x,
P1
P2
...
List the test cases you designed to cover all the identified partitions. Test cases might be fewer than the partitions.
Test, Partitions covered, arr input, x input, output
T1 P1
T2 P2, P3
...
Output Partitioning
List all the partitions, i.e., equivalence classes for the output domain.
Partition, Equivalence Class for output
P1
P2
...
List the test cases you designed to cover all the identified partitions. The test cases might be fewer than the partitions.
Test, Partitions covered, arr input, x input, output
T1 P1
T2 P2, P3
...
Boundary Value Robustness Testing
Test cases designed based on all combinations of boundary values for arr and x.
Test, arr input, x input, output
T1
T2
...

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 Programming Questions!