You are on page 1of 24

Carnegie

Mellon Univesity

Test Cases Document


Team Name: Touch Bombers Team Members: Deyuan Deng , Wei Zhou, Haoyang Li
Your submission works with API-10 (Build SDK, Minimum Required SDK and AVD). Project could execute using AVD - version 10. If this checklist item is not fulfilled your project will not be graded. No partial credit will be given for projects using another API version. We use Google APIs platform 2.3.3, API 10 Provide resources to support at least two resolutions. We provide resources for two resolutions, one is Nexus One; the other one is 5.1in WVGA.

All proposed features in Requirements documents have been implemented. Ten features in our finalized requirement document are implemented.

Code is readable and easy to follow.

Carnegie Mellon Univesity DeLiWei Food Factory


We add comments in our code and its easy to read. Coding follows Java coding standards. We follow the java coding standards. Project is error and warnings free. No errors and warnings. Properties values are declarative versus hard coded wherever required (as guided by the compilation requirements). Adequate exception handling to capture hangs, warnings or errors. We handle the exceptions, like we when user input wrong password, provider doesnt provide image for an item, database insert conflict, etc. Code repetition is avoided. Build classes/objects with adequate packaging. We have four packages in our project, and there is no repetition is in our code. Android Service implemented (Local or Remote) We implement position upload service and update service.


Test cases for each user case:
Use-Case ID 1 Customer BROWSE 2 Customer ORDER 3 Customer TRANSACTION 4 Customer TRACE 5 Provider BROWSE 6 Provider CONFIRM 7 Provider UPLOAD 8 Provider TRACE 9 Courier BROWSE 10 Courier CONFIRM 11 Courier TRANSACTION 12 LOGIN 13 LOGOUT Use-Case Name Customer browses items. Customer orders one item Customer pays for one item Customer traces his item Provider browses the items. Provider confirms the order. Provider uploads the order Provider traces the order Courier user browse for delivery tasks Courier user confirm delivery request Courier user is in transaction with the customer Actor logs into system Actor logs out system Priority High High High High High High High High High High High Low Low

Carnegie Mellon Univesity


14 SIGNUP Actor creates a new account Low

Test case for :


Use-Case SIGNUP Descriptions: Preconditions: Postconditions: Primary Course: Actor signs up Customer, provider and courier create their own accounts - User is logged in - User is at browse view - User creates own account - User is at login view User signs up 1 User clicks SIGN UP button 2 User fills in the password and name 3 The new account is updated on the server. Alternative Courses: Optional: Issue: Currently None


After clicking the button Signup, user could create a new account of three identities, which are provider, customer and courier.

Carnegie Mellon Univesity DeLiWei Food Factory


After fills in the name and password, the user finishes registration by clicking the Signup button and logs in.

Carnegie Mellon Univesity


Test case for:


Use-Case LOGIN Description: Preconditions: Actor logs into system Customer, courier or provider logs into system - User is at login page - User is registered Postconditions: - User is logged in - User is in browse view Primary Course: User logs in 1. User types username in login area of home page. 2. User types password in login area. 3. User selects login. 4. System checks to see that user is registered and password is correct. 5. System acknowledges login and switch to the browse view Alternative Courses: Error detected in user name and password 5. System displays error message and prompts user to re-enter username and password. 6. User re-enters name and password. 7. User selects login. 8. System checks to see that user and password is correct or not 9. If username and password are correct then system displays page acknowledging login, else repeat user name error procedure. Optional: Issue:

Carnegie Mellon Univesity DeLiWei Food Factory


If the user types the uncreated user name or incorrect password, the system will remind the user and let him type again:

If the user types the correct username and password, the user successfully logs in.

Carnegie Mellon Univesity


Test case for Use-Case LOGOUT Descriptions: Preconditions: Postconditions: Primary Course: Actor logs out system Customer, courier or provider logs out system - User is logged in - User is at browse view - User is logged out - User is at login view User logs out 1. User press logout. 2. System acknowledge logout. Alternative Courses: Optional: Issue: When user clicks log out, an alert dialogue will appear to let user confirm his decision. Currently None

Carnegie Mellon Univesity DeLiWei Food Factory

If user clicks Yes Button, user successfully logs out.

If user clicks No, user will come back to the previous view.

Carnegie Mellon Univesity


Carnegie Mellon Univesity DeLiWei Food Factory Test case for Use-case BROWSE Description: Preconditions: Customer browses items. Customer browses items displayed in browse view. - User is logged into the system. - User is in the browse view Postconditions: Primary Course: Display a list of products and a list of orders Get product list success:

1 2

Fetch the product list file from the data server Display the product list

Get delivery order list success

3 4
Alternative Courses:

Fetch the order list file from the data server Display the order list User presses on the "refresh" button Reload product list and delivery task list from the server and display th e new content

Refresh the browser view

5 6
Optional Issue

if the product list is empty: show nothing in the product list if the order list is empty: show nothing in the order list

After customer logs in, he comes to the browse view.

Carnegie Mellon Univesity


Use-case ORDER Description: Preconditions: Postconditions: Customer orders one item. Customer selects one item to order. - User is logged as a customer - User is at the browse view - Customer has ordered one item - Add a new task of state Pending for confirmation and send it to the server - Customer is at the browse view Primary Course: Successful order:

1 2 3 4 5
Alternative Courses: Cancel

User select a product in the product list Switch to the Order view User click the Confirm Order button Add a new order of which the state is Pending and send it to the data server Switch to browse view User click the back button Switch to browse view

1 2
Optional: Issue:

The customer could click the food on the screen to see the details. After customer clicks the food Fried Chicken:

Carnegie Mellon Univesity DeLiWei Food Factory If the customer likes it and wants to buy it, he could click the button Order it Now, then the ordered food will appear on the order list.

Carnegie Mellon Univesity


Test case for Use-case TRANSACTION Description: Preconditions: Customer pays for one item Customer decides to pay for one item and waits for the courier. - User is logged in as a customer - User is in the browse view - The order list is not empty and at least one of them is in the state of Courier Confirmed Postconditions: - Complete transaction with the courier actor using NFC. - Change the state of the selected order to Order Completed - The selected orders information on the data server is updated - User is in browse view Primary Course: Successful transaction

1 2 3 4 5
Alternative Course:

User select his confirmed order in the state of Courier Confirmed Switch to the Customer Transaction view Start NFC service and try to complete transaction with the couriers device Send a message to the data server and change the state of the selected order to the state of Order Completed Switch to browse view

Return to browse view

3 4
Optional: Issues: the demo.

User click the back button Switch to browse view

The customer can finish the transaction with the courier by NCF feature. We will show this during

Carnegie Mellon Univesity DeLiWei Food Factory

Use-case TARCE Description: Preconditions: Customer traces the item Customer traces the item to know its position - User is logged in as a customer - User is in the browse view - User has successfully ordered one item Postconditions: - User sees the items position on the map. - User is in browse view Primary Course: Successful tracing 1 User select one confirmed order in the state of Provider Confirmed 2 User sees the position of the food by GPS. 3 Switch to the Customer Tracing view

4
Alternative Course:

Switch to browse view

Return to browse view

3 User click the back button 4


Optional: Issues: When the food is delivering, the customer can trace the position of the food to know how soon the food will arrive. Switch to browse view

Carnegie Mellon Univesity


Test case for Use-case BROWSE Description: Preconditions: Postconditions: Primary Course: Provider browses the items. Provider can see the details of each item. - User is logged in as a provider - User is in the browse view Display a list of products and a list of delivery tasks Get product list success:

1 2

Fetch the product list file from the data server Display the product list

Get delivery task list success

3 4
Alternative Courses: Optional: Issues:

Fetch the delivery order list file from the data server Display the delivery order list

if the product list is empty: show nothing in the product list if the delivery task list is empty: show nothing in the product list

Carnegie Mellon Univesity DeLiWei Food Factory After the provider logs in, he comes to the browse view which is little different with the customers and couriers. All the ordered food is listed with their states.

Test case for User-case Confirm Description Preconditions Provider confirms the order Provider confirms the unprocessed orders from the customer. - User is logged in as a provider - User is in the browse view - The order list is not empty and at least one of them is in the state of Pending Postconditions - Change the state of the selected delivery task to Provider Confirmed - The selected tasks information on the data serve is updated - User is in the browse view Primary Course Successful confirmation

1 2 3 4 5
Alternative Course

User select a task in the state of Pending Switch to the Order Confirmation view User click the Confirm button Send a message to the data server and change the state of the selected task to the state of Pending for delivery confirmation Switch to browse view

Decline to confirm

Carnegie Mellon Univesity


3 4
Optional Issues

User click the back button Switch to browse view

The provider can confirm one pending item which is ordered by the customer earlier. After provider confirms, the state of the food will be changed to Provider Confirmed.

User-case UPLOAD Description Preconditions Provider uploads the order Provider uploads a new kind of food - User is logged in as a provider - User is in the browse view Postconditions - Add a new item in the Listing Food Items - The new items information is updated on the data serve - User is in the browse view Primary Course Successful confirmation

6 7 8 9

User clicks the button UPLOAD Switch to the UPLOAD view User types the item ID, price and name User takes a photo of the new item

10 User clicks the UPLOAD button. 11 Send a message to the data server and the new items information is
updated on the server

12 Switch to browse view


Alternative Course Decline to confirm

Carnegie Mellon Univesity DeLiWei Food Factory

5 6
Optional Issues

User click the back button Switch to browse view

The provider can upload a new kind of food by clicking the button UPLOAD. The provider can take a picture of the food, fill in the name, ID and price, then upload it by clicking the UPLOAD button. Because AVD can not take the photo, we will present this function during the demo.

Use-Case: TRACE Description: Preconditions: Provider traces the order

Provider can know the position of the delivering food. - User is logged in as a provider - User is in the browse view - The order list is not empty and at least one of them is in the state of Courier Confirmed or Provider Confirmed.

Postconditions: Primary Course:

- User could know the position of customer Successful trace

1 2 3 4

User select a task in the state of Courier Confirmed or Provider Confirmed Switch to the Trace view Start GPS service to locate the customer Switch to browse view

Carnegie Mellon Univesity


Alternative Courses: Return to browse view

3 4

User click the back button Switch to browse view

Optional Issues

Provider can know the position of the delivering food by clicking the food, and then clicks the Trace Your Order button.

Test case for Use-Case: BROWSE Description: Preconditions: Postconditions: Primary Course: Get product list success: - User is logged in as a courier - User is in the browse view Display a list of products and a list of delivery tasks Courier user browse for delivery tasks A courier user browses for delivery requests

1 2

Fetch the product list file from the data server Display the product list

Get delivery task list success

3 4

Fetch the delivery task list file from the data server Display the delivery task list

Carnegie Mellon Univesity DeLiWei Food Factory Alternative Courses: Optional Issues if the product list is empty: show nothing in the product list if the delivery task list is empty: show nothing in the task list After the courier logs in, he comes to the browse view: Refresh the browser view

Reload product list and delivery task list from the server and display t he new content

Test case for Use-Case: CONFIRM Description: Preconditions: - User is logged in as a courier - User is in the browse view - The delivery task list is not empty and at least one of them is in the state of Provider Confirmed Postconditions: - Change the state of the selected delivery task to Courier Confirmed - The selected tasks information on the data serve is updated - User is in the browse view Courier user confirm delivery request A courier user confirm a delivery request and start delivery

Carnegie Mellon Univesity


Primary Course: Successful confirmation of the delivery

1 2 3 4 5
Alternative Courses:

User select a task in the state of Provider Confirm Switch to the Courier Confirmation view User click the Confirm button Send a message to the data server and change the state of the selected task to the state of Courier Confirmed Switch to browse view

Decline to confirm

3 4

User click the back button Switch to browse view

Optional Issues

If the courier is going to deliver one item, he can choose the food which is confirmed by the provider and confirm it. The state will change to Courier Confirmed.

Carnegie Mellon Univesity DeLiWei Food Factory

Carnegie Mellon Univesity


Test case for Use-Case: TRANSACTION Description: Preconditions: Courier user is in transaction with the customer A courier user arrives at the customers place and complete the delivery - User is logged in as a courier - User is in the browse view - The delivery task list is not empty and at least one of them is in the state of Courier Confirmed Postconditions: - Complete transaction with the customer using NFC. - Change the state of the selected delivery task to Completed - Update the selected tasks information on the data server - User is in browse view Primary Course: Successful transaction

5 6 7 8 9
Alternative Courses:

User select a task in the state of Courier Confirmed Switch to the Courier Transaction view Start NFC service and try to complete transaction with the customers device Send a message to the data server and change the state of the selected task to the state of Order Completed Switch to browse view

Return to browse view

5 6

User click the back button Switch to browse view

Optional Issues

Carnegie Mellon Univesity DeLiWei Food Factory When the courier successfully sent the food to the customer, he can click the food and come to the transaction view. He will finish the transaction with the customer by using NFC feature. Since AVD does not support it, we will present this feature in the demo.