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.

  1. Verify that the menu is empty (GET /menu).
  2. Add a minimum of three menu items (PUT /admin/menu).
  3. Verify that the menu now contains the menu items you added in the previous step (GET /menu).
  4. 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).
  5. Verify that there is no delivery surcharge (GET /admin/surcharge).
  6. Check available reports (GET /report). There should be at least four.
  7. 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.
  8. 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.
  9. Verify that no orders have been placed yet (GET /order).
  10. 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.
  11. Verify that no orders have been placed yet (GET /order).
  12. 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.
  13. Verify that three orders have been placed (GET /order).
  14. 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.
  15. 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.
  16. 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.
  17. Modify the delivery surcharge (POST /admin/surcharge) to a positive value.
  18. Verify that the delivery surcharge has been properly set (GET /admin/surcharge).
  19. 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.
  20. Modify the price for one of the menu items (POST /admin/menu/mid).
  21. 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.
  22. Place a new order, as John Doe, that includes the menu item for which you modified the price.
  23. Cancel the order that's due today (POST /order/cancel/oid). You shouldn't be able to do it.
  24. Cancel the order due tomorrow (POST /order/cancel/oid). Verify that the list of orders for tomorrow is now empty.
  25. Search for customer (GET /customer). There should be three customers, John Doe, Jane Roe, and Bob Smith.
  26. Get detail for John Doe (GET /customer/cid). Verify that there are two orders listed under his personal detail.
  27. Search for customer using a query_string. Try query_string=zxcvb, the search should return no results.
  28. Search for customer using a query_string. Try query_string=bob, the search should return the record for Bob Smith.
  29. 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.
Last update: Apr 21, 2016 Virgil Bistriceanu cs445 Computer Science

$Id: functional-testing-instructions.html,v 1.2 2016/04/22 02:15:30 virgil Exp $