0% found this document useful (0 votes)
14 views

Booking Management - API Test Cases

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Booking Management - API Test Cases

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 1

id Category Priority - 優 Expected results 予想された

Title - タイプ Steps 手順 Test data Status状態 Asignee譲受人 Note 注記


先 結果
Create new booking

HTTP method: POST


Path: https://restful-booker.herokuapp.com/booking
Request body: {
"firstname" : "Jim",
Sending request with all optional "lastname" : "Brown",
fields and required fileds すべてのオプショ "totalprice" : 111, - Status code: 200 OK
Main function "depositpaid" : true, - It returns valid data Hà
ンフィールドと必須フィールドを含むリクエストを送信 "bookingdates" : {
する "checkin" : "2018-01-01",
"checkout" : "2019-01-01"
},
"additionalneeds" : "Breakfast"
}

HTTP method: POST


Path: https://restful-booker.herokuapp.com/booking
Request body: {
"firstname" : "Jim",
Sending request with all required "lastname" : "Brown",
"totalprice" : 111, - Status code: 200 OK
fileds 必須フィールドをすべて含めたリクエストを送 "depositpaid" : true, - It returns valid data
信しています "bookingdates" : {
"checkin" : "2018-01-01",
"checkout" : "2019-01-01"
},
}

Verify that new booking is returned


on get all booking api すべての予約を取得す
るAPIで新しい予約が返されることを確認します

Verify that new booking is returned


on get detail booking api 詳細予約APIで新
しい予約が返されることを確認します

Sending request with a decimal - Status: 200 OK


- Response returns decimal
number - 10進数でリクエストを送信する number

Sending request with a decimal - Status: 200 OK


- Response returns decimal
number - 10進数でリクエストを送信する number

{
"firstname": "Sally",
"lastname": "Brown",
"totalprice": 111,
"depositpaid": true,
Response Verify response format "bookingdates": {
"checkin": "2013-02-23",
"checkout": "2014-10-23"
},
"additionalneeds":
"Breakfast"
}

Verify that the first name is correct - Frist name type is string
format and as same as the request - First name is the same as first
body name on request body

Verify that the last name is correct


format and as same as the request
body

Verify that the total price is correct


format and as same as the request
body

Verify that the depositpaid is correct


format and as same as the request
body

Verify that the checkin is correct


format and as same as the request
body

Verify that the check out is correct


format and as same as the request
body

Verify that the additional needs is


correct format and as same as the
request body
Validation

Sending request with empty/blank - Status code: 400 Bad request


firstname space firstname - 空白スペースのあるリクエス - It shows error message "First
トを送信しています name can not be empty"

Sending request with missing


firstname key and value - ファーストネー
ムのキーと値が欠落しているリクエストを送信していま

Sending request with symbol


Need to be confirmed by
character on firstname - ファーストネーム BA/tech lead
に記号文字を含むリクエストを送信しています

firstname Sending request with empty/blank Hà


space last name
Sending request with missing Hà
lastname key and value
Sending request with symbol Need to be confirmed by Hà
character on firstname BA/tech lead

totalprice Sending request with empty/blank Hà


space total number
Sending request with missing total
number key and value

Sending request with characters or - Status: 400 Bad request


symbol - It shows error message:
"Totalprice must be number'
Sending request with empty/blank - Status code: 400 Bad request
depositpaid space - IT shows error message ""
Sending request with missing key - Status code: 400 Bad request
and value - IT shows error message ""

Sending request with deposit paid is - Status: 200 OK


false - Response returns false on
response

"- Status code: 400 Bad request


Sending request with not boolean - IT shows error message
type in depositpaid "Depositpaid must be
true/false only"

Sending request with empty/blank


checkin space
Sending request with missing key
and value

"- Status code: 400 Bad request


Sending request with incorrect date - IT shows error message "Date
time format time format must be
yyyy/mm/dd"

Sending request with checkin date is


greater than checkout date

Sending request with empty/blank


checkout space
Sending request with missing key
and value
Sending request with incorrect date
time format
Header
Content-Type

Accept

Delete a booking

- Status code: 204


Main function Sending a valid request to remove a HTTP method: DELETEpath: https://restful-booker.herokuapp.com/booking/{id}Header:
- It shows delete success - Cookie- Authorisation
booking message

Sending request with the latest


access token if user login multiple - Status: 204 No content
times

Verify bookingID that is deleted on - Status code: 200 OK


get all booking request - It does not return the deleted
booking ID
Verify bookingID that is deleted on - Status code: 404 Not found
get detail booking request - It shows meaningful message
Validation
path: id

Sending request with un existing - Status code: 404 Not found


bookingID in the system BookingID: 8837423482394234 - It shows meaningfull error
message

Sending request with deleted - Status code: 404 Not found


bookingID - It shows meaningfull error
message

Sending request with bookingID in BookingID: - Status code: 400 Bad request
string type - thkksdfskf - It shows error message
- ksgd%%%%jhsfd 'BookingID must be in number'

Sending request with cookie - Status: 403 forbidden


Cookie parameter missing/uncheck on - It shows meaningfull error
cookie parameter message

Sending request with missing - Status: 403 forbidden


'token=' Cookie: token= - It shows meaningfull error
message

Sending request with missing access - Status: 403 forbidden


token Cookie: 89325828429 - It shows meaningfull error
message

Sending request with incorrect - Status: 403 forbidden


access token Cookie: token={incorrect access token} - It shows meaningfull error
message

Need to confirm
- Status: 403 forbidden with BA/dev
Sending request with an expired Cookie: token={expired access token} - It shows meaningfull error lead about
token after xxx minutes message duration of a
session

Sending request with an invalid - Status: 403 forbidden


access token by logged out by user - It shows meaningfull error
message

Sending request with the not latest - Status: 403 forbidden


token if user login mulitple times - It shows meaningfull error
message

Sending request with cookie - Status: 401 unauthorized


Authorisation parameter missing/uncheck on - It shows meaningfull error
cookie parameter message

Sending request with missing - Status: 401 unauthorized


'token=' - It shows meaningfull error
message

Sending request with missing access - Status: 401 unauthorized


token - It shows meaningfull error
message

Sending request with incorrect - Status: 401 unauthorized


access token - It shows meaningfull error
message

Sending request with an expired - Status: 401 unauthorized


token after xxx minutes - It shows meaningfull error
message

Sending request with an invalid - Status: 401 unauthorized


access token by logged out by user - It shows meaningfull error
message

Sending request with the not latest - Status: 401 unauthorized


token if user login mulitple times - It shows meaningfull error
message

You might also like