t2h2 test case
TRANSCRIPT
-
8/8/2019 T2H2 Test Case
1/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
TEST CASE
Project Name Creator
Project Code Reviewer/Approver
Document Code _XXX_vx.xIssue Date
Version
Record of change
Effective Date Version Change Item *A,D,M Change description
-
8/8/2019 T2H2 Test Case
2/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Reference
-
8/8/2019 T2H2 Test Case
3/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 3/19
TEST CASE LIST
Project Name Detect Motion And Camera Tracking
Project Code T2H2
Test Environment Setup Description
No Function Name Sheet Name Description
1 function_delay2 function_hexbase
3 function_hexToDec
4 function_splitInput
5 function_degreeToStep
6 function_motor1_run
7 function_motor2_run
8 function_main
StepMotorControlStepMotorControlStepMotorControlStepMotorControlStepMotorControlStepMotorControlStepMotorControlStepMotorControl
-
8/8/2019 T2H2 Test Case
4/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Pre-Condition
-
8/8/2019 T2H2 Test Case
5/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Module Code Step Motor Control
Test all function for control step motor. Get input data, process and make pulse for step motor.
Tester
ResultPass Fail N/A Number of Test cases
21 0 0
ID Test Case Description Test Case Procedure Expected Output Result
Function void delay(double time)
1 Delay 5s of step motor Pass
Function int hexbase(char ch)
2 Return 1 Pass
3 Return 9 Pass
4 Return 11 Pass
5 Return 16 Pass
double hexToDec(char *str)
Testrequirement
Test case: long time is5000 with unit isminisecond
1. input delay time is 5000.2. run delay function.
Test case: input char chis characters from 0 to 9.input ch = '1'.
1. enter ch = '1'.2. run hexbase function.
Test case: input char chis characters from 0 to 9.input ch = '9'.
1. enter ch = '9'.2. run hexbase function.
Test case: input char ch
is characters alphabe.input ch = 'b'.
1. enter ch = 'b'.
2. run hexbase function.
Test case: input char chis characters alphabe.input ch = 'F'.
1. enter ch = 'F'.2. run hexbase function.
-
8/8/2019 T2H2 Test Case
6/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
6 Return 0 Pass
7 Return 18 Pass
8 Return 62 Pass
9 Return 247 Pass
Function void splitInput(char inputStr[])
Pass
Pass
Test case: input stringnull
1. input str = null.2. run hexToDec.
Test case: input string012
1. input str = "012".2. run hexToDec.
Test case: input string03E
1. input str = "03E".2. run hexToDec.
Test case: input string0F7
1. input str = "0F7".2. run hexToDec.
Test case:1. input string"0102B094".
2. idegree1 = 43.3. idegree2 = 148.
1. input str = "0102B094".2. run splitInput function.3. call hexToDes function with
input is str[3], str[4], str[5].4. Assign value for idegree1.5. call hexToDes function for inputis str[6], str[7], str[8].6. Assign value for idegree2.
1. idegree1 = 43.2. idegree2 = 148.
Test case:1. input string"00000000".2. idegree1 = 0.3. idegree2 = 0.
1. input str = "00000000".2. run splitInput function.3. call hexToDes function withinput is str[3], str[4], str[5].4. Assign value for idegree1.5. call hexToDes function for inputis str[6], str[7], str[8].6. Assign value for idegree2.
1. idegree1 = 0.2. idegree2 = 0.
-
8/8/2019 T2H2 Test Case
7/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Pass
Function int degreeToStep(int degree)
Return step = 0. Pass
Return step = 4. Pass
Return step = 17. Pass
Function void motor1_run(int step, int pulse[], char index)
Pass
step = 9 and motor move backward. Pass
Test case:1. input string"010C00D3".2. idegree1 = 192.3. idegree = 211.
1. input str = "010C00D3".2. run splitInput function.3. call hexToDes function withinput is str[3], str[4], str[5].4. Assign value for idegree1.5. call hexToDes function for input
is str[6], str[7], str[8].6. Assign value for idegree2.
1. idegree1 = 192.2. idegree2 = 211.
Test case: input degreeis 0.
1. enter degree = 0.2. run degreeToStep funtion.
Test case: input degreeis a number multiple of7.5 step.
1. enter degree = 30.2. run degreeToStep funtion.
Test case: input degreeis a number which is notmultiple of 7.5 step.
1. enter degree 125.2. run degreeToStep funtion.
Test case:Test with case no of step= 0.
1. input step = 0.2. pulse = array_forward.3. index = 0.
step = 0 and motor not changeposition.
Test case:Test with case in put is arandom degree >0 and
-
8/8/2019 T2H2 Test Case
8/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
step = 30 and motor move forward. Pass
Function void motor2_run(int step, int pulse[], char index)
Pass
step = 9 and motor move backward. Pass
step = 30 and motor move forward. Pass
Test case:Test with case input is adegree > 180.
1. input step = 30 (degree = 225).2. pulse = array_forward.3. index = 0.
Test case:Test with case no of step= 0.
1. input step = 0.2. pulse = array_forward.3. index = 0.
step = 0 and motor not changeposition.
Test case:Test with case in put is arandom degree >0 and 180.
1. input step = 30 (degree = 225).
2. pulse = array_forward.3. index = 0.
-
8/8/2019 T2H2 Test Case
9/19
Facilitate_Test Case\Company
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
-
8/8/2019 T2H2 Test Case
10/19
Facilitate_Test Case\Company
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
-
8/8/2019 T2H2 Test Case
11/19
Facilitate_Test Case\Company
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
-
8/8/2019 T2H2 Test Case
12/19
Facilitate_Test Case\Company
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
-
8/8/2019 T2H2 Test Case
13/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Module Code ImageProcessingPC
Tester
Pass Fail N/A Number of Test cases
22 0 6 28
ID Test Case Description Test Case Procedure Expected Output Result
Function On_Stop
Click stop button on main screen Pass
Pass
Pass
Functon On_Redball
Click Redball button in screen Pass
Click Redball button in screen Pass
Function On_Mode
Click Mode button in screen Pass
Testrequirement
Test all function for partimage processing in PC
Test case: Click Stopbutton
1. Enable start button.2. Disable buttons: stop, redball, mode
Test case: Click Stopbutton 2 times
Click stop button 2 times on mainscreen
1. Enable start button.2. Disable buttons: stop, redball, mode
Test case: Click Stopbutton many times
Click stop button 15 times on mainscreen
1. Enable start button.2. Disable buttons: stop, redball, mode
Test case: Click Redballbutton in case have redobject in camera area.
1. Redball mode = 1.2. track_object = 0.3. Follow red object.
Test case: Click Redballbutton when do not haveobject red ball.
1. Redball mode = 1.2. track_object = 0.3. Do not follow any object without redcolor in camera area.
Test case: Click Modebutton when have chosenobject.
Change mode view to HSV color in hsvscreen.
-
8/8/2019 T2H2 Test Case
14/19
Facilitate_Test Case\Company v
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 1
Click Mode button in screen Pass
Function calcDegreeVerti
The result will be display on main Log Pass
Click on button Red ball The result will be display on main Log Pass
Function On_Start
Click on button Start in Screen Pass
Pass
Pass
Function calDegreeHorti
The result will be display on main Log Pass
Click on button Red ball The result will be display on main Log Pass
Function WindowProc
Pass
Pass
Pass
Pass
Test case: Click Modebutton when do not havechosen object or redballstatus.
Change mode view to HSV color in hsvscreen.
Test case: Click Mouseto select object
Click on Button Start and thenmouse click to select object
Test case: Click onbutton Red ball
Test case: Click onbutton Start
Display capture Image, HSV image andLaplace Image
Test case: Click onbutton Start and mouseclick to choose Object
Click on button Start in Screen andthen mouse click on image
- Draw eclipse surround object- Draw rectangle surround eclipse- Send command to main Log- Display Histogram
Test case: Click onbutton Start choosebutton Red Ball
Click on button Start in Screen andclick button Red Ball
- Draw circle surround red ball- Send command to main Log
Test case: Click Mouseto select object
Click on Button Start and thenmouse click to select object
Test case: Click onbutton Red ball
Test case: whenmessage = WM_APP + 6
Click on Button Start and thenmouse click to select object
- sendActivate = true- out_xy[0] = lParam
Test case: whenmessage = WM_APP + 7
Click on Button Start and thenmouse click to select object
- sendActivate = true- out_xy[1] = lParam
Test case: whenmessage = WM_APP + 8
Click on Button Start and thenmouse click to select object
- sendActivate = true- out_xy[2] = lParam
Test case: whenmessage = WM_APP + 9
Click on Button Start and thenmouse click to select object
- sendActivate = true- out_xy[3] = lParam
-
8/8/2019 T2H2 Test Case
15/19
Facilitate_Test Case\Company
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use
Pass
Pass
Pass
Pass
Test case: whenmessage = WM_APP + 6
Click on Button Start and click onButton Red Ball
- sendActivate = true- out_xy[0] = lParam
Test case: whenmessage = WM_APP + 7
Click on Button Start and click onButton Red Ball
- sendActivate = true- out_xy[1] = lParam
Test case: whenmessage = WM_APP + 8
Click on Button Start and click onButton Red Ball
- sendActivate = true- out_xy[2] = lParam
Test case: whenmessage = WM_APP + 9
Click on Button Start and click onButton Red Ball
- sendActivate = true- out_xy[3] = lParam
-
8/8/2019 T2H2 Test Case
16/19
Module Code Test circuit
Tester
Pass Fail N/A
0 0 4
ID Test Case Description Test Case Procedure
Cuircuit microprocessor
Circuit unl2803
Circuit RS232
Circuit ..
Circuit
Testrequirement
Test all circuit used insystem
-
8/8/2019 T2H2 Test Case
17/19
Number of Test cases
4
Expected Output Result
-
8/8/2019 T2H2 Test Case
18/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 18/19
TEST REPORT
Project Name Creator
Project Code Reviewer/Approver
Document Code _Test Report_vx.x Issue Date
Notes ex: Release 1 includes 2 modules: M
No Module code Pass Fail Untested N/A
1 Step Motor Control 21 0 0 0
2 ImageProcessingPC 22 0 0 6
3 Module3 15 0 0 0
Sub total 58 0 0 6
Test coverage 100.00 %
Test successful coverage 100.00 %
-
8/8/2019 T2H2 Test Case
19/19
02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 19/19
odule1 and Module2
Number of test cases
21
28
15
64
50%50%
dfsdfsdf
Step MotorControl
ImageProcessingPC
Module3