Since the last experiment 5.1 basically completed Phase 1 (encapsulation), Phase 2 (subtraction simple test), so this experiment we focus on the implementation of Phase 3 parameter detection,
Test Cases |
Test Project Name |
Arithmetic Simple test |
Test personnel |
Feng Meixin (http://www.cnblogs.com/maxx/) Wu Shu Ting (http://www.cnblogs.com/wst-2015/) |
Date of establishment |
May 8, 2015 |
Functional characteristics |
Test this arithmetic (parameter) |
Black box test:
Number of operators |
input type |
Input data |
Expected output |
Actual output |
Test status |
1 |
1 Correct values |
(4,4,+) |
8 |
8 |
That's right |
2 |
2 numeric value with illegal characters |
(2,32,3w,-,+) |
An exception occurred |
An exception occurred |
That's right |
1 |
3 Subtraction |
(16,8,/) |
2 |
2 |
That's right |
1 |
4 Illegal operators |
(2,4,G) |
Illegal characters |
Illegal characters |
That's right |
2 |
5 Division Denominator is 0 |
(3,1,0,-,/) |
Prompt appears |
The divisor cannot be 0, the formula is invalid |
That's right |
White box test:
Number of operators |
Test Cases |
Use case description |
Overridden Code |
Test results |
2 |
(2,1,1,-,+) |
Input of numeric values |
Input (15-50) |
Run successfully without failure |
1 |
(3,5,W) |
Illegal operator |
Input (92-117) |
Can judge illegal characters |
4 |
(4,5,1,1,-,*+,-) |
Whether to run the algorithm |
() |
Run successfully without failure |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Because there is urgent, failed to perfect the test case, come back tonight, will be well perfected, hope teacher Haihan!
Test and sub-assembly 5.1-5.2