Professional Documents
Culture Documents
1. Overview
- In the template, Unit test cases are based on functions. Each sheet presents test cases for one function.
- Cover: General information of the project and Unit Test cases
- FunctionList: The list of Classes and Functions in the document.
+ To control that the number of Unit TC meets customer's requirement or the norm, user should fill value for
'Normal number of Test cases/KLOC'.
+ Click on Function link to open the related Test cases of the function.
Note: You should create new Function sheet before creating the link
- Test Report: provive the overview results of Functions Unit test: Test coverage, Test successful coverage
(Summary, for normal/abnormal/boundary cases)
Note: Should check the formula of "Sub Total" if you add more functions
Yêu cầu:
Thiết kếUnit Test case cho phần code dưới đây theo phương pháp White box testing (Path
coverage).
Vẽra sơ đồ(Ko cần phải show), comment trong code của từng test cases.
VD: Test case 1: A-> B -> C->D
i++)
Condition Valid partition Tag Invalid partition Tag Valid boundary Tag
Input number 1-6 chars A1 >6 chars C1 6 chars D1
in 0-9 digits A2 <1 char C2 1 char D2
in A-F chars A3 not in A-F char C3
in a-f chars A4 not in a-f char C4
null C5
not in 0-9 digits C6
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
UTCID10
UTCID11
UTCID12
UTCID13
UTCID14
UTCID15
UTCID16
UTCID17
UTCID18
Condition Precondition
Input number
has valid char in 1-6 chars, digit 0-9, and in A-F char 015A O
has valid char in 1-6 chars, digit 0-9, and in a-f char 0022f O
has valid 6 chars, digit 0-9, and in A-F char 12345A O
has valid 6 chars, digit 0-9, and in a-f char 12345d O
input only 1 char A-F char A O
input only 1 char a-f char f O
input value is empty O
input valid 1-6 chars, not in 0-9, and in A-F 012-1F O
input valid 1-6 chars, not in 0-9, and in a-f 49-7a O
input valid 7 chars, in 0-9, and in A-F,in a-f 9284aF8 O
input valid 1-6 chars, digit 0-9, and not in A - F 1H O
input valid 1-6 chars, digit 0-9, and not in a - f 1g O
Confirm Return
output text show 346 O
output text show 559 O
output text show 1193050 O
output text show 1193053 O
error dialog is shown O
output text show 15 O
Exception
UTCID20
UTCID21
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
UTCID10
UTCID11
UTCID12
UTCID13
UTCID14
UTCID15
Conditio Precondition 0 O
9 O
a O
f O
Input1 A O
F O
d O
E O
Input2 m O
-1 O
Confirm Return 0 O
9 O
10 O
15 O
10 O
15 O
13 O
14 O
Exception