Make your own free website on Tripod.com

Interface Testing by using Procedural Interfaces Testing

Because of interfaces errors or invalid assumptions about the interface, interface testing is used to detect faults introduces to the system. Interface testing is extremely important in object-oriented development, especially in cases of reuse.

 

Test Case 1

Capital Letter for Option

Test Data

S
I
D
P
W
Q

 

Test Result:

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>S
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>I
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>D
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>P
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>W
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>
 

Test Case 2

Small Letter for Option

Test Data

s
i
d
p
w
q

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>s
Enter search key : 20
Not found
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
20 a
OK
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>d
Enter key : 2
Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>p
20
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>w
Current tree
Name Key
a : 20;
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>q
 

Test Case 3

Other Letter (Different from Option)

Test Data

!
#
a
A
J

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>!
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>#
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>a
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>A
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>J
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>
 

Test Case 4

Many Input for a single Insert Function Called.

Test Data

10 a 20 b 30 c

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
10 a 20 b 30 c
OK
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>w
Current tree
Name Key
a : 10;
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>
 

Test Case 5

Insert Negative Number and Floating Point.

Test Data

-1234567890
.123456789

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
1234567890 a
OK
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
.123456789 b
Sorry, duplicate keys not allowed
Problems
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key and name
Sorry, duplicate keys not allowed
Problems
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key and name
Sorry, duplicate keys not allowed
Problems
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key and name
(infinite loop)
 

Test Case 6

Delete Function

Test Data

30
20

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
20 a
OK
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>d
Enter key : 30
Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>d
Enter key : 20
Removed item: a : 20;
Destroyed
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>d
Enter key : a
Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key : Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key : Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key : Wasn't there
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>Enter key : Wasn't there
(infinite loop)
 

Test Case 7

Print Function

Test Data

p

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>i
Enter key and name
20 a
OK
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>p
20
 

Test Case 8

Walk Function

Test Data

w

Test Result

Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>w
Current tree
Name Key
a : 20;
Q to quit, s to Search, i to Insert, d to Delete, p Print, w Walk
>
 

Conclusion

This program didn't accept any Capital Letter and Symbols which were not recognized by the program. The only mistake it the "Q" from the options. It should be "q" instead of "Q" because "q" was accepted but not "Q".

If many keys and names were input at once, the program would also read the first key and name. This program didn't let us to input many nodes at a time.

This program also didn't accept any floating point, it would result an infinite loop.

If alphabets were entered in the delete function, an infinite loop would be happened.