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
- 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.
Record of change
Effective Date Version Change Item *A,D,M Change description
27/06/2023 N/A N/A M Modify:[ProjectSWP391/utils/Vadidate]
Đỗ Văn Đạt
Phạm Đức Thắng
27/6/2023
Reference
CheckMail,CheckPassword
CheckPhone,CheckAccountAdmin,CheckAccountCustomer,CheckAccountGmailCustomer,CheckAccountGmailAdmin,ConvertMonthNumberToName
GetNewsDetail,SearchNews,SearchNewsById,SearchNewsGroup,GetRelatedNews,InsertNews,UpdateNews,DeleteNews
GetCustomer,GetTotalPages,SearchCustomer,GetCustomerUsername,InsertCustomer,UpdateCustomer,CheckLogin,ChangePassword,DeleteCustomer,CheckUsernameAn
23% 43
Passed 67 N
Failed A
Untested B
77%
52
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
Can connect with server
Email Address
minh123@gmail.com O
minh123@gmail O
@gmail.com O
minh@.com O
"" O
null O
Confirm Return
T O
F O O O O
Exception
java.lang.NullPointerException at utils.SendGmail.isValidEmail O
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
Condition Precondition
Return OTP
Confirm Return
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
Can connect with server
Phone Number
1234567890 O
12a3456789 O
123-456-7890 O
null O
Confirm Return
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
Username Admin
exist username O
new username O
empty O
Confirm Return
T O
F O O
Exception
Log message
username is exist! pls enter another O
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
Username Customer
exist username O
new username O
empty O
Confirm Return
T O
F O O
Exception
Log message
username is exist! pls enter another O
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
Gmail
(exist) sample@gmail.com O
(new) sample@gmail.com O
empty O
@gmail.com O
sample O
sample!@gmail.com O
Confirm Return
T O
F O O O O O
Exception
Log message
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
CheckAccountGmailAdmin
(exist) sample@gmail.com O
(new) sample@gmail.com O
null O
@gmail.com O
sample O
sample!@gmail.com O
Confirm Return
Log message
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
Can connect with server
Number of Month
0 O
13 O
null O O
5 O
10 O
-1 O
Confirm Return
MAY O
OCTOBER O
Thows exception O
Thows message O O O
Exception
Error : for input string "" O
Log message
Invalid value for MonthOfYear: 13 O
Invalid value for MonthOfYear: -1 O
Invalid value for MonthOfYear: 0 O
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
NewsId
0 O
1 O
null O O
-1 O
"string" O
Confirm Return
ObjectNews(id=1) O
Log Error Message O O O O
Thows Exception
Exception
ERROR: Index: 0 Size: 0 O
Log message
ERROR: -1 O
code - incompatible types: <nulltype> cannot be converted to int O
- incompatible types: java.lang.String cannot be converted to int O
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
Title
"H" -> string contain title of news O
null or empty O
string is not title of news O O
Confirm Return
Arraylist<News> containt title "H" O
Have no record of News O
View all News O
Exception
Log message
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
Can connect with server
Title
"sample title" -> string contain title of news O O
null or empty O O
string is not title of news O O O
Newsgroup Id
0 O O O
1 O O O
-1 O O O
Confirm Return
Arraylist<News> containt title "sample title" O
Have no record of News O
View all News O
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
News Group Id
0 O
1 O
-1 O O
Confirm Return
NewsGroup(id = 1) O
Have no record of News O O
Exception
Log message
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
News Id
0 O
correct news id O
-1 O
News Group Id O
get correct newsgroup id O
null or empty O O
Confirm Return
Arraylist<News>(Newsgroup_id = 1) O
Have no record of News O O
Exception
Log message
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
News
null O
News(0,"ex.jpg","ex","ex","",date,"ex",date) O
News(0,"ex.jpg","ex","ex","",not dat,"ex",date) O
News(0,"ex.jpg","ex","ex","",not dat,"ex",null) O O
News(1,"ex.jpg","ex","ex","",dat,"ex",date) O
Confirm Return
A News is add O
Thows exception O O O O
Exception
Error: java.lang.NullPointerException O
ERROR: Uncompilable code - incompatible typeO O O
Log message
A new News is add! O
A cannot add News! O O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A B A N
Passed/Failed F F F F P
Executed Date 0 0 0 0 2
6 6 6 6 8
/ / / / /
2 2 2 2 0
8 8 8 8 6
/
2
02ae-BM/PM/HDCV/FSOFT v2/1 Internal use0 41/
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
News
null O
News(0,0,"ex.jpg","ex","ex","",date,"ex",date) O
News(0,0,"ex.jpg","ex","ex","",not dat,"ex",date) O
News(0,0,"ex.jpg","ex","ex","",not dat,"ex",null) O O
News(1,1,"ex.jpg","ex","ex","",dat,"ex",date) O
Confirm Return
A News is updated O
Thows exception O O O O
Exception
Error: java.lang.NullPointerException O O O O
ERROR: Uncompilable code - incompatible typeO O O
Log message
A new News is updated! O
Cannot update News! O O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A B A N
Passed/Failed F F F F P
Executed Date 0 0 0 0 2
6 6 6 6 8
/ / / / /
2 2 2 2 0
8 8 8 8 6
/
2
02ae-BM/PM/HDCV/FSOFT v2/1 Internal use0 43/
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
Can connect with server
News
null O
1 O
0 O
-1 O O
Confirm Return
A News is deleted O
Thows exception O O O
Exception
Error: java.lang.NullPointerException O
Log message
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
Can connect with database
News
null O
1 O
0 O
-1 O O
Confirm Return
Customer(id = 1) O
Thows exception O O O
Thows message
Exception
Error: java.lang.NullPointerException O
ERROR: Index: 0 Size: 0 O
Log message
code - incompatible types: <nulltype> cannot be converted to int O
ERROR: -1 O
Result Type(N : Normal, A : Abnormal, B : Boundary) A N A A
Passed/Failed F P F P
Executed Date 0 0 0 0
6 6 6 6
/ / / /
2 2 2 2
8 8 8 8
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with database
News
0 O
10 O
-1 O
O
Confirm Return
1 O
-6 O
thows message O
Exception
expected: <0> but was:<214783647 O
Log message
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
News
null or empty O
"Đ" -> the name contain of customer O
the name is not contain of customer O
O
Confirm Return
Arraylist<Customer> containt name "Đ" O
Have no record of News O
View all News O
Exception
Log message
UTCID01
UTCID02
UTCID03
Condition Precondition
Connect with database
Username
dovandat: exist username O
"" : empty O
dovandat1611: not exist username O
O
Confirm Return
Customer() O
null O O
Exception
Log message
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
Customer
O
Customer(0,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","dovandat1611","Dovandat123@","Active")
O
Customer(0,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","dovandat","Dovandat123@","Active")
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","dovandat","dovandat12","Active") O
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","dovandat","dodat","Active") O O
ustomer(0,"Dat","0902121881",date,"sample@gmail.com",true,"HaNoi","dovandat1611","Dovandat123@","Active") O
Confirm Return
A Customer is added! O
Thows Message O O O O
Exception
Log message
Phone is full number O O O O
invalid gmail! O O
password more than 6 characters O O
username is exist! pls enter another username O O O
contains at least one digit, one uppercase letter, on O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A A N
Passed/Failed P P P P P
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
Condition Precondition
Can connect with server
Customer
O
Customer(1,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","dovandat1611","Dovandat123@","Active")
O
Customer(1,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","dovandat","Dovandat123@","Active")
Customer(1,"Dat","123a12@",date,"sample",true,"HaNoi","dovandat","dovandat12","Active") O
Customer(1,"Dat","123a12@",date,"sample",true,"HaNoi","dovandat","dodat","Active") O O
ustomer(0,"Dat","0902121881",date,"sample@gmail.com",true,"HaNoi","dovandat1611","Dovandat123@","Active") O
ustomer(1,"Dat","0902121881",date,"sample@gmail.com",true,"HaNoi","dovandat1611","Dovandat123@","Active") O
Confirm Return
A Customer is added! O
Thows Message O O O O
Exception
Log message
No Admin to update O
Phone is full number O O O O O O
invalid gmail! O O O
password more than 6 characters O O O
username is exist! pls enter another username O O O O
contains at least one digit, one uppercase letter, on O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A A A N
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with database
username
dovandat(exist username) O O
hightechstore123(do not exist username) O
passowrd O
Dovandat123@(correct password) O O
123(error password) O O
Confirm Return
null O O
Customer() O
Exception
Log message
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
Can connect with database
New Password
123 O O
Dovandat123@ O O
Re-New Password O
123 O O
Dovandat123@ O O
Confirm Return
T O
F O O O
Exception
Log message
UTCID01
UTCID02
UTCID03
Condition Precondition
Can connect with server
Customer ID
1 O
0 O
-1 O
O
Confirm Return
T O
F: Thows Message O O
Exception
Log message
Have no Admin is deleted O O
A Customer is deleted! O
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
Condition Precondition
Can connect with database
User name
dovandat O O O O
Dovandat123@ O O O O
Gmail O
dovandat O O
@gmail.com O O
dovandat!@gmail.com O O
dovandat1611@gmail.com O O
Confirm Return
T O
F O O O O O O O
Exception
Log message
User or gmail error O O O O O O O
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
Customer
O
Customer(1,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","","","")
Customer(1,"Dat","123a12@",date,"sample@gmail.com",true,"HaNoi","","","") O
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","","","") O
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","","","") O O
Customer(1,"Dat","0902121881",date,"sample@gmail.com",true,"HaNoi","","","") O
Confirm Return
Information is updated O
Thows Message O O O O
Exception
Log message
Phone is full number O O O O
invalid gmail! O O
contains at least one digit, one uppercase letter, on O O
Result Type(N : Normal, A : Abnormal, B : Boundary) B B A A N
Passed/Failed P P P P P
Executed Date 0 0 0 0 2
6 6 6 6 8
/ / / / /
2 2 2 2 0
8 8 8 8 6
/
2
02ae-BM/PM/HDCV/FSOFT v2/1 Internal use0 67/
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
Can connect with server
Customer
O
0,"Dat","123a12@",date,"dovandat1611@gmail.com",true,"HaNoi","dovandat1611@gmail.com","Dovandat123@","Active")
O
,"Dat","123a12@",date,"datdvhe161664@fpt.edu.vn",true,"HaNoi","datdvhe161664@fpt.edu.vn","Dovandat123@","Active")
O
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","sample@gmail.com","Dovandat123@","Active")
Customer(0,"Dat","123a12@",date,"sample",true,"HaNoi","sample@gmail.com","Dovandat123@","Active") O O
omer(0,"Dat","0902121881",date,"sample@gmail.com",true,"HaNoi","sample@gmail.com","Dovandat123@","Active")O
Confirm Return
A Customer is added! O
Thows Message O O O O
Exception
Log message
Phone is full number O O O O
contain gmail! O O
invalid gmail! O
username is exist! pls enter another username O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N N N A
Passed/Failed P P P P P
Executed Date 0 0 0 0 2
6 6 6 6 8
/ / / / /
2 2 2 2 0
8 8 8 8 6
/
2
02ae-BM/PM/HDCV/FSOFT v2/1 Internal use0 69/
Defect ID
UTCID01
UTCID02
Condition Precondition
Connect with server
Have a account customer
Image URL
"imgae.png" O
"" : empty O
Customer Id
1 O O O
Confirm Return
T O
default: "default.png" O
Exception
Log message
Avatar is update! O O