0% found this document useful (0 votes)
7 views

Template_test_case (Nho Dat Lai Ten File) (1)

Uploaded by

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

Template_test_case (Nho Dat Lai Ten File) (1)

Uploaded by

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

Guideline to make and understand Unit

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

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
cases/KLOC' item in FunctionList sheet, which is required by customer or normal value. The number of lacked T
- 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

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
- 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.
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 3/17


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 4/17


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 Description
Name
1 Class1 Function A Function1 UT Lab1
2 Class2 Function B Function2 UT Lab 2
3 Class3 Function C Function3 UT Lab 3

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


Pre-Condition

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


UNIT TEST REPORT
Project Name <Project Name> Creator
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 UT Lab 1 0 0 15 0 0 0
2 UT Lab 2 0 0 15 0 0 0
3
4

Sub total 0 0 30 0 0 0

Test coverage 0.00 %


Test successful coverage 0.00 %
Normal case 0.00 %
Abnormal case 0.00 %
Boundary case 0.00 %

Passed Percent Test Type

N
Passed
A
Failed
B
Untested

Untested
100%

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


A
Failed
B
Untested

Untested
100%

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


n this test report is created>
ule2

Total Test Cases


15
15

30

est Type

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


A

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


Function Code Function1 Function Name Function A
Created By <Developer Name> Executed By
Lines of code 100 Lack of test cases -5
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B
0 0 15 0 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09
Condition Input1

Input2

Confirm Return

Exception

Log message

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


Passed/Failed
Executed Date
Defect ID

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


Function A

-5
on>
Total Test Cases
15
UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


Function Code Function2 Function Name Function B
Created By <Developer Name> Executed By
Lines of code 300 Lack of test cases 15
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B
0 0 15 0 0 0

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09
Condition Input1

Input2

Confirm Return

Exception

Log message

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


Passed/Failed
Executed Date
Defect ID

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


Function B

15
on>
Total Test Cases
15
UTCID10

UTCID11

UTCID12

UTCID13

UTCID14

UTCID15

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


Function Code Function1 Function Name Function A
Created By <Developer Name> Executed By
Lines of code 100 Lack of test cases 0
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test C
0 0 10 2 2 6 10

UTCID01

UTCID02

UTCID03

UTCID04

UTCID05

UTCID06

UTCID07

UTCID08

UTCID09

UTCID10
Condition num
5 O
10 O
-5 O
1100 O
0 O
1000 O
1 O
2 O
-1 O
1001 O

Confirm Return
1 O O
0 O O O O
Exception O O O O

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


Passed/Failed
Executed Date
Defect ID
Function A

Total Test Cases


10

Condition VP IP
num la nguyen to tu 0 den 1000 <0
ko la nguyen to tu 0 den 1000 >1000

# Test case type Input (num)


1 VP 5
2 10
3 IP -5
4 1100
5 VB 0
6 1000
7 1
8 2
9 IB -1
10 1001
VB IB
0 -1
1000 1001
1
2

Expected result
1
0
Exception
Exception
0
0
0
1
Exception
Exception

You might also like