SWT Lab 3 Unit Testing Template 2 4 1
SWT Lab 3 Unit Testing Template 2 4 1
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 fo
'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
Record of change
Effective Date Version Change Item *A,D,M Change description
<Date when these changes
are effective>
Reference
<List of documents which are refered in this version.>
Requirement
No Name Class Name Function Name Function Code(Optional) Sheet Name
AccountDeleteCont
1 rol.java deleteAccount Function1 Function1
AccountEditControl
2 .java
AcoountManageCo AccountEdit Function2 Function2
3 ntrol.java getAllAccount Function3 Function3
4 AddControl.java AddAcount Function4 Function4
5 AdminControl.java AdminControl
AddcartControll.jav
6 a AddCartControl Function5
OrderListControl.ja
7 va OrderList Function6
8 OrderControl.java Order Function 15 Function7
Description Pre-Condition
UTCID01
Condition Precondition
Can connect with server
Can delete Account
Delete Button
choose Delete button O
Confirm Return
Manage_Account.jsp O
Exception
Log message
8.3
n>
Total Test Cases
1
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
Condition Precondition
Can connect with server
Edit Account
Username
"AnTran" O O
"anhdeptra" O O
"" O O
"$$$$$" O
PassWord
"1234" O
"anhdeptrai" O O O
"" O O
"^^^^^^" O
User is Seller?
choose User or Seller O O O O O
Register
choose Register
Confirm Return
Home O O O O
Exception
Log message
"vui long nhap lai" O O O
5.2
n>
Total Test Cases
7
UTCID01
Condition Precondition
Can connect with server
Dislay list Account
Confirm Return
Management_Account.jsp O
Exception
Log message
"success"
"input1 is null"
Result Type(N : Normal, A : Abnormal, B : Boundary) A
Passed/Failed P
Executed Date 0
1
Defect ID
D/
0
F
5I
D
0
0
1
29
n>
Total Test Cases
1
UTCID01
UTCID01
UTCID01
Condition Precondition
Can connect with server
Login with account admin
Confirm Return
Update Product O
Register Page O
Manager Account O
Exception
Log message
5.4
n>
Total Test Cases
3
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
Condition Precondition
Can connect with server
Edit Account
Username
"AnTran" O O
"anhdeptra" O O
"" O O
"$$$$$" O
PassWord
"1234" O
"anhdeptrai" O O O
"" O O
"^^^^^^" O
Select admin
Choose select admin O O
Sllect Seller
Choose Select Seller O O O O O
Button Edit Account
Confirm
Return
Maanager_accpunt.jsp O O O O O O O
Exception
Log message
Defect ID
D D D D D D D
F F F F F F F
I I I I I I I
D D D D D D D
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 2 3 4 5 6 7
Edit Account
UTCID01
UTCID02
UTCID02
UTCID02
UTCID02
UTCID02
UTCID07
UTCID08
UTCID09
Condition Precondition
a
-2 O
-1 O
0 O O O
1 O O
b
0 O O
-2 O O O
2 O
c
0 O
1 O O O
3 O
5 O
Confirm Return
list
null O O O
size = 0 O
{-1/2} O
{1,1} O
{1,-3} O
Exception
Log message
"please input a>= -1" O
-5
n>
Total Test Cases
15
UTCID10
UTCID11
UTCID12
UTCID13
UTCID14
UTCID15
UTCID01 UTCID02
Precondition
Condition
Can connect with server
Date
29 O O
30
31
Month
2 O
3 O
4
Year
2000 O
2009 O
Confirm Return
T O O
F
Exception
Log
message
"success"
"input1 is null"
Type(N : Normal, A : Abnormal, B :
Result Boundary) A N
Passed/Failed P P
Executed Date # #
Defect ID
Remove All Cart
Thế Mạnh
Search
Gundam Unicorn O
"" O
1 O
@ O
Abc
Button
"Search" O O O O
Confirm Return
Hiển thị hàng O O
Product cant find pls wait for the Shop
owner to update! O
IndexSearch.jsp O
Exception
Log
message
N B A N N N N N
P F F P P P P P
# # # # # # # #
A N N
P P
# # #
Date
29 O O
30
31
Month
2 O
3 O
4
Year
2000 O
2009 O
Confirm Return
T O O
F
Exception
Log
message
"success"
"input1 is
null"
Type(N : Normal, A : Abnormal, B :
Result Boundary) A N N N
Passed/Failed P P P P
Executed Date # # # #
Defect ID
Status Order
-5
N B A N N N N N
P F F P P P P P
# # # # # # # #
A N N
P P
# # #
Date
29 O O
30
31
Month
2 O
3 O
4
Year
2000 O
2009 O
Confirm Return
T O O
F
Exception
Log
message
"success"
"input1 is
null"
Type(N : Normal, A : Abnormal, B :
Result Boundary) A N N N
Passed/Failed P P P P
Executed Date # # # #
Defect ID
Update Cart Control
-5
N B A N N N N N
P F F P P P P P
# # # # # # # #
A N N
P P
# # #
UTCID01 UTCID02
Precondition
Condition
Can connect with server
Date
29 O O
30
31
Month
2 O
3 O
4
Year
2000 O
2009 O
Confirm Return
T O O
F
Exception
Log
message
"success"
"input1 is
null"
Type(N : Normal, A : Abnormal, B :
Result Boundary) A N
Passed/Failed P P
Executed Date # #
Update Control
-5
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
Condition Precondition
Can connect with server
Button "Register"
click O O O O O O O
Confirm Return
Home page O O
Register page O O O O O
Exception
Username is existed
Username must be between 3 and 8 characters
Password cannot start with a special character O
Password must be between 3 and 8 characters O
Username cannot start with a special character
Log message
Thông tin vị trí của lỗi trong mã nguồn
"Vui lòng không để trống trường này" O O O
Result Type(N : Normal, A : Abnormal, B : Boundary) N N A A A A A
Passed/Failed P F P F P P P
Executed Date 0 0 0 0 0 0 0
3 3 3 3 3 3 3
/ / / / / / /
0 0 0 0 0 0 0
4 4 4 4 4 4 4
Defect ID
0
on>
N/A/B Total Test Cases
8 0 10
UTCID08
UTCID09
UTCID10
O
O
O O O
O O O
O O O
O O
O
O
A A A
F F F
0 0 0
3 3 3
/ / /
0 0 0
4 4 4
UTCID01
UTCID02
UTCID03
UTCID04
Condition Precondition
Can connect with server
Exist data in database
Status "Preparing"
Status on List
Done O
Preparing O O
Button "Actions"
click O O O
Confirm Return
Status "Done" O O
Status "Preparing" O
Admin Page O
Exception
Log message
6
n>
Total Test Cases
4
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
Condition Precondition
Can connect with server
Exist product in cart
Full Name
Chu Huu Thanh O O O O O
"" O
a O
Phone Number "0989192643" O O O O O
123 O
"" O
Address Ha Noi O O O
"" O
123 O
Submit Order
click O O O O O O O
Cancel Order
click O O
Do you ưant to cancel order OK O
Huỷ O
Confirm Return
Thanks page O O
Error page
Cart page O
Exception Check out page O O O O O O
1
n>
Total Test Cases
9
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
Condition Precondition
Can connect with server
Button Edit
click O
Delete Button
click O O
Do you want to delete
Yes O O O O
No O O O
Back to Admin
click
Confirm Return
Add new product page O
Edit product page O
Manager page and this product is deleted O O O
Manager page and this product is not deleted O O O O
Admin page
Log message
-1
n>
Total Test Cases
11
UTCID10
UTCID11
N N
P P
0 0
3 3
/ /
0 0
4 4
UTCID01
UTCID02
Condition Precondition
Can connect with server
Button "Logout"
click O
Url
http://localhost:8080/GundamStore/logout O
Confirm Return
Home page O O
Exception
Log message
28
n>
Total Test Cases
2