Swt301 Final Pe

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 10

Quy ước chấm điểm:

- 0.6 điểm cho một lỗi tìm được.


- Nếu các lỗi tìm được giống nhau thì chỉ tỉnh điểm một lần. sai không bị trừ điểm.

Issue No Description Line Detail


1 Variable Naming convension: 2, 6, Output
OutputThe variable name "Output" 17,
does not follow the convention of 20
starting with a lowercase letter in Java.
Instead of "Output," it is recommended
to use "output" to adhere to the naming
standard.

2 local variable overshadow the 1st input 3 int[] arr1 = {};

3 "i" is not initialised before being used - 8 int i;


should be int i = 0;
4 should use Logger instead 10 System.out.println(found);
5 ArrayIndexOutOfBoundsException 11 while(i <= ar2.length && found == false){
6 should be !found 11

* Notes: Blue text is sample, needed to be deleted in the answer


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
coverage như ví dụ bên dưới.
- 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
hơn 3 test case cũng không bị trừ điểm.
- 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

Function Code vicDiff Function Name vicDiff


Created By Lê Văn Tám Executed By
Lines of code 21 Lack of test cases -1
Test requirement <Brief description about requirements which are tested in this function>
Passed Failed Untested N/A/B Total Test Cases
1 1 1 2 1 0 3

UTCID01

UTCID02

Precondition UTCID03
Condition
N/A

Input condition
ar[]
{1,2} O
null O UTCID chỉ cần một mảng null, hoặc cả 2 mảng null đều đúng
[-1,4,9] O

Confirm Return
result[]
Output{2,5} O
Null O
Output{} O
Exception
Log message

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


Passed/Failed P F
Executed Date
Defect ID

* Notes: Blue text is sample, needed to be deleted in the answer


Don't edit the grey cell
st case để đạt 100% branch

đúng. Sinh viên viết nhiều

ể xem xét trừ 0.1 điểm.

icDiff

-1

Total Test Cases


3

hoặc cả 2 mảng null đều đúng


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
điểm.

Table 3.1 Test Analysis

Condition Valid Partitions Tag Invalid Partitions Tag Valid Boundaries

2 – 30 chars VP1 < 2 chars IP1 2 chars

"Đối tượng"
The first
character must VP2 > 30 chars IP2 30 chars
not be a number

The first character


IP3
is a number
"Ngày" is current "Ngày" is not
"Ngày" VP3 IP4
date current date
1-100000000 VP4 <1 IP5 1
"Tiền" >100000000 IP6 1000000000
not a number IP7
"Số phiếu" is
"Số phiếu" VP5 Null
generate
“Diễn giải” 1-250 char VP6 >250 char IP9
Null VP7

* Notes: Blue text is sample, needed to be deleted in the answer


Quy ước chấm điểm:
condition, mỗi VP, IP, VB, IB tương đương 0.1 - Design test case 1 điểm: Mỗi test case design được tươ
case cần đảm bảo đủ 3 thông tin ở các code LMN

Table 3.2 Test case design


Test-
Description
Tag Invalid Boundaries Tag case No
1 "Đối tượng": Lê Văn Tám
"Ngày": Current Date
"Tiền": 1000000
VB1 1 char IB1 'Số phiếu": automation
generated
"Diễn giải": Thu tiền trà sữa

VB2 31 chars IB2


2

0 char IB3
3

VB3 null IB4 4


VB4 0 IB5 5
100000001 IB6 6
VB5 "Số phiếu" is null IP7
251 chars IP8 7
8
9
10
i test case design được tương đương 0.1 điểm. Test
tin ở các code LMN

able 3.2 Test case design


Expected result TAG
a new receipt is successfully VP1,
created VP2,
VP3,
VP4,
VP5, VP6
Quy ước chấm điểm: Table 3.3 Test case có tổng 1 điểm. Mỗi test case viết ra tương
đương 0.1 điểm. Mỗi test case cần đảm bảo đủ thông tin ở các cột B, D, E
Pass: 0

Module Create new receipt Fail: 0


Code
Tester Lê Văn Tám Percent Complete: 0%
ID Test Case Description Pre -Condition Test Case Procedure
TC001 Create new receipt success User log into system with correct role 1. Key in "Đối tượng": Lê Văn Tám
2. Check "Ngày" is current Date
3. Key in "Tiền" is 1000000
4. check "Số phiếu" is generated
5. Key in "Diễn giải" is "Thu tiền trà
sữa"

Table 3.3 Test case


Untested: 0

N/A: 0

Number of cases: 2
Test date
Expected Output Result Bug# Note
(dd/mm/yyyy>
a new receipt is successfully Untest N/A VP1, VP2, VP3, VP4, VP5,
created VP6
Normal flow

You might also like