0% found this document useful (0 votes)
35 views67 pages

Lab3 VuDucTrong HE171724

The document provides guidelines for creating and understanding unit test cases, focusing on the structure and requirements for testing functions within a project. It outlines the necessary components such as test case combinations, conditions, confirmations, and reporting results, including coverage metrics. Additionally, it emphasizes the importance of documenting the testing process and ensuring that the number of test cases meets customer requirements.

Uploaded by

trong10403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views67 pages

Lab3 VuDucTrong HE171724

The document provides guidelines for creating and understanding unit test cases, focusing on the structure and requirements for testing functions within a project. It outlines the necessary components such as test case combinations, conditions, confirmations, and reporting results, including coverage metrics. Additionally, it emphasizes the importance of documenting the testing process and ensuring that the number of test cases meets customer requirements.

Uploaded by

trong10403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 67

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 num
- 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.
t 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.
of test cases' item.
UNIT TEST CASE

Project Name <Project Name> Creator


Project Code <Project Code> Reviewer/Approver
Issue Date
Document Code <Project Code>_XXX_vx.x
Version

Record of change
Effective Date Version Change Item *A,D,M Change description
<Date when these changes
are effective>

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


CASE

<Date when this test report is created>

Reference
<List of documents which are refered in this version.>

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


UNIT TEST CASE LIST
Project Name <Project Name>
Project Code <Project Code>
Normal number of Test cases/KLOC 100
Test Environment Setup Description <List enviroment requires in this system

Requirement
No Class Name Function Name Function Code(Optional) Sheet Name
Name
1 Class1 Function A Function1 Function1
2 Class2 Function B Function2 Function2
3 Class3 Function C Function3 Function3

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


LIST

stem

Description Pre-Condition

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


UNIT TEST REPORT
Project Name Librarian Creator trongvdhe171724
Project Code <Project Code> Reviewer/Approver
Document Code <Project Code>_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


1 CarManagerTest 16 0 0 16 0 0
2 ClassroomManagerTest 2 0 0 2 0 0
3 ClassroomTest 7 0 0 7 0 0
4 ControllerTest 12 0 0 12 0 0
5 CountryManagerTest 10 0 0 10 0 0
6 CountryTest 4 0 0 4 0 0
7 CourseTest 8 0 0 8 0 0
8 DoctorManagementTest 8 0 0 8 0 0
9 DoctorTest 11 0 0 11 0 0
10 EastAsiaCountriesTest 4 0 0 4 0 0
11 PatientManagementTest 8 0 0 8 0 0
12 PatientTest 7 0 0 7 0 0
13 PersonHashTest 6 0 0 6 0 0
14 SheduleManagerTest 2 0 0 2 0 0
15 ScheduleTest 6 0 0 6 0 0
16 StudentManagerTest 7 0 0 7 0 0
17 StudentTest 7 0 0 7 0 0
18 TeacherManagerTest 3 0 0 3 0 0
19 TeacherTest 3 0 0 3 0 0
20 ValidationTest 6 0 0 6 0 0
Sub total 137 0 0 137 0 0

Test coverage 99.00 %


Test successful coverage 99.00 %
Normal case 99.00 %

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


Abnormal case 0.00 %
Boundary case 0.00 %

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


trongvdhe171724

en this test report is created>


dule2

Total Test Cases


16
2
7
12
99
4
8
8
11
4
8
7
6
2
6
7
7
3
3
6
226

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


02ae-BM/PM/HDCV/FSOFT v2/1 Internal use 13/
Function Code CM01 Function Name CarManagerTest
Created By trongvdhe171724 Executed By
Lines of code 72 Lack of test cases -8.8
Test requirement Check out the methods of the Book class
Passed Failed Untested N/A/B
16 0 0 16 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09
Condition Precondition
testAddCar O
testRemoveCar O
testUpdateCar O
testSetCarAvailability O
testCalculateInventoryValue O
testGetAverageMileage O
testGetAveragePrice O
testFindCarsInPriceRange O
testCountTotalCars O
testIncreaseMileageForAllCars
testClearInventory
testFindCarsOlderThan
testUpdatePriceForBrand
testFindCarsWithLowMileage

Input1
"Ford Fusion, 2022" O
"Toyota Camry" O O
"Honda Civic, Blue" O
None O O O O
20000.0, 25000.0 O

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


5000
"Toyota", 27000.0
false
20000

Expected Result
"3 cars, "Fusion" present O
1 car, "Camry" not present O
Color updated to Blue O
Availability false O
45000 O
17500 O
22500 O
2 cars O
"Camry" 20000, "Civic" 25000 O
0 cars
"Camry" present
1 car, "Civic"

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


Passed/Failed P P P P P P P P P
Executed Date 0 0 0 0 0 0 0 0 0
6 6 6 6 6 6 6 6 6
Defect ID
/ / / / / / / / /
1 1 1 1 1 1 1 1 1
6 6 6 6 6 6 6 6 6

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


t

-8.8

Total Test Cases


16
UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

UTCID16

UTCID17

UTCID18
O
O
O
O
O

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


O
O
O Test Case
O testAddCar
testRemoveCar
testUpdateCar
testSetCarAvailability
testCalculateInventoryVal
ue
testGetAverageMileage
testGetAveragePrice
testFindCarsInPriceRange
testCountTotalCars

O
O
O O O

N N N N N N N N N
P P P P P P P P P
0 0 0 0 0 0 0 0 0
6 6 6 6 6 6 6 6 6
/ / / / / / / / /
1 1 1 1 1 1 1 1 1
6 6 6 6 6 6 6 6 6

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


Precondition Input1 Expected Result
CarManager initialized with
"Ford Fusion, 2022" 3 cars in inventory, "Fusion" present
2 cars
CarManager initialized with
"Toyota Camry" 1 car in inventory, "Camry" not present
2 cars
CarManager initialized with
"Honda Civic, Blue" "Civic" color updated to Blue
2 cars
CarManager initialized with
"Toyota Camry" "Camry" availability set to false
2 cars
CarManager initialized with
None Total inventory value is 45000.0
2 cars
CarManager initialized with
None Average mileage is 17500.0
2 cars
CarManager initialized with
None Average price is 22500.0
2 cars
CarManager initialized with
20000.0, 25000.0 2 cars in price range, "Camry", "Civic"
2 cars
CarManager initialized with
None Total car count is 2
2 cars

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


Actual Result Log Message
3 cars, "Fusion" present Test passed
1 car, "Camry" not present Test passed
Color updated to Blue Test passed
Availability false Test passed
45000 Test passed
17500 Test passed
22500 Test passed
2 cars, "Camry", "Civic" Test passed
2 cars Test passed

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


Function Code CR01 Function Name
Created By trongvdhe171724 Executed By
Lines of code 6 Lack of test cases
Test requirement Check out the methods of the AuditLog class
Passed Failed Untested
2 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06
Condition Precondition
testGetClassroomId O
testGetClassName O
testGetTeacher O
testGetCourses O
testAddCourse O
testRemoveCourse O
testToString

Input1
CL001 O
Math 101 O
"Classroom{"
"Calculus", +
C001,
"classroomId='CL001'," +
4 O O O
" className='Math 101'," +
" teacher=" + teacher +
", courses=[]" +
'}';
teacher O
Confirm

Expected Result
Add successfully O
Remove success O

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


Classroom{" +
"classroomId='CL001'," +
" className='Math 101'," +
" teacher=" + teacher +
", courses=[]

Log message

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


Passed/Failed P P P P P P
Executed Date 0 0
6 6
Defect ID
/ /
1 1
6 6

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


ClassroomTest
trongvdhe171724
-1.4

N/A/B Total Test Cases


2 0 0 2
UTCID07

UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


O

N
P

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


Function Code CM01 Function Name
Created By trongvhde171724 Executed By
Lines of code 6 Lack of test cases
Test requirement Check out the methods of the AudioBook class
Passed Failed Untested
7 0 0

UTCID01

UTCID02

UTCID03

UTCID04
Condition
testAddClassroom O
testGetAllClassrooms O

Precondition
ClassroomManager initialized O O
Teacher "John Doe" O O
Teacher "Jane Smith" O
Input1
Classroom "CL001", "Math 101", Teacher1 O
Classroom "CL002", "Physics 101", Teacher2 O

Expected Result
Classroom added successfully O
All classrooms returned correctly O

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

Passed/Failed P P

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


Executed Date 0 0
6 6
/ /
1 1
6 6
Defect ID

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


ClassroomManagerTest
trongvhde171724
-6.4

N/A/B Total Test Cases


7 0 0 7
UTCID05

UTCID06

UTCID07

UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


02ae-BM/PM/HDCV/FSOFT v2/1 Internal use 27/
Function Code CT01 Function Name ControllerTest
Created By trongvdhe171724 Executed By
Lines of code 72 Lack of test cases -4.8
Test requirement Check out the methods of the Book class
Passed Failed Untested N/A/B Tot
12 0 0 12 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09

UTCID10
Condition Precondition
testRemoveStudent O
testAddTeacher O
testRemoveTeacher O
testAddClassroom O
testRemoveClassroom O
testAddCourse O
testRemoveCourse O
testAddSchedule O
testRemoveShedule O
testGetAllClassroom O
testGetAllCourses

Input1
S001 O
Dr. Bob White, "321 Elm St", "555-
4321", "T002", "Physics"
O O
T001 O
CL002", "Physics 101 O
CL001 O
C002 O
C001 O
Expected Result
Remove Student Done O

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


Add Teacher Done O
Remove Teacher Done O
Add Class Done O
Remove Class O
Add Course Done O
Remove Course Done O

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


Passed/Failed P P P P P P P P P P
Executed Date 0 0 0 0 0 0 0 0 0 0
6 6 6 6 6 6 6 6 6 6
Defect ID
/ / / / / / / / / /
1 1 1 1 1 1 1 1 1 1
6 6 6 6 6 6 6 6 6 6

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


-4.8

Total Test Cases


12
UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

UTCID16

UTCID17

UTCID18

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


O

N N N N N N N N
P P P P P P P P
0 0 0 0 0 0 0 0
6 6 6 6 6 6 6 6
/ / / / / / / /
1 1 1 1 1 1 1 1
6 6 6 6 6 6 6 6

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


Function Code CM02 Function Name
Created By trongvdhe171724 Executed By
Lines of code 33 Lack of test cases
Test requirement Check out the methods of the EBook class
Passed Failed Untested
10 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06
Condition Precondition
testGetFileSize O
testDisplayInfo O
testGetTitle O
testGetAuthor O
testGetFormat O
testGetPublicationDate O
Input1
25 O
"Digital Transformation" O
"John Doe" O
"PDF" O
new Date() O
Input2

Confirm Actual Result


25 O
"Digital Transformation" O
"John Doe" O
"PDF" O
new Date() O
Expected Result
25 O

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


"Digital Transformation" O
"John Doe" O
"PDF" O
Log message new Date() O

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

Passed/Failed P P P P P P
Executed Date 0 0 0 0 0 0
6 6 6 6 6 6
Defect ID
/ / / / / /
1 1 1 1 1 1
6 7 7 7 7 7

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


CountryManagerTest
trongvdhe171724
-6.7

N/A/B Total Test Cases


10 0 0 10
UTCID07

UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


N N N N A N N

P P P P F P P

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


Function Code CT02 Function Name CountryTest
Created By trongvdhe171724 Executed By trongvdhe171724
Lines of code 18 Lack of test cases -2.2
Test requirement Check out the methods of the Event class
Passed Failed Untested N/A/B Total Test Cases
4 0 0 4 0 0 4

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09

UTCID10

UTCID11
Condition Precondition
testGetName O
testGetDescription O
testGetDate O
testGetLocation O
testSetName O
testSetDescription O
testSetDate O
testSetLocation O

Input1
"Book Fair" O
"Annual book fair event" O
initialDate O
"Main Hall" O

Input2
"New Book Fair" O
"New description" O
new Date() O
"New Location" O

Confirm Actual Result


"Book Fair" O
"Annual book fair event" O

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


initialDate O
"Main Hall" O
"New Book Fair" O
"New description" O
new Date() O
"New Location" O
Expected Result
"Book Fair" O
"Annual book fair event" O
initialDate O
"Main Hall" O
"New Book Fair O
"New description" O
new Date() O
"New Location" O
Log message

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

Passed/Failed P P P P P P P P P P P
Executed Date 0 0 0 0 0 0 0 0
6 6 6 6 6 6 6 6
Defect ID
/ / / / / / / /
1 1 1 1 1 1 1 1
6 6 6 6 7 7 7 7

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


-2.2

Total Test Cases


4
UTCID12

UTCID13

UTCID14

UTCID15

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


N A N N

P F P P

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


Function Code C01 Function Name CourseTest
Created By trongvdhe171724 Executed By trongvdhe171724
Lines of code 7 Lack of test cases -
Test requirement Check out the methods of the EventManager class
Passed Failed Untested N/A/B
8 0 0 8

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07
Condition Precondition
testAddEvent O
testGetEvents O
testGetEventsByLocation O
testGetEventsByLocationCaseInsensitive O
testGetEventsByLocationNoMatch O

Input1
("Book Fair", "Annual book fair event", new Date(), "Main Hall") O O O O

Input2
("Reading Session", "Monthly reading session", new Date(), "Conference Room") O

Confirm Actual Result


1 O O O
"Book Fair" O O O O O

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


2 O
"Reading Session" O
"Book Fair"
"Reading Session" O O
0
"Annual book fair event" O O O
"Main Hall" O O O O O
"Monthly reading session" O O
"Conference Room" O O
Expected Result
1 O O O
"Book Fair" O O O O O
2 O
"Reading Session" O
"Book Fair"
"Reading Session" O O
0
"Annual book fair event" O O O
"Main Hall" O O O O O
"Monthly reading session" O O
"Conference Room" O O
Log message

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

Passed/Failed P P P P P P P
Executed Date 0 0 0 0 0
6 6 6 6 6
Defect ID
/ / / / /
1 1 1 1 1
6 6 6 6 7

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


CourseTest
trongvdhe171724
-7.3

N/A/B Total Test Cases


0 0 8
UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


N N N N N A N N

P P P P P F P P

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


Function Code DM01 Function Name
Created By trongvdhe171724 Executed By
Lines of code 24 Lack of test cases
Test requirement Check out the methods of the Library class
Passed Failed Untested
8 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05
Condition Precondition
testLibraryInitialization O
testAddBook O
testRegisterMember O
testRegisterPublisher O
testBorrowBook O
testBorrowBookNonexistentBook
testBorrowBookNonexistentMember
testReturnBook
testReturnBookNonexistent
testGetAvailableBooks

Input1 new Library() O O O O O


new Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O O
new Book("1984", "George Orwell", "987654321", new Date(), 0) O O O
new Member("John Doe", "001", false) O O O
new Publisher("Penguin Books", "123 Main St", "123-456-7890") O
new Category("Fiction", "Fictional books") O

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


Input2

Confirm Actual Result


Non-null objects O
1 book O
1 member O
1 publisher O
true, false O
FALSE
FALSE
true, true
FALSE
1 book

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


Expected Result
Non-null objects O
1 book O
1 member O
1 publisher O
true, false O
FALSE
FALSE
true, true
FALSE
1 book

Log message

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

Passed/Failed P P P P P
Executed Date 0 0 0 0 0
6 6 6 6 6
Defect ID
/ / / / /
1 1 1 1 1
6 6 6 6 6

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


DoctorManagementTest
trongvdhe171724
-5.6

N/A/B Total Test Cases


8 0 0 8
UTCID06

UTCID07

UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

UTCID16

UTCID17

UTCID18
O
O
O
O
O

O O O O O

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


O
O
O
O
O

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


O
O
O
O
O

N N N N N

P P P P P
0 0 0 0 0
6 6 6 6 6
/ / / / /
1 1 1 1 1
6 6 6 6 6

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


Function Code D001 Function Name DoctorTest
Created By trongvdhe171724 Executed By trongvdhe171724
Lines of code 25 Lack of test cases -8
Test requirement Check out the methods of the Loan class
Passed Failed Untested N/A/B
11 0 0 11

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07
Condition Precondition
testGetBook O
testGetMember O
testGetLoanDate O
testIsReturned O
testReturnBook O

Input1
Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O O O O O
Member("John Doe", "001", false) O O O O O
new Date() O O O O O

Input2

Confirm Actual Result


Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O O O O O
Member("John Doe", "001", false) O O O O O

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


new Date() O O O O O

Expected Result
Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O O O O O
Member("John Doe", "001", false) O O O O O
new Date() O O O O O

Log message

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

Passed/Failed P P P P P
Executed Date 0 0 0 0 0
6 6 6 6 6
Defect ID
/ / / / /
1 1 1 1 1
6 6 6 6 7

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


DoctorTest
trongvdhe171724
-8.5

N/A/B Total Test Cases


0 0 11
UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


N N N N A N N

P P P P F P P

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


Function Code EAC01 Function Name
Created By trongvdhe171724 Executed By
Lines of code 13 Lack of test cases
Test requirement Check out the methods of the LoanManager class
Passed Failed U
4 0

UTCID01
Condition Precondition
testAddLoan O
testGetLoansByMember
testGetOverdueLoans
testSendOverdueNotifications

Input1
new Loan(book, member, new Date()) O
new Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O
new Member("John Doe", "001", false) O
new Date(System.currentTimeMillis() - 15 * 24 * 60 * 60 * 1000L)

Input2
new Book("1984", "George Orwell", "987654321", new Date(), 0), new Member("Jane Smith", "002", true), new Date());

Confirm Actual Result


new Loan(book, member, new Date()) O
new Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O

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


new Member("John Doe", "001", false) O
new Date(System.currentTimeMillis() - 15 * 24 * 60 * 60 * 1000L)
new Book("1984", "George Orwell", "987654321", new Date(), 0), new Member("Jane Smith", "002", true), new Date());

Expected Result
new Loan(book, member, new Date()) O
new Book("The Great Gatsby", "F. Scott Fitzgerald", "123456789", new Date(), 0) O
new Member("John Doe", "001", false) O
new Date(System.currentTimeMillis() - 15 * 24 * 60 * 60 * 1000L)
new Book("1984", "George Orwell", "987654321", new Date(), 0), new Member("Jane Smith", "002", true), new Date());

Log message

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

Passed/Failed P
Executed Date 0
6
Defect ID
/
1
6

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


Function Name EaseAsiaCountriesTest
Executed By trongvdhe171724
Lack of test cases -2.7

Untested N/A/B Total Test Cases


0 4 0 0 4
UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15
O
O
O

O O O
O O O
O O O
O O

O O O
O O O

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


O O O
O O
O

O O O
O O O
O O O
O O
O

N N N N N N N A N N

P P P P P P P F P P
0 0 0
6 6 6
/ / /
1 1 1
6 6 6

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


Function Code PM01 Function Name PatientManagementTest
Created By trongvdhe171724 Executed By trongvdhe171724
Lines of code 23 Lack of test cases
Test requirement Check out the methods of the Member class
Passed Failed Untested N/A/B
8 0 0 8

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07
Condition Precondition
testGetName O
testGetMemberId O
testIsPriorityMember O
testUpgradeToPriority O
testDowngradeToRegular O
testGetBorrowedBooksCount O
testIncrementBorrowedBooks O
testResetBorrowedBooksCount
testCanBorrowMoreBooks
testPayFine
Input1
"John Doe" O
"001" O
FALSE O O
TRUE O O
0 O
10.0
1 O O
Input2

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


Confirm Actual Result
"John Doe" O
"001" O
FALSE O O
true O O
1 O O
0 O
10.0

Expected Result
"John Doe" O
"001" O
FALSE O O
true O O
1 O O
0 O
10.0

Log message

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

Passed/Failed P P P P P P P
Executed Date 0 0 0 0 0 0 0
6 6 6 6 6 6 6
/ / / / / / /
1 1 1 1 1 1 1
6 6 6 6 7 7 7

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


Defect ID

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


PatientManagementTest
trongvdhe171724
-5.7

N/A/B Total Test Cases


0 0 8
UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

O
O
O

O
O O
O
O

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


O
O O

O
O

O
O O

O
O

N N N N N A N N

P P P P P F P P
0 0 0
6 6 6
/ / /
1 1 1
7 7 7

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


02ae-BM/PM/HDCV/FSOFT v2/1 Internal use 63/
Function Code P001 Function Name PatientTest
Created By trongvdhe171724 Executed By trongvdhe171724
Lines of code 7 Lack of test cases -6
Test requirement Check out the methods of the NotificationManager class
Passed Failed Untested N/A/B
7 0 0 7

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07
Condition Precondition
testAddNotification O
testGetNotifications O
testClearNotifications O

Input1
"New notification" O
"Notification 1" O O
"Notification 2" O

Input2

Confirm Actual Result


"New notification" O
"Notification 1" O O

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


"Notification 2" O

Expected Result
"New notification" O
"Notification 1" O O
"Notification 2" O

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
Defect ID
/ / /
1 1 1
6 6 6

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


PatientTest
trongvdhe171724
-6.3

N/A/B Total Test Cases


0 0 7
UTCID08

UTCID09

UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


N N N N A N N

P P P P F P P

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

You might also like