You are on page 1of 72

Guideline to make and understand Unit Test Case

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

2. Content in Test function sheet


2.1 Combination of test cases.

- 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.

2.2 Condition and confirmation of Test cases.


Each test case is the combination of condition and confirmation.
a. Condition:
- Condition is combination of precondition and values of inputs.
- Precondition: it is setting condition that must exist before execution of the test case.
Example: file A is precondition for the test case that needs to access file A.
- Values of inputs: it includes 3 types of values: normal, boundary and abnormal.
. Normal values are values of inputs used mainly and usually to ensure the function works.
. Boundary values are limited values that contain upper and lower values.
. Abnormal values are non-expected values. And normally it processes exception cases.
- For examples:
Input value belongs to 5<= input <=10.
. 6,7,8,9 are normal values.
. 5, 10 are boundary values.
. -1, 11,... are abnormal values.
b. Confirmation:
- It is combination of expected result to check output of each function.
If the results are the same with confirmation, the test case is passed, other case it is failed.
- Confirmation can include:
+ Output result of the function.
+ Output log messages in log file.
+ Output screen message...
c. Type of test cases and result:
- Type of test case: It includes normal, boundary and abnormal test cases. User selects the type based on the type of input data.
- Test case result: the actual output results comparing with the Confirmation.
P for Passed and F for Failed cases.
It can 'OK' or 'NG' (it depends on habit of the teams or customers)

2.3. Other items:


- Function Code: it is ID of the function and updated automatically according to FunctionList sheet.
- Function Name: it is name of the function and updated automatically according to FunctionList sheet.
- Created By: Name of creator.
- Executed By: Name of person who executes the unit test
- Lines of code: Number of Code line of the function.
- Test requirement: Brief description about requirements which are tested in this function, it is not mandatory.
Normal number test cases/KLOC' item in FunctionList sheet, which is required by customer or normal value. The number of lacked TC is shown in 'Lack of test cases' item.
est cases' item.
UNIT TEST CASE

Project Name HIGHTECH SHOP Creator


Project Code ProjectSWP391 Reviewer/Approver
Issue Date
Document Code ProjectSWP391_XXX_vx.x
Version

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]

28/06/2023 N/A N/A M Modify:[ProjectSWP391/utils/Vadidate]

28-Jun-23 N/A N/A M Modify:[ProjectSWP391/dao/DAONews]


28-Jun-23 N/A N/A M Modify:[ProjectSWP391/dao/DAOCustomer]

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


ST CASE

Đỗ 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

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


eCustomer,CheckUsernameAndEmailExists,EditCustomer,UploadImageCustomer,InsertGuestCustomer

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


UNIT TEST CASE LIST
Project Name HIGHTECH SHOP
Project Code ProjectSWP391
Normal number of Test cases/KLOC 514
Test Environment Setup Description <List enviroment requires in this system
1. Server
2. Database
Requirement 3. Web Browser
Function
No Class Name Function Name Sheet Name Description
Name ... Code(Optional)
1 SendGmail isValidEmail >
Function1 Function1
generateOTP Function2 Function2
sendOTPToEmail Function3 Function3
2 DAOProduct searchProduct Function4 Function4
getProduct Function5 Function5
insertProduct Function6 Function6
updateProduct Function7 Function7
searchProductByCategory Function8 Function8
searchProductByBrand
searchProductByName Function9 Function9
searchProductByPriceRange Function10 Function10
searchProductByPriceGreater Function11 Function11
deleteProduct Function12 Function12
3 DAOBrand getTotalPages Function13 Function13
getBrand Function14 Function14
searchBrand Function15 Function15
insertBrand Function16 Function16
updateBrand
4 deleteBrand Function17 Function17
DAOCategory getCategory Function18 Function18
searchCategory Function19 Function19
insertCategory Function20 Function20
updateCategory Function21 Function21
5 DAOAdmin Function22 Function22
Function23 Function23
Function24 Function24
Function25 Function25

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


Function26 Function26
Function27 Function27
Function28 Function28
Function29 Function29

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


Pre-Condition

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


02ae-BM/PM/HDCV/FSOFT v2/1 Internal use 12/
UNIT TEST REPORT
Project Name HIGHTECH SHOP Creator
Project Code ProjectSWP391 Reviewer/Approver
Document Code ProjectSWP391_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 Function code Passed Failed Untested N A B Total Test Cases


1 Function1 5 1 0 5 1 0 6
2 Function2 2 7 0 2 6 1 9
3 Function3 1 3 0 1 3 0 4
4 Function4 1 2 0 1 2 2 3
5 Function5 3 0 0 1 2 2 3
6 Function6 6 0 0 6 0 0 6
7 Function7 6 0 0 1 5 5 6
8 Function8 5 1 0 2 1 1 6
9 Function9 1 4 0 1 1 1 5
10 Function10 3 0 0 3 0 0 3
11 Function11 6 0 0 3 2 2 6
12 Function12 3 0 0 3 0 0 3
13 Function13 3 0 0 3 0 0 5
14 Function14 1 4 0 1 3 3 5
15 Function15 1 4 0 1 3 3 5
16 Function16 3 1 0 1 3 3 4
17 Function17 2 2 0 1 3 3 4
18 Function18 2 1 0 2 1 1 3
19 Function19 3 0 0 1 2 2 3
20 Function20 3 0 0 3 0 0 3
21 Function21 5 0 0 1 4 4 5
22 Function22 6 0 0 1 5 5 6
23 Function23 3 0 0 1 2 2 3
24 Function24 4 0 0 4 0 0 4

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


25 Function25 3 0 0 3 0 0 3
26 Function26 8 0 0 8 0 0 8
27 Function27 5 0 0 1 2 2 5
28 Function28 5 0 0 4 1 1 5
29 Function29 2 0 0 2 0 0 2

Sub total 101 30 0 67 52 43 133

Test coverage 98.50 %


Test successful coverage 75.94 %
Normal case 50.38 %
Abnormal case 39.10 %
Boundary case 32.33 %

Passed Percent Test Type

23% 43

Passed 67 N
Failed A
Untested B

77%
52

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


Function Code Function1 Function Name isValidEmail
Created By Lê Ngọc Tuấn Minh Executed By Đỗ Văn Đạt
Lines of code 3 Lack of test cases -4.458
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
5 1 0 5 1 0 6

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

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


Log message
"Test case 'testCheckGmail' passed. Result: true" O
"Test case 'testCheckGmail' passed. Result: false" O O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N A A A A
Passed/Failed P F F F F
Executed Date 0 0 0 0 0
Defect ID 6 6 6 6 6
/ D/ D/ D/ D/
2 F2 F2 F2 F2
7 7
I 7
I 7
I 7
I
D D D D
0 0 0 0
0 0 0 0
1 2 3 4

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


Function Code Function2 Function Name generateOTP
Created By Lê Ngọc Tuấn Minh Executed By Đỗ Văn Đạt
Lines of code 8 Lack of test cases -4.888
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
2 7 0 2 6 1 9

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09
Condition Precondition

Return OTP

Confirm Return

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


T O O
F O O O O O O O
Exception
Error: java.lang.NullPointerException O
Log message
password more than 6 characters O O
contains at least one digit, one uppercas O O O O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A A A A N N B
Passed/Failed F F F F F F P P F
Executed Date 0 0 0 0 2 2 2 2
Defect ID 6 6 6 6 8 8 8 8
D/ D/ D/ D/ D/ D/ / / D
F2 F2 F2 F2 F0 F0 0 0 F
8
I 8
I 8
I 8
I 6
I 6
I 6 6 I
D D D D D/ D/ / / D
0 0 0 0 02 02 2 2 0
0 0 0 0 0 0 0 0 0
1 2 3 4 52 62 2 2 7
3 3 3 3

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


Function Code Function3 Function Name sendOTPToEmail
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 7 Lack of test cases -0.402
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 3 0 1 3 0 4

UTCID01

UTCID02

UTCID03

UTCID04
Condition Precondition
Can connect with server

Phone Number
1234567890 O
12a3456789 O
123-456-7890 O
null O

Confirm Return

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


T O
F O O O
Exception
Error: java.lang.NullPointerException O
Log message
Phone is full number O O

Result Type(N : Normal, A : Abnormal, B : Boundary) N A A A


Passed/Failed P F F F
Executed Date 0 0 0 0
Defect ID 6 6 6 6
/ D/ D/ D/
2 F2 F2 F2
8 8
I 8
I 8
I
D D D
0 0 0
0 0 0
1 2 3

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


Function Code Function4 Function Name searchProduct
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 6.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 2 0 1 2 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N A A


Passed/Failed F P F
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID
D D
F F
I I
D D
0 0
0 0
1 2

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


Function Code Function5 Function Name getProduct
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 6.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 1 2 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N A A


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID
D D
F F
I I
D D
0 0
0 0
1 2

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


Function Code Function6 Function Name insertProduct
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 3.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
6 0 0 6 0 0 6

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N N N N


Passed/Failed P P P P P P

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


Executed Date 0 0 0 2 0 2
Defect ID 6 6 6 8 6 8
/ / / / / /
2 2 2 0 2 0
8 8 8 6 8 6
/ /
2 2
0 0
2 2
3 3

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


Function Code Function7 Function Name updateProduct
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 3.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
6 0 0 1 5 0 6

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

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


T O
F O O O O O
Exception

Log message

Result Type(N : Normal, A : Abnormal, B : Boundary) A N A A A A


Passed/Failed P P P P P P
Executed Date 0 0 0 0 2 2
Defect ID 6 6 6 6 8 8
/ / / / / /
2 2 2 2 0 0
8 8 8 8 6 6
/ /
2 2
0 0
2 2
3 3

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


Function Code Function8 Function Name searchProductByCategory
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 6 Lack of test cases -2.916
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
5 1 0 2 1 3 6

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

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


Result Type(N : Normal, A : Abnormal, B : Boundary) B B A N N B
Passed/Failed P P F P P P
Executed Date 0 0 0 0 0 0
Defect ID 6 6 6 6 6 6
/ / D/ / / /
2 2 F2 2 2 2
8 8 8
I 8 8 8
D
0
0
1

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


Function Code Function9 Function Name searchProductByName
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 4.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 4 0 1 1 3 5

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

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


Result Type(N : Normal, A : Abnormal, B : Boundary) A N B B B
Passed/Failed F P F F F
Executed Date 0 0 0 0 0
Defect ID 6 6 6 6 6
D/ / D/ D/ D/
F2 2 F2 F2 F2
8
I 8 8
I 8
I 8
I
D D D D
0 0 0 0
0 0 0 0
1 2 3 4

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


Function Code Function10 Function Name searchProductByPriceRange
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 20 Lack of test cases 7.28
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 3 0 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function11 Function Name searchProductByPriceGreater
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 20 Lack of test cases 4.28
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
6 0 0 3 2 1 6

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

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


Exception
ERROR: Index:0, Size :0 O O O
Log message

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N A B A


Passed/Failed P P P P P P
Executed Date 0 0 0 0 2 2
Defect ID 6 6 6 6 8 8
/ / / D/ D/ D/
2 2 2 F2 F0 F0
8 8 8 8
I 6
I 6
I
D D/ D/
0 02 02
0 0 0
1 2 32
3 3

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


Function Code Function12 Function Name deleteProduct
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 19 Lack of test cases 6.766
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 3 0 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function13 Function Name getTotalPages
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 26 Lack of test cases 10.364
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 3 0 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function14 Function Name getBrand
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 26 Lack of test cases 8.364
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 4 0 1 3 1 5

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

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


Function Code Function15 Function Name searchBrand
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 27 Lack of test cases 8.878
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 4 0 1 3 1 5

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

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


Function Code Function16 Function Name insertBrand
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 12 Lack of test cases 2.168
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 1 0 1 3 0 4

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

Result Type(N : Normal, A : Abnormal, B : Boundary) A N A A


Passed/Failed F P P P
Executed Date 0 0 0 0
6 6 6 6
/ / / /
2 2 2 2
8 8 8 8

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


Defect ID

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


Function Code Function17 Function Name deleteBrand
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 17 Lack of test cases 4.738
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
2 2 0 1 3 0 4

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

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


Defect ID
D D
F F
I I
D D
0 0
0 0
1 2

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


Function Code Function18 Function Name getCategory
Created By Lê Ngọc Tuấn Minh Executed By Đỗ Văn Đạt
Lines of code 16 Lack of test cases 5.224
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
2 1 0 2 1 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) A N N


Passed/Failed F P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID
D
F
I
D
0
0
1

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


Function Code Function19 Function Name searchCategory
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 17 Lack of test cases 5.738
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 1 2 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) A N A


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function20 Function Name insertCategory
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 17 Lack of test cases 5.738
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 3 0 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function21 Function Name updateCategory
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 29 Lack of test cases 9.906
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
5 0 0 1 4 0 5

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

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


Executed Date 0 0 0 0 2
Defect ID 6 6 6 6 8
/ / / / /
2 2 2 2 0
8 8 8 8 6
/
2
0
2
3

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


Function Code Function22 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 28 Lack of test cases 8.392
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
6 0 0 1 5 0 6

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

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


Passed/Failed P P P P P P
Executed Date 0 0 0 0 2 2
Defect ID 6 6 6 6 8 8
/ / / / / /
2 2 2 2 0 0
8 8 8 8 6 6
/ /
2 2
0 0
2 2
3 3

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


Function Code Function23 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 17 Lack of test cases 5.738
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 1 2 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) A N A


Passed/Failed P P P
Executed Date 0 0 0
6 6 6
/ / /
2 2 2
8 8 8

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


Defect ID

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


Function Code Function24 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 12 Lack of test cases 2.168
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
4 0 0 4 0 0 4

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N N


Passed/Failed P P P P
Executed Date 0 0 0 0
6 6 6 6
/ / / /
2 2 2 2
8 8 8 8

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


Defect ID

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


Function Code Function25 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 12 Lack of test cases 3.168
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
3 0 0 3 0 0 3

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N

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


Passed/Failed P P P
Executed Date 0 0 0
Defect ID 6 6 6
/ / /
2 2 2
8 8 8

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


Function Code Function26 Function Name 0
Created By Lê Ngọc Tuấn Minh Executed By Đỗ Văn Đạt
Lines of code 16 Lack of test cases 0.224
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
8 0 0 8 0 0 8

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N N N N N N N


Passed/Failed P P P P P P P P
Executed Date 0 0 0 0 2 2 2 2
6 6 6 6 8 8 8 8
/ / / / / / / /
2 2 2 2 0 0 0 0
8 8 8 8 6 6 6 6
/ / /
2 2 2
02ae-BM/PM/HDCV/FSOFT v2/1 Internal use0 0 0 65/
Defect ID

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


Function Code Function27 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 24 Lack of test cases 7.336
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
5 0 0 1 2 2 5

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

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


Function Code Function28 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 27 Lack of test cases 8.878
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
5 0 0 4 1 0 5

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

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


Function Code Function29 Function Name 0
Created By Đỗ Văn Đạt Executed By Đỗ Văn Đạt
Lines of code 13 Lack of test cases 4.682
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
2 0 0 2 0 0 2

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

Result Type(N : Normal, A : Abnormal, B : Boundary) N N


Passed/Failed P P
Executed Date 0 0
6 6
/ /
2 2
8 8

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


Defect ID

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

You might also like