Project Functional Testing
For purposes of this description, all URLs are relative to the base url of http://localhost:8080/delectable
The JSON used for testing purposes will match the format desribed in the
project API.
Functional testing will begin only after the tester was able to build the project following your build
instructions and then deploy the resulting .war file to a tomcat server. The specific actions taken by
the tester before beginning functional acceptance testing are described
here.
So, here are the steps we'll take to test the functionality of your project.
- Verify that the menu is empty (GET /menu).
- Add a minimum of three menu items (PUT /admin/menu).
- Verify that the menu now contains the menu items you added in the previous step (GET /menu).
-
Get the detail about one of the menu items and validate that it matches what was in the PUT /admin/menu
request (GET /menu/mid where mid is one of the menu items).
- Verify that there is no delivery surcharge (GET /admin/surcharge).
- Check available reports (GET /report). There should be at least four.
-
Check orders to deliver today (GET /report/rid where rid is the ID of the report for today's deliveries).
The report should show no orders for today.
-
Check orders to deliver tomorrow (GET /report/rid where rid is the ID of the report for tomorrow's deliveries).
The report should show no orders for tomorrow.
- Verify that no orders have been placed yet (GET /order).
-
Attempt to create order (PUT /order) with invalid data (e.g. count for menu item is below
the minimum allowed). Validate that the app rejects the input data.
- Verify that no orders have been placed yet (GET /order).
-
Create three orders by three different customers - John Doe, Jane Roe, Bob Smith (PUT /order).
Make the first order with single menu item, due today. Make the second order with two items from the menu,
due tomorrow. Lastly, make the third order three items, due next Saturday.
- Verify that three orders have been placed (GET /order).
-
Check orders to deliver today (GET /report/rid where rid is the ID of the report for today's deliveries).
The report should show one order with a single line item. Make sure the total amount on the order matches
price_per_person*count.
-
Check orders to deliver tomorrow (GET /report/rid where rid is the ID of the report for tomorrow's deliveries).
The report should show one order with two line items.
-
Use the start_date and stop_date to get a list of deliveries for next Saturday
(GET /report/rid/?startdate=YYYYMMDD&end_date=YYYYMMDD) using the rid for the "Orders delivery report".
The report should show a single order with three line items. Make sure the surcharge is zero.
- Modify the delivery surcharge (POST /admin/surcharge) to a positive value.
- Verify that the delivery surcharge has been properly set (GET /admin/surcharge).
-
Use the start_date and stop_date to get a list of deliveries for next Saturday
(GET /report/rid/?startdate=YYYYMMDD&end_date=YYYYMMDD) using the rid for the "Orders delivery report".
The report should show a single order with three line items.
Validate that the surcharge is still zero. previously.
- Modify the price for one of the menu items (POST /admin/menu/mid).
-
Verify that three orders that had been placed (GET /order) before you modified the price of a
menu item have not changed, in particular that the total on those orders is the same as before.
- Place a new order, as John Doe, that includes the menu item for which you modified the price.
- Cancel the order that's due today (POST /order/cancel/oid). You shouldn't be able to do it.
-
Cancel the order due tomorrow (POST /order/cancel/oid). Verify that the list of orders
for tomorrow is now empty.
-
Search for customer (GET /customer). There should be three customers, John Doe, Jane Roe, and Bob Smith.
-
Get detail for John Doe (GET /customer/cid). Verify that there are two orders listed
under his personal detail.
-
Search for customer using a query_string. Try query_string=zxcvb, the search should return no results.
-
Search for customer using a query_string. Try query_string=bob, the search should return the record for
Bob Smith.
-
Run the revenue report with a start_date of today and an end_date of next Saturday.
The (projected) revenue report should show the total revenue generated by the three outstanding orders and,
on a separate line item, the total in surcharges.
$Id: functional-testing-instructions.html,v 1.2 2016/04/22 02:15:30 virgil Exp $
|