Black-box testing

Black-box test case list

No.ModuleTest case
1Edit roomedit an existed room
2Edit roomedit a room which does not exist
3Edit roomedit two consecutive times an existed room
4Booking roomthere is available room and client exists
5Booking roomthere is available room and client does not exist
6Booking roomno available room
7Booking roombook two consecutive times an existed room in the same checkin/checkout
8View room statisticthere is booking room: start date < checkin < checkout < end time
9View room statisticthere is booking room: checkin < start date < checkout
10View room statisticthere is booking room: checkin < end date < checkout
11View room statisticno booking room inside the interval [start time, end time]

Test case No.1

The database before testing:

tblUser:

idnameusernamepasswordposition
1Managermanagermanagermanager
2Administratoradminadminadminítrator
3Sellersellersellerseller
4Receptionistreceptreceptreceptionist

tblHotel:

idnameaddressstardes
1Metropole15 Ngo Quyen, Ha Noi5

tblRoom:

ididHotelnametypepricedes
11101single800garden view
21102double1000garden view
31203twin1000garden view

The testing scenario and expected results

ScenarioExpected result
1. Start the applicationThe login interface appeared with: text fields for entering username, password, a login button
2. Enter username = manager
password = manager
and click on login button
The home interface of the manager appeared with there are three buttons:
– Manage hotel
– Manage room
– View statistic
3. Click on the manage room buttonThe room management interface appeared with three button:
– Add new room
– Edit room
– Delete room
4. Click on the edit roomThe interface to search room appeared with a text field to enter keyword, a search button.
5. Enter keyword = 2
and click on the search button
There are two rooms in the results:
id ……. name ……. type ……. price ……. des
2 ……… 102 ………. double ……. 1000 ……. garden view
3 ……… 203 ………. twin ……….. 1000 ……. garden view
6. Click on the row of room 102The edit room interface appeared with the information of room 102:
– id = 2 (read only)
– name = 102
– type = double
– price = 1000
– description = “garden view” and a save button
7. Modify: – price = 1200
and click on the save button
A message appeared: Room is edited successfully!
8. Click on the Ok of the messageReturn to the home interface of the manager

The database after testing:

Only change in the table tblRoom:

ididHotelnametypepricedes
11101single800garden view
21102double1200garden view
31203twin1000garden view

Test case No. 4

The database before testing:

tblUser:

idnameusernamepasswordposition
1Managermanagermanagermanager
2Administratoradminadminadminítrator
3Sellersellersellerseller
4Receptionistreceptreceptreceptionist

tblHotel:

idnameaddressstardes
1Metropole15 Ngo Quyen, Hà Nội5

tblRoom:

ididHotelnametypepricedes
11101single800garden view
21102double1000garden view
31103twin1000garden view
41201single800garden view
51202double1000garden view
61203twin1000garden view

tblClient:

idnameidcardaddressemailteldes
1Le Van An1111Ha Noian@gmail.com123456
2Tran Tien Anh2222Da Nanganh@gmail.com234567
3Cao Thanh Thanh3333Sai Gonctt@gmail.com345678
4Hoang Thi Luyen4444Can Thohtl@gmail.com456789

tblBooking:

ididCreatoridClientbookingdatesaleoffnote
13113/02/20200
24313/02/20200
33221/04/20200
44425/04/20200
53326/04/20200

tblBookedRoom:

ididBookingidRoomcheckincheckoutpricesaleoffisCheckin
11214/02/202015/02/2020120001
22514/02/202015/02/2020120001
33229/04/202001/05/2020100000
43329/04/202001/05/2020100000
54128/04/202002/05/202080000
64628/04/202002/05/2020100000
75105/05/202010/05/20208008000

Testing scenario and expected results

ScenarioExpected results
1. A seller Seller (id=3):
Click on the booking button
Search available room appeared with two text fields: checkin, checkout, and a search button.
2. Enter :
– Checkin = 30/04/2020
– Checkout = 01/05/2020
click on the search button
The available rooms appeared:
id …… name …… type …… price …… des
4 …….. 201 ……… single ….. 800 ……… garden view
5 …….. 202 ……… double ….1000 ……. garden view
3. Click on the room 202The search client interface appeared with a text field, a search button.
4. Enter:
– name = An
click on the Search button
List client appeared, and an add button below:
id……name……………idcard…..address……email………………..tel
1…Le Van An ……………1111……Ha Noi…..an@gmail.com…..123456
2…Tran Tien Anh …….2222……Da Nang..anh@gmail.com…234567
3…Cao Thanh Thanh..3333……Sai Gon….ctt@gmail.com…..345678
5. Click on the row 1The confirm interface appeared:
+ Client:
– tên: Le Van An,
– idcard: 1111
– address: Hà Nội
– email: an@gmail.com
– tel: 123456
+ Booking:
Nonametype……price……des…………..checkin………checkout
1……202…….double..1000…garden view….30/04/2020….01/05/2020
– Buttons: confirm, cancel
6. Click confirm buttonA message appeared: Booking successful!
7. Click OKReturn to the home interface of the seller

The database after testing:

Only two tables change:

tblBooking:

ididCreatoridClientbookingdatesaleoffnote
13113/02/20200
24313/02/20200
33221/04/20200
44425/04/20200
53326/04/20200
63127/04/20200

tblBookedRoom:

ididBookingidRoomcheckincheckoutpricesaleoffisCheckin
11214/02/202015/02/2020120001
22514/02/202015/02/2020120001
33229/04/202001/05/2020100000
43329/04/202001/05/2020100000
54128/04/202002/05/202080000
64628/04/202002/05/2020100000
75105/05/202010/05/20208008000
86530/04/202001/05/2020100000

Test case No. 8

The database before testing:

tblUser:

idnameusernamepasswordposition
1Managermanagermanagermanager
2Administratoradminadminadminítrator
3Sellersellersellerseller
4Receptionistreceptreceptreceptionist

tblHotel:

idnameaddressstardes
1Metropole15 Ngo Quyen, Hà Nội5

tblRoom:

ididHotelnametypepricedes
11101single800garden view
21102double1000garden view
31103twin1000garden view
41201single800garden view
51202double1000garden view
61203twin1000garden view

tblClient:

idnameidcardaddressemailteldes
1Le Van An1111Ha Noian@gmail.com123456
2Tran Tien Anh2222Da Nanganh@gmail.com234567
3Cao Thanh Thanh3333Sai Gonctt@gmail.com345678
4Hoang Thi Luyen4444Can Thohtl@gmail.com456789

tblBooking:

ididCreatoridClientbookingdatesaleoffnote
13113/02/20200
24313/02/20200
33221/04/2020600
44425/04/20200
53326/04/20200
63425/05/20200

tblBookedRoom:

ididBookingidRoomcheckincheckoutpricesaleoffisCheckin
11214/02/202015/02/2020120001
22414/02/202015/02/2020120001
33229/04/202002/05/2020100001
43329/04/202002/05/2020100001
54128/04/202003/05/202080001
64628/04/202003/05/202010005001
75205/05/202010/05/2020100010001
86201/06/202005/06/2020100000

Testing scenario and expected results

ScenarioExpected results
1. The manager Manager (id=1):
Click view statistic
The statistic configuration appeared:
– selection list of statistical object: hotel, room, service, client, revenue.
– selection list of statistical type: by revenue, be filled rate.
– a Stat button
2. Select object = roomThe statistic configuration:
– selection list of statistical object: selected = room.
– selection list of statistical type: by revenue, be filled rate, by filled days.
– a Stat button
3. Select type = revenueThe room statistic appeared:
– text field for start date
– text field for end date
– a view button
4. Enter :
– Start date = 01/05/2020
– End date = 30/05/2020
Click on view button
List room appeared:
No...nametype…….des…………..total dayincome
1……102……..double…garden view…6………….4900
2……203……..twin…….garden view…2…………..1800
3……101……..single…..garden view…2…………..1600
4……103……..twin…….garden view…1…………….950
5……201……..single…..garden view…0…………….0
6……202……..double….garden view..0…………….0
5. Click on room 102The detailed statistic of the room 102 from 01 to 30/05/2020:
No….client…….checkin……checkoutpricedayincome
1……..Anh…….01/05/2020…02/05/2020…1000…….1………900
2……..Thanh…05/05/2020…10/05/2020…1000…….5……..4000
Total………………………………………………………………….6…….4900
– A Back button.
6. Click Back buttonReturn to the home manager interface

The database after testing: no change