Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH

TRƯỜNG ĐẠI HỌC BÁCH KHOA


KHOA KHOA HỌC VÀ KĨ THUẬT MÁY TÍNH

KIỂM TRA PHẦN MỀM (CO3015)

Project #2: BLACK-BOX TESTING

GVHD: Bùi Hoài Thắng


Sinh viên: Nguyễn Long Nhật - 1813367
Trần Minh Hoàng - 1812295
Lê Hồng Phong - 1813518
Trần Trọng Nghĩa - 1813233
Tăng Minh Nhật - 1813380

TP. HỒ CHÍ MINH, THÁNG 10/2021


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

Mục lục
1 Application to be tested. 2
1.1 List of functionalities to be tested. . . . . . . . . . . . . . . . . . . . . . . 2

2 Register 3
2.1 Use-case Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Non-functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Test case design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Login 5
3.1 Use-case Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Non-functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 Test case design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 View list of posts by pagination 7


4.1 Use-case Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 Non-functional Requirement. . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.3 Testcase design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5 Comment on topic 10
5.1 Use-case Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Non-functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3 Test case design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

6 Search 12
6.1 Use-case Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
6.2 Non - functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . 14
6.3 Test case design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Project #2: BLACK-BOX TESTING Trang 1


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

* File excel nhóm em nộp là xlsx, nếu bị lỗi mong thầy đổi tên thành
.xlsm ạ.

1 Application to be tested.
My team chose to test on the website https://vn-z.vn/ .

VN-Z was a forum for computing and technology. It had information on Windows, com-
puter hardware, video games and mobile phones. VN-Z now transformed into a forum
for technology news, with tips on information technology and reviews of technological
equipment.

1.1 List of functionalities to be tested.


Member Functional requirement Testcase design
Nguyễn Long Nhật Register Use-case testing
Tăng Minh Nhật Login Page Use-case testing
Equivalence class partitioning
Trần Trọng Nghĩa Search
technique
View list of posts Boundary value analysis
Lê Hồng Phong
by pagination technique
Trần Minh Hoàng Comment on topic Decision table technique

Project #2: BLACK-BOX TESTING Trang 2


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

2 Register
2.1 Use-case Detail
Use-case ID 1
Use-case name Register
Created by Nguyễn Long Nhật Last updated by Nguyễn Long Nhật
Date created 19/10/2021 Last updated date 21/10/2021
Description User creates a valid account to login to the site
Actor(s) User
Precondition(s) User has computer or smartphone with internet connection
Post-condition(s) Register Success
1. User open a browser and access to vn-z.vn
2. User click Login button
3. Open register page
4. User enters ( or selects ) required information
5. User selects "Tôi không phải là người máy"
Basic Flow 5.1. Display Captcha
5.2. User selects the required images
5.3. User clicks "Xác minh" and bypass Captcha.
6. User select "I agree to the terms and privacy policy."
7. User click Login button
8. User successfully registers an account and logs in to the site
1. Alternative in step 4:
1.1. User selects "Register fast using: (Facebook, Google,
Alternative Flow GitHub)"
1.2. Redirect to another page for users to register with Google,
Facebook or GitHub.
1. Exception in step 7:
1.1. Invalid or blank user informations
1.2. Display a message asking the user to enter the
correct information for each field.
2. Exception in step 7:
Exception Flow 2.1. User did not select "Tôi không phải là người máy"
2.2. Display a message asking the user to bypass the Captcha.
3. Exception in step 7:
3.1. User did not select "I agree to the terms and privacy policy."
3.2. Display a message asking the user select "I agree to the terms
and privacy policy.".

Project #2: BLACK-BOX TESTING Trang 3


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

2.2 Non-functional Requirements


• Register dialog appears no more than 5s after the user presses the Register button
• After the user presses the register button, the possibility of giving a response (suc-
cessful or not) is not more than 2s
• Redirect to Google, Facebook or Github login page no more than 5s

2.3 Test case design


• Use use-case testing technical

Project #2: BLACK-BOX TESTING Trang 4


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

3 Login
3.1 Use-case Detail
Use-case ID 2
Use-case name Login
Created by Tăng Minh Nhật Last updated by Tăng Minh Nhật
Date created 19/10/2021 Last updated date 21/10/2021
Description User use valid username and password to login
Actor(s) User
Precondition(s) User has computer or smartphone with internet connection
Post-condition(s) Login Success
1. User open a browser and access to vn-z.vn
2. User click "Đăng Nhập" button
3. Open login popup
Basic Flow 4. User enters valid username and password
5. User check or uncheck the "keep login" checkbox
6. User click onto the login button
7. User is redirected to homepage and Login process is a success.
1. Alternative in step 4:
1.1. User selects "Login fast using: (Facebook, Google,
Alternative Flow GitHub)"
1.2. Redirect to another page for users to login with Google,
Facebook or GitHub.
1. Exception in step 6:
1.1. Invalid or blank username or password
Exception Flow
1.2. Display a message notifying the user about
the invalid username or password

3.2 Non-functional Requirements


• Login popup appears no more than 5s after the user presses the Login button
• After the user presses the login button, the possibility of giving a response (suc-
cessful or not) is not more than 2s
• Redirect to Google, Facebook or Github login page in no more than 5s
• Text nhập vào username và password bé hơn 30 ký tự

Project #2: BLACK-BOX TESTING Trang 5


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

3.3 Test case design


• Use use-case testing technique

Project #2: BLACK-BOX TESTING Trang 6


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

4 View list of posts by pagination


4.1 Use-case Detail.
Use-case ID 3
Use-case name View list of posts by pagination
Created by Lê Hồng Phong
Date created 21-10-2021
Actor User
Description As a user, I can view more posts or comments using pagination
search.
Preconditions User with internet-connected device or smartphone
Post conditions Select the page and display the results
Basic flow
1. The users opens a browser and visits the website
2. Through the search function or the category bar, click to select
a topic.
3. Go to the forum page, posts and comments are displayed by
default on page 1, showing the latest posts.
4. Appears a filter of results by pagination, and displays the total
number of result pages.
5. Users want to find more related articles, click the "tiếp" button.
6. Go to the forum page, posts and comments are displayed on
next page
7. To return to the previous page, the user presses the “trước”
button
8. Go to the forum page, posts and comments are displayed on
previous page Click on the VN-Z logo on the top left of page
forum to return to the homepage

Project #2: BLACK-BOX TESTING Trang 7


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

Alternative flow
4a The user clicks on the page number they wants to go to.
5a Go to the forum page, posts and comments are displayed by
the selected page number.
6a Click on the VN-Z logo on the top left of page forum to return
to the homepage

4b The user click the button with icon “. . . ”
5b The user enters the page number they want to find and clicks
’tới’ button
6b Go to the forum page, posts and comments are displayed by
the selected page number.
7b Click on the VN-Z logo on the top left of page forum to return
to the homepage

Exception flow At step 5b.


1. User entered 1 invalid character.-> Display error message
2. The user entered an invalid page number.-> Go to the forum
page, display posts and comments on the page with the closest
page number to the number entered.

4.2 Non-functional Requirement.


• Page load time less than 5s.
• Check if page load by entering invalid order page takes less than 5 seconds
• The user finds the page using the page number entry function on the smartphone,
only the numeric keypad is displayed check.

4.3 Testcase design.


The Boundary value analysis technique is used to test the alternative flow case
4b->7b.
Input of testcase is the page number, accept 1 to the max page.

Project #2: BLACK-BOX TESTING Trang 8


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

Hình 1: User enter the page number

Boundary value analysis technique


Invalid Valid Invalid
1, 2, [The max page/2],
0 The max page-1, The max page +1
The max page

• So, we have 5 valid testcases:


– Enter the value 1.
– Enter the value 2.
– Enter the value [The max page/2].
– Enter the value The max page-1.
– Enter the value The max page.
• And 2 invalid testcases:
– Enter the value 0.
– Enter the value The max page +1.

Project #2: BLACK-BOX TESTING Trang 9


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

5 Comment on topic
5.1 Use-case Detail
Use-case ID 4
Use-case name Comment on topic
Created by Trần Minh Hoàng Last updated by Trần Minh Hoàng
Date created 19/10/2021 Last updated date 22/10/2021
Description User add a comment on one topic of “vn-z” website
Actor(s) User
User opened a certain topic of the website. User logged in. Internet
Precondition(s)
connection
Post-condition(s) Add a comment successfully
1. User clicks on Comment box in the bottom of the topic
2. System enters the input field with input capture
3.User types his/her comment
Basic Flow
4. System shows his/her typed text on input field
5.User clicks on “Gửi trả lời"
6. System adds the typed comment to the topic
1. If user wants answer some other comment (Alternative to step 1)
i. User clicks on “Trả lời” of one certain comment
ii. System displays the sub comment box of that comment and enter
the input field with input capture
iii. Go to before step 3 in Basic Flow
2. If user wants to add sticker (Alternative to step 5)
i. User clicks on sticker icon
ii. System displays Sticker popup
iii. User clicks on one sticker his/her want
Alternative Flow iv. System adds the selected sticker added to the comment box
and display it
v. Go to before step 3 in Basic Flow
3. If user wants to add image (Alternative to step 5)
i. User clicks on image icon
ii. System displays Open file dialog
iii. User browses image he/she wants to comment and click on
open in dialog
iv. Add the selected image added to the comment box and display it
v. Go to before step 3 in Basic Flow
1. If user typed nothing (Exception of step 3)
i. Show an alert "Xin mời nhập vào đúng nội dung."
Exception Flow
2. If user typed vulgar words, violent profanity (Exception of step 6)
i. System adds comment "-censor-" to the topic
Project #2: BLACK-BOX TESTING Trang 10
Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

5.2 Non-functional Requirements


• After commenting, user have to wait at least 20s to comment again

5.3 Test case design


Using Decision Table Technique.

Comment on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Topic
Conditions
Answer
Y Y Y Y Y Y Y Y Y N N N N N N N N N
other comment
Typed N Y Y Y Y Y Y Y Y N Y Y Y Y Y Y Y Y
Add Sticker N Y Y Y Y N N N N N Y Y Y Y N N N N
Add Image N N Y N Y N Y N Y N N Y N Y N Y N Y
Vulgar word N N N Y Y N N Y Y N N N Y Y N N Y Y
Actions
Show comment X X X X X X X X X X X X
Show "-censor-" X X X X X X X X
Show an alert X X

When "Typed" condition is "No","Add Sticker" condition, "Add image"


condition,"Vulgar word" condition have to be "No". Therefore, we have 18 test-
cases.

Project #2: BLACK-BOX TESTING Trang 11


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

6 Search
6.1 Use-case Detail
Use-case ID 5
Use-case Name Search
Created by Trần Trọng Nghĩa Last updated by Trần Trọng Nghĩa
Date created 19/10/2021 Last updated date 21/10/2021
Description As a user, I want to search for topics or comments that contain
keywords
Actor(s) User
Trigger User clicks the Search button on the forum navigation bar
Pre - Conditions User’s device connected to the internet
Post - Conditions The screen shows a list of topics or comments containing key-
words
Basic Flow
1. User enters a keyword in the search text area.
2. Users tick the line "Search based on title (check to select)"
if necessary.
3. User enters the member’s name related to the topic or
comment that user wants to search by keyword if neces-
sary.
4. User presses the Search button to start the search

Project #2: BLACK-BOX TESTING Trang 12


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

Alternative Flow At step 1.


1a. User presses Advanced Search button.
1a1. System displays the Advanced Search page.
2a. User enters a keyword in the search text area.
3a. User enters the name of the member who is the author of
the article containing the keyword to search.
4a. User enters the time period in which the keyword can
appear by selecting the year - month - day in the Newer
and Older than boxes.
5a. User presses the Search button to start the search
At step 1.
1b1. User selects Search Threads tab on Advanced Search page.
1b2. System switches to the Search Threads tab.
2b. User enters a keyword in the search text area.
3b. User enters the name of the member who is the author of
the article containing the keyword (Posted by) to search.
4b. User enters the time period in which the keyword can
appear by selecting the year - month - day in the Newer
and Older than boxes.
5b. User enters Minimum number of replies.
6b. User selects Prefix.
7b. User selects Search the forum.
8b. User selects Order by.
9b. Users tick the line Display results as threads if necessary.
10b. User presses the Search button to start the search
At step 1.
1c1. User selects Search profile posts tab on Advanced Search
page.
1c2. System switches to the Search profile posts page.
2c. User enters a keyword in the search text area.
3c. User enters the name of the member who is the author of
the article containing the keyword (Posted by) to search.
4c. User enters Posted on the profile of member.
5c. User enters the time period in which the keyword can
appear by selecting the year - month - day in the Newer
than and Older than boxes.
6c. User presses the Search button to start the search

Project #2: BLACK-BOX TESTING Trang 13


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

Alternative Flow At step 1.


1d1. User selects Search tags tab on Advanced Search page.
1d2. System switches to the Search tags page.
2d. User enters Tags.
3d. User presses the Search button to start the search

Exception Flow At step 5.


5e. System displays an error page with the content "Oops!
We ran into some problems." if the keyword is too short

6.2 Non - functional Requirements


• The time from pressing the Search button until the search results appear on the
screen is less than 3 seconds.

6.3 Test case design


Use Equivalence class partitioning technique
In the Search function, specifically Advanced Search, there are input fields that allow
users to search by post date. Therefore, the Equivalence class partition technique can
be applied to check whether the date entered by the user is valid or not. If invalid, the
system will correct the star date by subtracting the last day of the month from the date
entered by the user and incrementing the last day to the corresponding valid date.
• Input classes:
– Day:
∗ D1: day between 1 to 28
∗ D2: 29
∗ D3: 30
∗ D4: 31
– Month:
∗ M1: Month has 30 days
∗ M2: Month has 31 days
∗ M3: Month is February
– Year:

Project #2: BLACK-BOX TESTING Trang 14


Trường Đại học Bách Khoa - ĐHQG TP.HCM
Khoa Khoa học & Kĩ thuật Máy Tính

∗ Y1: Year is a leap year


∗ Y2: Year is a non-leap year
• Output classes:
– Valid date
– Invalid date, auto-correct to valid date
Strong Normal Equivalence Class Test Cases:

Test case ID Day Month Year Expected output


1 02 04 2020 2020-04-02
2 01 04 2021 2021-04-01
3 01 01 2020 2020-01-01
4 01 01 2021 2021-01-01
5 01 02 2020 2020-02-01
6 01 02 2021 2021-02-01
7 29 04 2020 2020-04-29
8 29 04 2021 2021-04-29
9 29 01 2020 2020-01-29
10 29 01 2021 2021-01-29
11 29 02 2020 2020-02-29
12 29 02 2021 2021-03-01 (Auto Correct)
13 30 04 2020 2020-04-30
14 30 04 2021 2021-04-30
15 30 07 2020 2020-07-30
16 30 07 2021 2021-07-30
17 30 02 2020 2020-03-01 (Auto Correct)
18 30 02 2021 2021-03-02 (Auto Correct)
19 31 04 2020 2020-05-01 (Auto Correct)
20 31 04 2021 2021-05-01 (Auto Correct)
21 31 05 2020 2020-05-31
22 31 05 2021 2021-05-31
23 31 02 2020 2020-03-02 (Auto Correct)
24 31 02 2021 2021-03-03 (Auto Correct)

Test case table

Project #2: BLACK-BOX TESTING Trang 15

You might also like