Sie sind auf Seite 1von 15

TEST CASE

Project Name <Project Name> Creator


Project Code <Project Code> Reviewer/Approver
Issue Date
Document Code <Project Code>_XXX_vx.x
Version

Record of change
Effective Date Version Change Item *A,D,M Change description Reference
<Date when these <List of documents which are refered
changes are effective> in this version.>

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 1/15


TEST CASE LIST
Project Name Detect Motion And Camera Tracking
Project Code T2H2
<List enviroment requires in this system
1. Server
2. Database
Test Environment Setup Description 3. Web Browser
...
>

No Function Name Sheet Name Description Pre-Condition


1 function_delay StepMotorControl
2 function_hexbase StepMotorControl
3 function_hexToDec StepMotorControl
4 function_splitInput StepMotorControl
5 function_degreeToStep StepMotorControl
6 function_motor1_run StepMotorControl
7 function_motor2_run StepMotorControl
8 function_main StepMotorControl

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 2/15


Facilitate_Test Case\Company v1.0

Module
Code
Test Step Motor Control
requiremen
t Test all function for control step motor. Get input data, process and make pulse for step motor.
Tester
Pass Fail N/A Number of Test cases
Result
21 0 0 21

Test Case
ID Test Case Procedure Expected Output Result
Description
Function void delay(double time)
1 Test case: long time 1. input delay time is 5000. Delay 5s of step motor Pass
is 5000 with unit is 2. run delay function.
minisecond
Function int hexbase(char ch)
2 Test case: input char 1. enter ch = '1'. Return 1 Pass
ch is characters from 0 2. run hexbase function.
to 9. input ch = '1'.

3 Test case: input char 1. enter ch = '9'. Return 9 Pass


ch is characters from 0 2. run hexbase function.
to 9. input ch = '9'.

4 Test case: input char 1. enter ch = 'b'. Return 11 Pass


ch is characters 2. run hexbase function.
alphabe. input ch =
'b'.
5 Test case: input char 1. enter ch = 'F'. Return 16 Pass
ch is characters 2. run hexbase function.
alphabe. input ch =
'F'.
double hexToDec(char *str)

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 3/15


Facilitate_Test Case\Company v1.0

6 Test case: input 1. input str = null. Return 0 Pass


string null 2. run hexToDec.

7 Test case: input 1. input str = "012". Return 18 Pass


string 012 2. run hexToDec.

8 Test case: input 1. input str = "03E". Return 62 Pass


string 03E 2. run hexToDec.

9 Test case: input 1. input str = "0F7". Return 247 Pass


string 0F7 2. run hexToDec.

Function void splitInput(char inputStr[])


Test case: 1. input str = "0102B094". 1. idegree1 = 43. Pass
1. input string 2. run splitInput function. 2. idegree2 = 148.
"0102B094". 3. call hexToDes function with
2. idegree1 = 43. input is str[3], str[4], str[5].
3. idegree2 = 148. 4. Assign value for idegree1.
5. call hexToDes function for
input is str[6], str[7], str[8].
6. Assign value for idegree2.

Test case: 1. input str = "00000000". 1. idegree1 = 0. Pass


1. input string 2. run splitInput function. 2. idegree2 = 0.
"00000000". 3. call hexToDes function with
2. idegree1 = 0. input is str[3], str[4], str[5].
3. idegree2 = 0. 4. Assign value for idegree1.
5. call hexToDes function for
input is str[6], str[7], str[8].
6. Assign value for idegree2.

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 4/15


Facilitate_Test Case\Company v1.0

Test case: 1. input str = "010C00D3". 1. idegree1 = 192. Pass


1. input string 2. run splitInput function. 2. idegree2 = 211.
"010C00D3". 3. call hexToDes function with
2. idegree1 = 192. input is str[3], str[4], str[5].
3. idegree = 211. 4. Assign value for idegree1.
5. call hexToDes function for
input is str[6], str[7], str[8].
6. Assign value for idegree2.

Function int degreeToStep(int degree)


Test case: input 1. enter degree = 0. Return step = 0. Pass
degree is 0. 2. run degreeToStep funtion.

Test case: input 1. enter degree = 30. Return step = 4. Pass


degree is a number 2. run degreeToStep funtion.
multiple of 7.5 step.

Test case: input 1. enter degree 125. Return step = 17. Pass
degree is a number 2. run degreeToStep funtion.
which is not multiple
of 7.5 step.

Function void motor1_run(int step, int pulse[], char index)


Test case: 1. input step = 0. step = 0 and motor not change Pass
Test with case no of 2. pulse = array_forward. position.
step = 0. 3. index = 0.

Test case: 1. input step = 9 (degree = step = 9 and motor move Pass
Test with case in put 70). backward.
is a random degree 2. pulse = array_backward.
>0 and <=180 3. index = 0.
degrees.

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 5/15


Facilitate_Test Case\Company v1.0

Test case: 1. input step = 30 (degree = step = 30 and motor move Pass
Test with case input is 225). forward.
a degree > 180. 2. pulse = array_forward.
3. index = 0.

Function void motor2_run(int step, int pulse[], char index)


Test case: 1. input step = 0. step = 0 and motor not change Pass
Test with case no of 2. pulse = array_forward. position.
step = 0. 3. index = 0.

Test case: 1. input step = 9 (degree = step = 9 and motor move Pass
Test with case in put 70). backward.
is a random degree 2. pulse = array_backward.
>0 and <=180 3. index = 0.
degrees.
Test case: 1. input step = 30 (degree = step = 30 and motor move Pass
Test with case input is 225). forward.
a degree > 180. 2. pulse = array_forward.
3. index = 0.

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 6/15


Facilitate_Test Case\Company v1.0

Module
Code
Test ImageProcessingPC
Test all function for
requiremen part image processing
t in PC
Tester
Pass Fail N/A Number of Test cases
22 0 6 28

Test Case
ID Test Case Procedure Expected Output Result
Description
Function On_Stop
Test case: Click Stop Click stop button on main 1. Enable start button. Pass
button screen 2. Disable buttons: stop, redball,
mode
Test case: Click Stop Click stop button 2 times on 1. Enable start button. Pass
button 2 times main screen 2. Disable buttons: stop, redball,
mode
Test case: Click Stop Click stop button 15 times on 1. Enable start button. Pass
button many times main screen 2. Disable buttons: stop, redball,
mode
Functon On_Redball
Test case: Click Click Redball button in screen 1. Redball mode = 1. Pass
Redball button in case 2. track_object = 0.
have red object in 3. Follow red object.
camera area.
Test case: Click Click Redball button in screen 1. Redball mode = 1. Pass
Redball button when 2. track_object = 0.
do not have object red 3. Do not follow any object without
ball. red color in camera area.
Function On_Mode
Test case: Click Mode Click Mode button in screen Change mode view to HSV color in Pass
button when have hsv screen.
chosen object.

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 7/15


Facilitate_Test Case\Company v1.0

Test case: Click Mode Click Mode button in screen Change mode view to HSV color in Pass
button when do not hsv screen.
have chosen object or
redball status.

Function calcDegreeVerti
Test case: Click Click on Button Start and then The result will be display on main Pass
Mouse to select object mouse click to select object Log
Test case: Click on Click on button Red ball The result will be display on main Pass
button Red ball Log
Function On_Start
Test case: Click on Click on button Start in Screen Display capture Image, HSV image Pass
button Start and Laplace Image
Test case: Click on Click on button Start in Screen - Draw eclipse surround object Pass
button Start and and then mouse click on - Draw rectangle surround eclipse
mouse click to choose image - Send command to main Log
Object - Display Histogram
Test case: Click on Click on button Start in Screen - Draw circle surround red ball
button Start choose and click button Red Ball - Send command to main Log
button Red Ball Pass
Function calDegreeHorti
Test case: Click Click on Button Start and then The result will be display on main Pass
Mouse to select object mouse click to select object Log
Test case: Click on Click on button Red ball The result will be display on main Pass
button Red ball Log
Function WindowProc
Test case: when Click on Button Start and then - sendActivate = true Pass
message = WM_APP mouse click to select object - out_xy[0] = lParam
Test case: when Click on Button Start and then - sendActivate = true Pass
message = WM_APP mouse click to select object - out_xy[1] = lParam
Test case: when Click on Button Start and then - sendActivate = true Pass
message = WM_APP mouse click to select object - out_xy[2] = lParam
Test case: when Click on Button Start and then - sendActivate = true Pass
message = WM_APP mouse click to select object - out_xy[3] = lParam

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 8/15


Facilitate_Test Case\Company v1.0

Test case: when Click on Button Start and click - sendActivate = true Pass
message = WM_APP on Button Red Ball - out_xy[0] = lParam
Test case: when Click on Button Start and click - sendActivate = true Pass
message = WM_APP on Button Red Ball - out_xy[1] = lParam
Test case: when Click on Button Start and click - sendActivate = true Pass
message = WM_APP on Button Red Ball - out_xy[2] = lParam
Test case: when Click on Button Start and click - sendActivate = true Pass
message = WM_APP on Button Red Ball - out_xy[3] = lParam

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 9/15


Module
Code
Test Test circuit
requiremen Test all circuit used in
t system
Tester
Pass Fail N/A Number of Test cases
0 0 4 4

Test Case
ID Test Case Procedure Expected Output
Description
Cuircuit microprocessor

Circuit unl2803

Circuit RS232

Circuit ..

Circuit…
Result
TEST REPORT
Project Name <Project Name> Creator
Project Code <Project Code> Reviewer/Approver
Document Cod <Project Code>_Test Report_vx.x Issue Date <Date when this test report is created>
Notes <List modules included in this release> ex: Release 1 includes 2 modules: Module1 and Module2

No Module code Pass Fail Untested N/A Number of test cases


1 Step Motor Control 21 0 0 0 21
2 ImageProcessingPC 22 0 0 6 28
3 Module3 15 0 0 0 15
Sub total 58 0 0 6 64

Test coverage 100.00 %


Test successful coverage 100.00 %

dfsdfsdf

50% 50%

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 12/15


02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 13/15
dfsdfsdf

Step Motor
Control

0% 50% ImageProcessing
PC
Module3

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 14/15


Module3

02ae-BM/PM/HDCV/FSOFT v2/0 Internal use 15/15

Das könnte Ihnen auch gefallen