You are on page 1of 12

JSON ADD functionality

Description

JSON add and priority

Validate that user cannot add booking if theres an existing booking with the same or higher priority that overlaps with the intended booking.

JSON add and insufficient money

Validate that whether the Add booking will print the correct response if the amount of money that the user has is insufficient to book the facility.

JSON add and date validation

Validate that whether the Add booking will print the correct response if the bookings start date is before the system start date.

JSON add and normal booking JSON GET-USER

Validate that a user can add a booking.

JSON Get-user

Validate that whether the Get User will print the correct response.

JSON Get-user JSON Cancel

Validate that cannot get a user with invalid email

JSOn Cancel

Validate that user can cancel a single booking more than 7 days ahead and get 100% refund

JSON Cancel

Validate that can cancel a single booking between 1 to 7 days

JSON Cancel

Validate that can cancel a single booking 24 hours ahead

JSON Cancel

Validate that cannot cancel booking that has passed

JSON Cancel

Validate that can cancel an overridden booking

JSON Cancel

Validate that cannot cancel an overridden booking whereby frist instance of the split booking has passed

JSON Cancel functionality Login & Logout

Validate that can cancel the whole recurring booking

Login

Only validate user can login to the homepage

Login

Only validate user can login to the homepage

Login

Only validate user with correct password input can login to the homepage.

Login functionality Simple Booking without priority

Only validate user without empty input username can login to the homepage.

Booking

Validate whether user could book a GSR for an hour

Booking

Validate whether user could make a booking without sufficient money

Booking

Validate whether user could make a booking longer than 12 hours

Booking

Validate whether user could book a GSR for an hour and recur daily for 5 times

Test Inputs

Test Procedure bootstrap the system and Type the c0d3Son1/add?r={ email : andy.hsu.2009, (david.hsu.2009 already exists in the data start-date :4/11/2012 1300, that overlaps with the intended duration:60 booking)/c0d3Son1/add?r={email facility:SIS GSR 2.3 :andy.hsu.2009,start-date :04/11/2012 purpose : Learning to fluff 1300,duration:60,facility:SIS Grp } to access the JSON Web Service Study Rm 2-3,purpose :Learning to fluff} (andy.hsu.2009 has 19 in his KS$) /c0d3Son1/add?r={email :andy.hsu.2009,start-date :04/11/2012 1300,duration:660,facility:SIS Seminar Rm 2-3,purpose :Learning to fluff } bootstrap the system and Type the /c0d3Son1/add?r={email :andy.hsu.2009,start-date :04/11/2012 1300,duration:660,facility:SIS Seminar Rm 2-3,purpose :Learning to fluff } to access the JSON Web Service bootstrap the system and Type the c0d3Son1/add?r={ email : andy.hsu.2009, start-date :4/8/2012 1300, duration:60 facility:SIS GSR 2.3 purpose : Learning to fluff } to access the JSON Web Service

c0d3Son1/add?r={ email : andy.hsu.2009, start-date :4/8/2012 1300, duration:60 facility:SIS GSR 2.3 purpose : Learning to fluff }

bootstrap the system and Type the /c0d3Son1/add?r={email : /c0d3Son1/add?r={email : andy.hsu.2009, andy.hsu.2009, start-date :18/10/2012 start-date :18/10/2012 0100,duration:60,facility:SIS Grp SR 2- 0100,duration:60,facility:SIS Grp SR 3,purpose : Learning to fluff 2-3,purpose : Learning to fluff } } to access the JSON Web Service

/c0d3Son1/get-user?r={email : andy.hsu.2009}

bootstrap the system and Type the URL /c0d3Son1/get-user?r={email : andy.hsu.2009} to access the JSON Web Service

bootstrap the system and Type the URL /c0d3Son1/get-user?r={email : andy.hsu} /c0d3Son1/get-user?r={email : andy.hsu} to access the JSON Web Service

/c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "Proj. Rm 4.9", "start-date":"4/9/2012 1200" }

bootstrap the system and Type the URL /c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-3", "start-date":"31/08/2012 0100"} to access the JSON web service

/c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"}

bootstrap the system and Type the URL Type the URL /c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"} to access JSON web service bootstrap the system and Type the URL /c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"} to access JSON web service

/c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"}

/c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"}

bootstrap the system and Type the URL /c0d3Son1/cancel?r= { "email": "andy.hsu.2009", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"} to access JSON web service

/c0d3Son1/cancel?r= { "email": "felicia.hsu.2011", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"}

bootstrap the system and Type the URL /c0d3Son/cancel?r= { "email": "felicia.hsu.2011", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"} to access JSON web service

/c0d3Son/cancel?r= { "email": "felicia.hsu.2011", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"}

bootstrap the system and Type the URL /c0d3Son/cancel?r= { "email": "felicia.hsu.2011", "facility": "SIS Grp Study Rm 3-2", "start-date":"30/09/2012 0100"} to access JSON web service

/c0d3Son/cancel?r= { "email": "lawsoc", "facility": "SIS Seminar Rm 2-1", "startdate":"03/09/2012 1830"} Username: lawsoc Password: qwerty157

bootstrap the system and Type the URL /c0d3Son/cancel?r= { "email": "lawsoc", "facility": "SIS Seminar Rm 2-1", "startdate":"03/09/2012 1830"}

Type lawsoc in username filed, type qwerty157 in password filed

Username: bobcao Password: qwerty157

Type bobcao in username filed, type qwerty157 in password filed

Username: lawsoc Password: aaaqwerty157

Type lawsoc in username filed, type aaaqwerty157 in password filed

Username: "" (empty) Password: "" (empty)

click log in

Login as lawsoc, click "create booking" on navigation bar, click "search" and enter display page, chose "SOA/SOL Grp Study Rm 2-1" on dropdown list, then chose click on "Start Date: 2012-11-11 End Date:2012-11- 2012-11-11 slot, chose 7am as start time and 13 8am as end time, click "submit" to enter Start Time: 07:00 End Time: 08:00 confirmation page, click "confirm" to make Facility:SOA/SOL Grp Study Rm 2-1" the booking Login as lawsoc, click "create booking" on navigation bar, click "search" and enter display page, chose "SIS Seminar Rm 2-1 " on dropdown list, then chose click on 2012-11"Start Date: 2012-11-11 End Date:2012-11- 11 slot, chose 7am as start time and 7pm as 13 end time, click "submit" to enter Start Time: 07:00 End Time: 19:00 confirmation page, click "confirm" to make Facility:SIS Seminar Rm 2-1 " the booking

Login as lawsoc, click "create booking" on navigation bar, click "search" and enter display page, chose "SIS Seminar Rm 2-1 " on dropdown list, then chose click on 2012-11"Start Date: 2012-11-11 End Date:2012-11- 11 slot, chose 7am as start time and 9pm as 13 end time click "submit" to enter Start Time: 07:00 End Time: 21:00 confirmation page, click "confirm" to make Facility:SOA/SOL Grp Study Rm 2-1" the booking

Login as lawsoc, click "create booking" on navigation bar, click "search" and enter display page, chose "SOA/SOL Grp Study Rm "Start Date: 2012-11-11 End Date:2012-11- 2-1" on dropdown list, then chose click on 13 2012-11-11 slot, chose 7am as start time and Start Time: 07:00 End Time: 08:00 8am as end time, click "submit" to enter Facility:SOA/SOL Grp Study Rm 2-1 confirmation page, change recur type to recur type: Daily by times, "Daily by times", and changet recur Value to recur Value: 5" "5", "click "confirm" to make the booking

Expected Result

Actual Result

Pass/Fall

{status : failure , KS$ : 10,error : booking exists}

{status : failure , KS$ : 19,error : insufficient KS$}

{status : failure , KS$ : 10,error : invalid start date}

{ id: "SIS Seminar Rm 23941300andy.hsu.2009", KS$: 16, status: "success" }

{ KS$: 16, school: "School of Social Sciences", email: "andy.hsu.2009", name: "Andy Hsu", group: "TA" }

{ status: "invalid email" }

{ status: "success" email: "andy.hsu.2009", initial-KS$: 8, after-KS$: 9, }

{ status: "success" email: "andy.hsu.2009" initial-KS$: 9, after-KS$: 9.5, } { status: "success" email: "andy.hsu.2009" initial-KS$: 8.5, after-KS$: 8.5, } { status: "failure", "error": [ "invalid start date" ] } { status: "success" email: "felicia.hsu.2011", initial-KS$: 16.5, after-KS$: 18.5, } { status: "failure" KS$: 15, error: [ "invalid start time" ], }

{ status: "success", email: "lawsoc", initial-KS$: 13, after-KS$: 19, }

user successfully loged in and be redirected to home page The system appears The username does not exist error message in the login page and prompts the user to re-login. The system appears Password is invalid. error message in the login page and prompts the user to relogin. The system pop-ups Please input username. Please input password. error message in the login page and prompts the user to re-login.

The booking information is shown and shown as successful, and could be viewed

The unsuccessful message is shown informing user that the booking is unsuccessful

The unsuccessful message is shown informing user that the booking is unsuccessful

The booking information is shown and shown as successful, and could be viewed (show all 5 of recurrence booking)

You might also like