Professional Documents
Culture Documents
SWT Lab-3 Unit-Testing g2
SWT Lab-3 Unit-Testing g2
Record of change
Effective Date Version Change Item *A,D,M Change description
30/Oct/2023 1.0 Function Test List, Cover A Create Function List
Vu Hoang Long
Bui Minh Hoai
30/10/2023
Es_01
Reference
Requirement
No Class Name Function Name Function Code(Optional)
Name
6 Get Product By Key Words ProductDAO Get Product By Key Words FC-06
13 Show Bill Details Admin BillDAO Show Bill Details Admin FC-13
14 Show Bill Detail By Filter BillDAO Show Bill In Details By Filter FC-14
Connected to database
Update Product Allow user update product
Administrator Access
Connected to database
Delete Product Allow user delete product
Administrator Access
Connected to database
Get Product By Key Words
Allow user get product by key word
Access to home page
Connected to database
Sort Products Allow user sort products
Access to home page
Connected to database
Filter By Brand Allow user filter products by brand
Access to home page
Connected to database
Insert Bills Allow user insert bill
Administrator Access
Connected to database
Update Status Bill Allow user update status bill Administrator Access
Bill Status suites
Connected to database
Show Bill Detail Allow user show bill detail
Administrator Access
Connected to database
Show Bill Details for Admin
Allow admin view bill detail
Administrator Access
Connected to database
ShowBill Details by FilterAllow user show bill detail by filter
Administrator Access
Connected to database
Get All Brands Allow user get all brands
Administrator Access
Connected to database
Get All Brands By ID Allow user get all brands by ID Administrator Access
brand Defined
Connected to database
Get All Users Allow user get all users
Administrator Access
Connected to database
Get All Customer Allow user get all customer
Administrator Access
Connected to database
Get User By ID Allow user get user by ID
Administrator Access
Connected to database
Get Customer By Name Allow user get customer by name
Administrator Access
Connected to database
Insert user Allow admin insert user
Administrator Access
Connected to database
Ban User Allow admin ban user
Administrator Access
Connected to database
Insert Order Detail Allow user insert order details
Administrator Access
Connected to database
Insert Order Allow user insert order
Administrator Access
Connected to database
Get Order Detail By ID Allow user get order detail by ID
Administrator Access
Connected to database
Bill Equals Check bill have a right comparison
Administrator Access
Connected to database
GetBill ID Check Bill get right Bill ID
Administrator Access
Connected to database
Get CreatedDate Check Bill get right CreatedDate
Administrator Access
Connected to database
Get Status Bill Check Bill get right Status of Bill
Administrator Access
Connected to database
Order Detail Model Check Bill get right Order Detail
Administrator Access
Connected to database
Bill Builder Check Builder of Bill Model
Administrator Access
Connected to database
Get Order Bill Get Order Bill
Administrator Access
Connected to database
Set Bill Id Check Bill model can set Bill ID
Administrator Access
Connected to database
Set CreatedDate Bill Check Bill model can set Created Bil
Administrator Access
Connected to database
Set Status Bill Check Bill model can set Status of Bi
Administrator Access
6%
11%
N
Passed A
B
Failed
Untested 40% 54%
89%
Condition Precondition
id
quantity
brand_id
name
description
The Dell laptop is a sleek and powerful device, featuring cutting-edge technology and a user-friendly interface for optimal productiv
image_url
price
release_date
Confirm Return
Exception
Log message
Failed Unteste
2 0
UTCID01
Can connect with server O
Access to home page O
Access to dashboard O
76 O
68
1
13
73
48
1
2
MacBook Air 13 inch M1 2020 8CPU 7GPU 8GB/256GB
Laptop Dell Vostro 16 V5620 i5 1240P/16GB/512GB/16"FHD+
pple''s stylish, high-performance laptop, delivering a seamless user experience and exceptional power in a compact design
The Dell laptop is a sleek and powerful device, featuring cutting-edge technology and a user-friendly interface for optimal productivity
img/macbook-1.png
img/dell-vostro-1.png
784.6
992.6
2020-07-06
2022-11-21
T O
F
"successfully" O
"fail"
(N : Normal, A : Abnormal, B : Boundary) N
ed/Failed P
uted Date 1
0
/
2
9
UTCID03
UTCID04
UTCID05
O O O O
O O O O
O O O O
O
O O
O
O
O O
O O
O
O O
O
O O
O
O O
O
O O
O
O O
O
O O O
O
O O
O O
B N N N
F P P F
1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
UTCID01
UTCID02
UTCID05
UTCID03
UTCID04
Condition Precondition
Connected to database O O O O O
Administrator Access O O O O O
Image_url img/macbook-2020.png O O O O O
Brand_id 1 O O O
Release_id 2020-10-10 O O O O
10-10-2020 O
Confirm Return
T O O
F O O O
Exception
Log message
"INSERT A NEW PRODUCT SUCESSFUL" O O O O
"Http 500" O
Result Type(N : Normal, A : Abnormal, B : Boundary) N A A N N
Passed/Failed P P F P P
Executed Date 1 1 1 1 1
0 0 0 0 0
/ / / / /
2 2 2 2 2
9 9 9 9 9
UTCID01
UTCID02
UTCID05
UTCID03
UTCID04
Condition Precondition
Connected to database O O O O O
Administrator Access O O O O O
UnitPrice 1500.0 O O O O
-1500.0 O
Quantity In Stock 30 O O O O
-30 O
Confirm Return
T O O O O
F O
Exception
Log message
"Update Successful" O O O O
"Http 500" O
Result Type(N : Normal, A : Abnormal, B : Boundary) N A N A N
Passed/Failed P P P F P
Executed Date 1 1 1 1 1
0 0 0 0 0
/ / / / /
2 2 2 2 2
9 9 9 9 9
D
Defect ID F
I
D
0
0
1
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
Id 79 O
80 O
null O
Confirm Return
T O
F O O
Exception
Log message
"DELETE SUCESSFUL" O
"Http500" O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A N A
Passed/Failed P F F
Executed Date 1 1 1
0 0 0
/ / /
2 2 2
9 9 9
D D
Defect ID F F
I I
D D
0 0
0 0
1 2
UTCID01
UTCID02
UTCID03
Condition Precondition
- Connected to database O O O
Id
78 O O O
""
79
Confirm Return
T O
F O O
Exception
Log message
UTCID01
UTCID02
UTCID05
UTCID03
UTCID04
Condition Precondition
- Connected to database O O O O O
-Access to home page O O O O O
Keywords "" O O
"Mac" O O O
Size 76 O O
21 O
Confirm Return
T O O O O
F O
Exception
Log message
UTCID01
UTCID02
UTCID05
UTCID06
UTCID03
UTCID04
Condition Precondition
- Connected to database O O O O O O
Access to home page O O O O O O
Price
Product1:784.6 O O O O O
Product2:1158.2 O O O O O
Product3:1450 O O O O O
Release_date 2020-07-06 O O O O
2020-07-06 O O O O
2020-09-06 O O O O
Sort priceLowHigh O O
priceHighLow O O
latest O O
Confirm Return
T O O O O O O
F
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
-Access to home page O O O O
- Connected to database O O O O
Price
Product1:784.4 O O O O
Product2:1158.2 O O O O
Product3:1450 O O O O
Product4:2150.2 O O O O
Filter
Size:0(500-750) O
Size:1(750-1000) O
Size:2(1000-1500) O
Size:1(1500+) O
Confirm Return
T O O O O
F
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
-Access to home page O O O
- Connected to database O O O
Brand_id
Product1:1 O O O O
Product2:1 O O O O
Product3:1 O O
Filter
All(size:3) O
Brand1(size:3) O
All(size:2) O
Brand1(size:2) O
Confirm Return
T O O O O
F
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
Order
null O
"1" O O O
Status
null O
"shipped" O O O
User
null O O
"1" O O
BillDAO O
null O
Confirm Return
-1 O O O
1 O
Exception
Log message
Không insert O O
Đã insert O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A A
Passed/Failed P P P P
Executed Date 1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
Bill Status suites O O O O
Status
null O
"shipped" O O
"delivered" O
"-1"
BillId
null O
"1" O O
"2" O
"-2" O
Confirm Return
T O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID05
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
BillId
null O
"-1" O
"1" O
"abc" O
"" O
Confirm Return
Bill detail is empty O O O O
Bill detail is not empty O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID05
UTCID06
UTCID07
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O O O O
- Connected to database O O O O O O O
BillID
"78" O
null O
"abc" O O
"72" O O O
Status
"done" O
"process" O
"wait "
Confirm Return
T O O O
F O O O O
Exception
Log message
Show O O O O
Notfound O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A A A A A
Passed/Failed P P P P P P P
Executed Date 1 1 1 1 1 1 1
0 0 0 0 0 0 0
/ / / / / / /
2 2 2 2 2 2 2
9 9 9 9 9 9 9
Defect ID
O
O
A
P
1
0
/
2
9
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
Status
"Shipped" O
"Delivered" O
"1" O
"abc" O
Confirm Return
Show Bill Details O O
Empty List Bills O O
Exception
Log message
ShowList O O
Not found O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N A B
Passed/Failed P P P P
Executed Date 1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
Vector Brand
null O O
not null O
Brand
"2" O
"Dell" O
"5" O
"Acer" O
Confirm Return
T O O O
F O
Exception
Log message
Brand List O O O
Empty List O
Result Type(N : Normal, A : Abnormal, B : Boundary) B N N N
Passed/Failed P P P P
Executed Date 1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
brand Defined O O O
BrandID
"0" O
"2" O
"3" O
Brand Name
"Dell" O
"Lenovo" O
Confirm Return
T
F O O O
Exception
Log message
Found
Not found O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A A A
Passed/Failed F F F
Executed Date 1 1 1
0 0 0
/ / /
2 2 2
9 9 9
Defect ID
UTCID01
Condition Precondition
- Administrator Access O
- Connected to database O
UserID
Not null O
User(2, "customer1", "customer1", "Customer 1", "customer1@gmail.com", "0123456789", "FU-Hola", 1)
Confirm Return
T O
F
Exception
Log message
Not Null O
Null
Result Type(N : Normal, A : Abnormal, B : Boundary) N
Passed/Failed P
Executed Date 1
0
/
2
9
Defect ID
UTCID03
O O
O O
O
O
O O
O O
N N
P P
1 1
0 0
/ /
2 2
9 9
UTCID01
UTCID02
UTCID05
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
User Name
"" O
"admin" O O
"1" O
null O
Password
"" O O
"admin" O O
null O
Confirm Return
Exist O
Non-exist O O O O
Exception
Log message
Found O
Not found O O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A N A A A
Passed/Failed P P P P P
Executed Date 1 1 1 1 1
0 0 0 0 0
/ / / / /
2 2 2 2 2
9 9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
CustomerList
not null O
Username
"admin" O
"cus1"" O
Confirm Return
T O O
F O
Exception
Log message
Customer List O O
Empty List O
Result Type(N : Normal, A : Abnormal, B : Boundary) N B N
Passed/Failed P P P
Executed Date 1 1 1
0 0 0
/ / /
2 2 2
9 9 9
Defect ID
UTCID01
UTCID02
UTCID05
UTCID06
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O O O
- Connected to database O O O O O O
RoleId 1 O O O O O
0 O
username
null O O O
"Ngoc" O O O
Password "123456" O O O O
"" O O
Full Name "" O
"Nguyễn Hoàng Mai" O O O O
Email "" O O O
"nguyenhoangmai@gmail.com" O O O
Phone "0985567" O O O O
"" O O O
Address "HN" O O O O
null O O
Confirm Return
T O O O
F O O O O
Exception
Log message
Can not insert O O O
Inserted O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) A N N N A A
Passed/Failed F P F P P P
Executed Date 1 1 1 1 1 1
0 0 0 0 0 0
/ / / / / /
2 2 2 2 2 2
9 9 9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
BrandID
"null" O
"0" O
"2" O
"3" O
Confirm Return
T O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
Name
null O
"0" O
"" O
"cus1" O
Confirm Return
T O
F O O O
Exception
Log message
Found O
No found O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N N N
Passed/Failed P P P P
Executed Date 1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
User ID
7 O
1 O
"abc" O
-1 O
Confirm Return
T O
F O O O
Exception
Log message
Not ban O O O
banned O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N A A
Passed/Failed P P P P
Executed Date 1 1 1 1
0 0 0 0
/ / / /
2 2 2 2
9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
Product Quantity 0 O
1 O O O
-1 O
Product ID null O
1 O O O
-4 O
Order ID null
3 O O O O
-2 O
Price
-120000 O
12000 O O O O
0
Confirm Return
T O O O
F O O
Exception
Log message
Inserted O O O
Can be inserted O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N A N N
Passed/Failed P P F P P
Executed Date 1 1 1 1 1
0 0 0 0 0
/ / / / /
2 2 2 2 2
9 9 9 9 9
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID04
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
id
null O
"0" O
"1" O
"-1" O
"78" O
user_id
null O O O O
"12" O
created_date
null O O O O
"2023-07-13" O
Confirm Return
T O
F O O O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID05
UTCID06
UTCID03
UTCID04
UTCID07
Condition Precondition
- Administrator Access O O O O O O O
- Connected to database O O O O O O O
Quantity
null O O O O O
"0" O
"1" O
"2"
"-1"
product_id
null O
"0" O O O
"1" O O
"-1" O
order_id
null O
"0" O O
"1" O O O
"-1" O
price
null O O O
"0" O
"-10" O
"10" O O
Confirm Return
T O
F O O O O O O
Exception
Log message
Defect ID
O
O
N
P
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
- Product Categories Defined O O O O O
Order_id
null O
"0" O
"78" O
"77" O
"-1" O
product_quantity
null O O O O
"2" O
Product_id
null O O O O
"6" O
Confirm price
null O O O O
"2551.2" O
Return
T O
F O O O O
Exception
Passed/Failed P P P P P
Executed Date 1 1 1 1 1
0 0 0 0 0
/ / / / /
2 2 2 2 2
9 9 9 9 9
UTCID01
UTCID02
Condition Precondition
- Administrator Access O O
- Connected to database O O
- Product Categories Defined O O
Confirm Return
T O
F O
Exception
Log message
Defect ID
UTCID01
UTCID02
Condition Precondition
- Administrator Access O O
- Connected to database O O
Bills
null O
id=1, created_date=null, status=null, order=null, user=null O
Confirm Return
T O
F O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
Bills
null O
id=1, created_date=null, status=null, order=null, user=null O
id=1, created_date="2023-2-2", status=null, order=null, user=1 O
Confirm Return
T O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
ID
"1" O
null O
"abc" O
"-1" O
Confirm Return
T O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
Created Date
"1" O
null O
"2023-09-08" O
"2121-09-09" O
"1990-09-08" O
Confirm Return
T O O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
Status
"" O
null O
"delivered" O
Confirm Return
T O O O
F
Exception
Log message
Defect ID
UTCID01
UTCID02
Condition Precondition
- Administrator Access O O
- Connected to database O O
Order
null O
id=1, created_date="2022-07-09", status="wait", order=3, user=1 O
Confirm Return
T O
F O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
- Administrator Access O O O O
- Connected to database O O O O
ID
"1" O
null O
"abc" O
"-1" O
Confirm Return
T O O
F O O
Exception
Log message
Defect ID
ID
"1" O
null O
"abc" O
Confirm Return
T O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
- Administrator Access O O O O O
- Connected to database O O O O O
Created Date
"1" O
null O
"2023-09-08" O
"2121-09-09" O
"1990-09-08" O
Confirm Return
T O O O
F O O
Exception
Log message
Defect ID
UTCID01
UTCID02
UTCID03
Condition Precondition
- Administrator Access O O O
- Connected to database O O O
Status
"" O
null O
"delivered" O
Confirm Return
T O O O
F
Exception
Log message
Defect ID
UTCID01
UTCID02
Condition Precondition
- Administrator Access O O
- Connected to database O O
Order
null O
id=1, created_date="2022-07-09", status="wait", order=3, user=1 O
Confirm Return
T O
F O
Exception
Log message
Defect ID