Black-box test case list
| No. | Module | Test case |
|---|---|---|
| 1 | Edit room | edit an existed room |
| 2 | Edit room | edit a room which does not exist |
| 3 | Edit room | edit two consecutive times an existed room |
| 4 | Booking room | there is available room and client exists |
| 5 | Booking room | there is available room and client does not exist |
| 6 | Booking room | no available room |
| 7 | Booking room | book two consecutive times an existed room in the same checkin/checkout |
| 8 | View room statistic | there is booking room: start date < checkin < checkout < end time |
| 9 | View room statistic | there is booking room: checkin < start date < checkout |
| 10 | View room statistic | there is booking room: checkin < end date < checkout |
| 11 | View room statistic | no booking room inside the interval [start time, end time] |
Test case No.1
The database before testing:
tblUser:
| id | name | username | password | position |
| 1 | Manager | manager | manager | manager |
| 2 | Administrator | admin | admin | adminítrator |
| 3 | Seller | seller | seller | seller |
| 4 | Receptionist | recept | recept | receptionist |
tblHotel:
| id | name | address | star | des |
| 1 | Metropole | 15 Ngo Quyen, Ha Noi | 5 |
tblRoom:
| id | idHotel | name | type | price | des |
| 1 | 1 | 101 | single | 800 | garden view |
| 2 | 1 | 102 | double | 1000 | garden view |
| 3 | 1 | 203 | twin | 1000 | garden view |
The testing scenario and expected results
| Scenario | Expected result |
|---|---|
| 1. Start the application | The 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 button | The room management interface appeared with three button: – Add new room – Edit room – Delete room |
| 4. Click on the edit room | The 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 102 | The 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 message | Return to the home interface of the manager |
The database after testing:
Only change in the table tblRoom:
| id | idHotel | name | type | price | des |
| 1 | 1 | 101 | single | 800 | garden view |
| 2 | 1 | 102 | double | 1200 | garden view |
| 3 | 1 | 203 | twin | 1000 | garden view |
Test case No. 4
The database before testing:
tblUser:
| id | name | username | password | position |
| 1 | Manager | manager | manager | manager |
| 2 | Administrator | admin | admin | adminítrator |
| 3 | Seller | seller | seller | seller |
| 4 | Receptionist | recept | recept | receptionist |
tblHotel:
| id | name | address | star | des |
| 1 | Metropole | 15 Ngo Quyen, Hà Nội | 5 |
tblRoom:
| id | idHotel | name | type | price | des |
| 1 | 1 | 101 | single | 800 | garden view |
| 2 | 1 | 102 | double | 1000 | garden view |
| 3 | 1 | 103 | twin | 1000 | garden view |
| 4 | 1 | 201 | single | 800 | garden view |
| 5 | 1 | 202 | double | 1000 | garden view |
| 6 | 1 | 203 | twin | 1000 | garden view |
tblClient:
| id | name | idcard | address | tel | des | |
| 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 | |
| 4 | Hoang Thi Luyen | 4444 | Can Tho | htl@gmail.com | 456789 |
tblBooking:
| id | idCreator | idClient | bookingdate | saleoff | note |
| 1 | 3 | 1 | 13/02/2020 | 0 | |
| 2 | 4 | 3 | 13/02/2020 | 0 | |
| 3 | 3 | 2 | 21/04/2020 | 0 | |
| 4 | 4 | 4 | 25/04/2020 | 0 | |
| 5 | 3 | 3 | 26/04/2020 | 0 |
tblBookedRoom:
| id | idBooking | idRoom | checkin | checkout | price | saleoff | isCheckin |
| 1 | 1 | 2 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 2 | 2 | 5 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 3 | 3 | 2 | 29/04/2020 | 01/05/2020 | 1000 | 0 | 0 |
| 4 | 3 | 3 | 29/04/2020 | 01/05/2020 | 1000 | 0 | 0 |
| 5 | 4 | 1 | 28/04/2020 | 02/05/2020 | 800 | 0 | 0 |
| 6 | 4 | 6 | 28/04/2020 | 02/05/2020 | 1000 | 0 | 0 |
| 7 | 5 | 1 | 05/05/2020 | 10/05/2020 | 800 | 800 | 0 |
Testing scenario and expected results
| Scenario | Expected 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 202 | The 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 1 | The confirm interface appeared: + Client: – tên: Le Van An, – idcard: 1111 – address: Hà Nội – email: an@gmail.com – tel: 123456 + Booking: No…name…type……price……des…………..checkin………checkout 1……202…….double..1000…garden view….30/04/2020….01/05/2020 – Buttons: confirm, cancel |
| 6. Click confirm button | A message appeared: Booking successful! |
| 7. Click OK | Return to the home interface of the seller |
The database after testing:
Only two tables change:
tblBooking:
| id | idCreator | idClient | bookingdate | saleoff | note |
| 1 | 3 | 1 | 13/02/2020 | 0 | |
| 2 | 4 | 3 | 13/02/2020 | 0 | |
| 3 | 3 | 2 | 21/04/2020 | 0 | |
| 4 | 4 | 4 | 25/04/2020 | 0 | |
| 5 | 3 | 3 | 26/04/2020 | 0 | |
| 6 | 3 | 1 | 27/04/2020 | 0 |
tblBookedRoom:
| id | idBooking | idRoom | checkin | checkout | price | saleoff | isCheckin |
| 1 | 1 | 2 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 2 | 2 | 5 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 3 | 3 | 2 | 29/04/2020 | 01/05/2020 | 1000 | 0 | 0 |
| 4 | 3 | 3 | 29/04/2020 | 01/05/2020 | 1000 | 0 | 0 |
| 5 | 4 | 1 | 28/04/2020 | 02/05/2020 | 800 | 0 | 0 |
| 6 | 4 | 6 | 28/04/2020 | 02/05/2020 | 1000 | 0 | 0 |
| 7 | 5 | 1 | 05/05/2020 | 10/05/2020 | 800 | 800 | 0 |
| 8 | 6 | 5 | 30/04/2020 | 01/05/2020 | 1000 | 0 | 0 |
Test case No. 8
The database before testing:
tblUser:
| id | name | username | password | position |
| 1 | Manager | manager | manager | manager |
| 2 | Administrator | admin | admin | adminítrator |
| 3 | Seller | seller | seller | seller |
| 4 | Receptionist | recept | recept | receptionist |
tblHotel:
| id | name | address | star | des |
| 1 | Metropole | 15 Ngo Quyen, Hà Nội | 5 |
tblRoom:
| id | idHotel | name | type | price | des |
| 1 | 1 | 101 | single | 800 | garden view |
| 2 | 1 | 102 | double | 1000 | garden view |
| 3 | 1 | 103 | twin | 1000 | garden view |
| 4 | 1 | 201 | single | 800 | garden view |
| 5 | 1 | 202 | double | 1000 | garden view |
| 6 | 1 | 203 | twin | 1000 | garden view |
tblClient:
| id | name | idcard | address | tel | des | |
| 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 | |
| 4 | Hoang Thi Luyen | 4444 | Can Tho | htl@gmail.com | 456789 |
tblBooking:
| id | idCreator | idClient | bookingdate | saleoff | note |
| 1 | 3 | 1 | 13/02/2020 | 0 | |
| 2 | 4 | 3 | 13/02/2020 | 0 | |
| 3 | 3 | 2 | 21/04/2020 | 600 | |
| 4 | 4 | 4 | 25/04/2020 | 0 | |
| 5 | 3 | 3 | 26/04/2020 | 0 | |
| 6 | 3 | 4 | 25/05/2020 | 0 |
tblBookedRoom:
| id | idBooking | idRoom | checkin | checkout | price | saleoff | isCheckin |
| 1 | 1 | 2 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 2 | 2 | 4 | 14/02/2020 | 15/02/2020 | 1200 | 0 | 1 |
| 3 | 3 | 2 | 29/04/2020 | 02/05/2020 | 1000 | 0 | 1 |
| 4 | 3 | 3 | 29/04/2020 | 02/05/2020 | 1000 | 0 | 1 |
| 5 | 4 | 1 | 28/04/2020 | 03/05/2020 | 800 | 0 | 1 |
| 6 | 4 | 6 | 28/04/2020 | 03/05/2020 | 1000 | 500 | 1 |
| 7 | 5 | 2 | 05/05/2020 | 10/05/2020 | 1000 | 1000 | 1 |
| 8 | 6 | 2 | 01/06/2020 | 05/06/2020 | 1000 | 0 | 0 |
Testing scenario and expected results
| Scenario | Expected 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 = room | The 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 = revenue | The 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...name…type…….des…………..total day…income 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 102 | The detailed statistic of the room 102 from 01 to 30/05/2020: No….client…….checkin……checkout…price…day…income 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 button | Return to the home manager interface |
The database after testing: no change