Guideline To Make and Understand Unit Test Case: 1. Overview
Guideline To Make and Understand Unit Test Case: 1. Overview
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
- To verify that number of Unit TC meets customer's requirement or not. User has to fill number LOC of tested function and fill value of 'Normal number test cases/KLO
- If the number of Unit TC does not meet the requirement, creator should explain the reasons.
- If the number of 'Normal number test cases/KLOC' item in FunctionList sheet is not recorded, the number in 'Lack of test cases' is not calculated.
Số tiền vay 0 triệu và < 10 triệu A9 <0 đồng B5 0 đồng C14 -1 đồng D5
>=10 triệu và >100 triệu A10 null B6 9,999,999 C15 empty D6
>=100 triệu và <200 triệu A11 100,000,000 C16
>=200 triệu và <500 triệu A12 199,999,999 C17
>= 500 triệu A13 200,000,000 C18
499,999,999 C19
500,000,000 C20
Kỳ hạn <= 6 tháng và >= 1 tháng A14 null B7 6 tháng C21 0 tháng D7
> 6 tháng A15 7 tháng C22
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
UTCID10
UTCID11
UTCID12
Condition Precondition
Input loanAmount,
Vay trên 6 tháng , SốTiền Empty ,Rank A Empty O
0 tháng ,500 triệu ,Rank B 500 triệu O
Điểm >10000 , Sốtiền >= 500 triệu , Kỳ hạn > 6 tháng 600 triệu, 7 tháng,lãi chuẩn 1.0 ,điểm 11000 O
Điểm >10000 , Sốtiền >= 500 triệu , Kỳ hạn < 6 tháng 600 triệu, 2 tháng,lãi chuẩn 1.0 ,điểm 10010 O
Điểm <1000 , Sốtiền <10 triệu , Kỳ hạn < 6 tháng điểm 999, 5 triệu,5 tháng lãi chuẩn 1.0 O
Điểm >=1000 và điểm 3000, 200 triệu,7 tháng lãi chuẩn 1.0
<5000 , Sốtiền >100
triệu v
à nhỏ 200 triệu , Kỳ
hạn > 6 tháng
O
Điểm >=1000 và điểm 3000, 800 triệu,5 tháng lãi chuẩn 1.0
<5000 , Sốtiền >500
triệu v
à nhỏ 200 triệu , Kỳ
hạn < 6 tháng
O
Exception
Log message
SốTiền không hợp lệ O
Tháng vay không hợp lệ O
Result Type(N : Normal, A : Abnormal, B : Boundary) B B A A A A
Passed/Failed
Executed Date
Defect ID
UTCID14
UTCID15
UTCID16
UTCID17
UTCID18
UTCID19
UTCID20
UTCID21