Professional Documents
Culture Documents
Group 4
Group 4
1
2
3
4
5
In the outer loop, the condition should be i < ar.length instead of i <= ar.length, as array indices start from 0 and go up to l
The variable j is not initialized before using it in the inner loop. It should be initialized as int j = 0.
The inner loop should iterate until j < i instead of j <= i, as you want to sum all the elements before the current index i.
The if statement should use the equality operator (==) rather than the assignment operator ( = ) to compare ar[j]%2 with digi
In the inner loop, the update statement increments i instead of j. This will cause an infinite loop as the value of j never chan
Description Detail
5 Index out of bounds
9 Uninitialized variable
9 Array index incorrect
10 Assignment instead of comparison
5 Infinite loop
Quy ước chấm điểm:
- Chỉ cần tối thiểu một test case để đạt 100% statement coverage và tối thiểu ba test case để đạt 100% bra
- Mỗi test case tương đương 1 điểm. Một test case đúng khi có đủ Input và Return đúng. Sinh viên viết nh
- Thiếu các thông tin như fucntion code, fucntion nam, created by, LOC, Type có thể xem xét trừ 0.1 điểm.
- Sinh viên nhập thông tin executed date, pass/fail có thể xem xét trừ 0.1 điểm
UTCID01
UTCID02
UTCID03
UTCID04
UTCID05
Condition Precondition
N/A
Input condition
ar 1
{1} O
null O
{} O
{1, 2} O
{1, 1} O
{1, 2, 3}
{1, 2, 2}
{1, 1, 2, 2}
{1, 2, 1, 2}
{1, 2, 0, 2}
Confirm Return
Output{1} O
Null
Output{1, 2} O O
Output{1, 2, 4}
Output{1, 2, 2, 4}
Exception
O O
Log message
Result Type(N : Normal, A : Abnormal, B : Boun N A N N N
Passed/Failed P F F P P
Executed Date
Defect ID
vicDiff
-1
UTCID07
UTCID08
UTCID09
UTCID10
O
O
O
O
O
O O
O O O
N N N N N
P P P P P
Quy ước chấm điểm:
- Test analysia 2 điểm: Mỗi condition đúng tương đương 0.4 điểm, trong một condition, mỗi VP, IP, VB, IB tương đư
st Analysis
Valid Boundaries Tag Invalid BoundarTag Test-case No
1
"Tên sản phẩm": "Bình dân dụng 12kg" "Số lượng" : is required number
"Tên
"Tên nhà cung cấp":
sản phẩm": "Gas
"Bình dânSouth"
dụng 6kg" "Số "Giálượng":
nhập" :greater than00but
greater than butnot
notexceeding
exceeding100.
10.000.000
"Tên
"Tên nhà cung
sản phẩm":cấp": "Gas South"
"Ghi chú": "Lorem"Bình dân
ipsum dụng
dolor sit12kg"
amet,"Giá nhập": greater
consectetur thanelit.
adipiscing 0 but not porttitor,
Fusce exceedinglibero
10.000.00
vel laoreet vestibulum, felis tortor c
"Tên
"Nhậpnhà
từ cung
kháchcấp": "Gas
hàng": petrolimex"
Checked "Số lượng" is required a number
"Ghi chú":
"Nhập
"Ghi từ khách
chú": "OK" hàng": Checked "Số lượng": greater than 0 but not exceeding 100.
"Giálượng":
nhập": is require number
"Nhập từ khách
"Ghi chú" hàng":
: Lorem dolor sit amet,"Số
ipsumUnchecked consecteturgreater than
adipiscing 0 but
elit. notporttitor,
Fusce exceedinglibero
100. vel laoreet vestibulum, felis tortor cu
"Nhập từ khách hàng" : Unchecked "Giá
"Số nhập":
lượng": greater
greater than
than 0
0 but
but not
not exceeding
exceeding 10.000.000
100.
"Ghi chú" : aaaaaaaaaaaaaa
"Nhập từ khách hàng" : Unchecked "Giá nhập": greater than 0 but not exceeding 10.000.000
"Giá nhập": greater than 0 but not exceeding 10.000.00
"Ghi chú" : aaaaaaaaaaaaaa
"Nhập từ khách hàng" : Checked "Số lượng": greater than 0 but not exceeding 100
"Giá nhập" is required a number
đảm bảo đủ 3 thông tin ở các code LMN
TAG
VB1, VB4, VP1, VP2, VP3, VB12
Fail: 0 N/A: 0
Percent Complete: 0% Number of cases: 2
Test Case Procedure Expected Output
1. Key in "Tên sản phẩm": "Bình công nghiệp 48kg" a new product is successfully imported
2. Key in"Tên nhà cung cấp": "Gas South"
3. Key in"Số lượng": "2"
4. Key in"Giá nhập" "2000"
5. Key in"Ghi chú" : "sale"
6. Key in "Nhập từ khách hàng" : Checked
1. Key in "Tên sản phẩm": "Bình dân dụng 12kg" "Số lượng" : is required number
2. Key in
1. Key in "Tên nhà phẩm":
"Tên sản cung cấp": "Gas
"Bình dânSouth"
dụng 12kg" "Giá nhập" :greater
"Số lượng": greater than
than 0
0 but
but not
not exceeding
exceeding 10.000.000
100.
2.
1. Key in
Key in "Tên nhà cung cấp": "Gas South"
"Tên sản phẩm": "Bình dân dụng 12kg" "Giá nhập": greater than 0 but not exceeding 10.000.000
2.
1. Key
Key in
in "Tên
"Tên nhà phẩm":
sản cung cấp": "Gas
"Bình dânSouth"
dụng 12kg" "Số lượng" is required a number
2. Key in "Tên nhà cung cấp": "Gas petrolimex" "Số lượng": greater than 0 but not exceeding 100.
1. Key in "Tên sản phẩm": "Bình dân dụng 6kg" "Giá nhập": is require number
2.
1. Key
Key in
in "Tên
"Tên nhà cung cấp":
sản phẩm": "Gas
"Bình dânSouth"
dụng 6kg" "Số lượng": greater than 0 but not exceeding 100.
2. "Giá nhập": greater than 0 but not exceeding 10.000.000
1. Key
Key in
in "Tên
"Tên nhà cung cấp":
sản phẩm": Bình"Gas
côngpetrolimex"
nghiệp 48kg "Số lượng": greater than 0 but not exceeding 100.
2. Key in "Tên sản
1. nhà phẩm":
cung cấp": Gas
"Bình South"
dân dụng 6kg" "Giá
"Giá nhập":
nhập": greater
greater than
than 0
0 but
but not
not exceeding
exceeding 10.000.000
10.000.000
2.
1. Key
Key in
in "Tên
"Tên nhà cung cấp":
sản phẩm": Gas
"Bình South
dân dụng 6kg" "Số lượng": greater than 0 but not exceeding 100
"Tên nhà cung cấp": Gas South "Giá nhập" is required a number
Result Bug# Test date Note
(dd/mm/yyyy>
Untest N/A VB1, VB4, VP1, VP2, VP3, VB12
Normal flow