Professional Documents
Culture Documents
Guideline To Make and Understand Unit Test Case: 1. Overview
Guideline To Make and Understand Unit Test Case: 1. Overview
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
Yêu cầu:
Thiết kếUnit Test case cho phần code dưới đây theo phương pháp White box testing
(Path coverage).
Vẽra sơ đồ(Ko cần phải show), comment trong code của từng test cases.
VD: Test case 1: A-> B -> C->D
i++)
Function Code Lab3 Function Name Calculate
Created By SangNV Executed By nguyen duc cuong
Lines of code Lack of test cases
Test requirement Develop Test Case to cover statement, path , branch for the program mentioned in the provided document
Passed Failed Untested N/A/B Total Test Cases
7 5 2 4 2 6 14
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
UTCID10
UTCID11
UTCID12
UTCID13
UTCID14
UTCID15
UTCID16
UTCID17
UTCID18
UTCID19
UTCID20
UTCID21
Condition Precondition
input1 (200,1000,1900,0.5) O
(10,90,900,0.2) O
(30,2000,800,0.5) O
(4,9,4800,1) O
(4,9,2000,200) O
(6,-5,30,1) O
(250,200,2000,0.6) O
(20,500,22000,0.1) O
(3,20,11000,0.5) O
(2,1000,1500,1) O
(240,150,1900,0.2) O
(240,10000000000,1600,0.7) O
(20,"M",1500,0.65) O
(1,100,2500,0.9) O
Exception
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
UTCID06
UTCID07
UTCID08
UTCID09
UTCID10
UTCID11
UTCID12
UTCID13
UTCID14
UTCID15
Conditio Precondition 0 O
9 O
a O
f O
Input1 A O
F O
d O
E O
Input2 m O
-1 O
Confirm Return 0 O
9 O
10 O
15 O
10 O
15 O
13 O
14 O
Exception