0% found this document useful (0 votes)
44 views1 page

Booking Management - API Test Cases

The document outlines the testing procedures for creating and deleting bookings in an API, detailing the necessary requests, expected responses, and validation checks. It includes specific scenarios for successful and erroneous requests, such as missing fields and incorrect data types. The document also emphasizes the importance of authorization and error handling during these operations.

Uploaded by

Phuong Vo
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)
44 views1 page

Booking Management - API Test Cases

The document outlines the testing procedures for creating and deleting bookings in an API, detailing the necessary requests, expected responses, and validation checks. It includes specific scenarios for successful and erroneous requests, such as missing fields and incorrect data types. The document also emphasizes the importance of authorization and error handling during these operations.

Uploaded by

Phuong Vo
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

id Category Priority Title Steps Test data Expected results Status Asignee Note

Create new booking


"totalprice" : 111,
Sending request with all optional - Status code: 200 OK
Main function "depositpaid" : true, Hà
fields
Sendingandrequest
required fileds
with all required "totalprice" : 111, -- It returns
Status valid
code: 200data
OK
"bookingdates" :{
fileds that new booking is
Verify "depositpaid" : true, - It returns valid data
returned
Verify that new booking is api
on get all booking
returnedrequest
on get detail - Status: 200 OK
Sending with abooking
decimalapi
number -- Status:
Response200returns
OK decimal
Sending request with a decimal number
- Response returns decimal
number "checkin": "2013-02-
Response Verify that
response format number
Verify the first name is -23",
Frist name type is string
correctthat
Verify format and name
the last as same is as the - First name is the same as
requestformat
correct body and as same as the first name on request body
Verify that the total price is
request body
correctthat
format and as same is as the
Verify the depositpaid
requestformat
correct body and as same as the
Verify that the checkin is correct
requestand
format bodyas same
Verify that the checkasouttheis
request body and as same as the
correctthat
format
Verify the additional needs
request
is correctbody
format and as same as
Validation the request body
request
Sending request with
firstname - It shows error message
empty/blank
Sending space
request firstname
with missing "First name can not be
firstname key andwith
Sending request value
symbol Need to be confirmed by
characterrequest
Sending on firstname
with BA/tech lead
firstname Hà
empty/blank
Sending space
request last
with name
missing

lastname key andwith
Sending request valuesymbol Need to be confirmed by

characterrequest
Sending on firstname
with BA/tech lead
totalprice Hà
empty/blank
Sending request space total
with number
missing
total number keywith
and characters
value - Status: 400 Bad request
Sending request
or symbol -- Status
It shows error400
code: message:
Bad
Sending request with "Totalprice must be number'
depositpaid request
- Status code: 400 Bad
empty/blank
Sending space
request with missing key - IT shows error message ""
request
and valuerequest with deposit paid - Status: 200 OK
Sending -- IT shows error message ""
Response
request returns false on
is false
Sending request with not boolean response
- IT shows error message
type in depositpaid
Sending request with
checkin "Depositpaid must be
empty/blank
Sending request space
with missing key
and valuerequest with incorrect request
Sending
Sending - IT shows error message
date timerequest
formatwith checkin
date is greater than checkout "Date time format must be
date
Sending request with
checkout empty/blank space
Sending request with missing key
and valuerequest with incorrect
Sending
date time format
Header
Content-Type

Accept
Delete a booking
- Status code: 204
Sending a valid request to remove
Main function Sending - It shows delete success
HTTP method: DELETEpath: https://restful-booker.herokuapp.com/booking/{id}Header: - Cookie- Authorisation
a bookingrequest with the latest
message204 No content
access token if user login multiple -- Status:
Status code: 200 OK
Verify bookingID that is deleted
times
on get bookingID
all bookingthat
request -- Status
It doescode:
not return thefound
404 Not
Verify is deleted
-deleted
It showsbooking ID
meaningful
on get detail booking request
Validation message
path: id - Status code: 404 Not found
Sending request with un existing
BookingID: 8837423482394234 -- Status It shows meaningfull
code: 404 Not error
found
bookingID in the with
Sending request system
deleted
BookingID: -message
request It shows meaningfull error
bookingID
Sending request with bookingID
- thkksdfskf message
Sending request
in string type with cookie -- Status: It shows403
error message
forbidden
Cookie parameter missing/uncheck on - ksgd%%%%jhsfd 'BookingID must be in error
-- Status: It shows403
meaningfull
forbidden
Sending request with missing
cookie parameter Cookie: token= -message
- It shows403
Status: meaningfull
forbiddenerror
'token=' request with missing
Sending Cookie: 89325828429 message
access -- Status: It shows403
meaningfull
forbiddenerror
Sendingtoken
request with incorrect Cookie: token={incorrect access token} -message
- Status: 403 forbiddenerror
It shows meaningfull confirm with
access token
Sending request with an expired Cookie: token={expired access token} message
Sending request
token after with an invalid
xxx minutes -- Status: It shows403
meaningfull
forbiddenerror BA/dev lead
access token
Sending requestby logged out
with the by
not -message
- It shows403
Status: meaningfull
forbiddenerror
about duration
user token if user login mulitple
latest -message It shows meaningfull error
times message
Sending request with cookie - Status: 401 unauthorized
Authorisation parameter missing/uncheck on -- It shows401
Status: meaningfull error
unauthorized
Sending request with missing
cookie parameter message
'token=' -- Status:
It shows401
meaningfull error
unauthorized
Sending request with missing
-message
It shows meaningfull
- Status: 401 unauthorizederror
access token
Sending request with incorrect message
access -- Status:
It shows401
meaningfull error
unauthorized
Sendingtoken
request with an expired
Sending request with an invalid -message
It shows meaningfull error
- Status: 401 unauthorized
token after xxx minutes
access token by logged out by message
Sending request with the not -- Status:
It shows401
meaningfull error
unauthorized
user
latest token if user login mulitple message
- It shows meaningfull error
times message

You might also like