- The following tests were performed in sequence starting with an empty database
- User clicks to sign up and create a new customer account
- For example: email "[email protected]" and password "customer"
- Select the "Customer" role from the drop-down
- User logs out and closes the program
- User logs in with the same credentials
- Customer GUI is visible
- Customer logs out
- Expected result: The user can log in and see GUI
- Test Status: Passed
- User clicks to sign up and create a new seller account
- For example: email "[email protected]" and password "seller"
- Select the "Seller" role from the drop-down
- User signs out and closes the program
- User logs in with the same credentials
- Seller GUI is visible
- Seller logs out
- Expected result: The user can log in and see GUI
- Test Status: Passed
Log into test account with email: "[email protected]" and password: "test"
- Seller clicks "Create Store"
- Seller enters store name (ex: "Fish Market")
- Information prompt states success message
- Program returns to the main menu
- Fish Market exists in the "stores.csv" database
- Expected result: The seller can create a store
- Test Status: Passed
- Seller clicks "Edit Store"
- Seller uses drop-down menu and clicks "Fish Market"
- Seller renames store to "Stop & Shop"
- Information prompt states success message
- Program returns to the main menu
- "Fish Market" changed to "Stop & Shop" in the "stores.csv" database
- Expected result: The seller can edit a store's name
- Test Status: Passed
- Seller clicks "Add Product"
- Seller uses drop-down menu and clicks "Stop & Shop"
- Seller names the product "Oreos"
- Seller sets 20 units of the product for sale
- Seller sets the price of the product as "6.99"
- Seller sets the description as "A tasty treat"
- Information prompt states success message
- Program returns to the main menu
- "Oreos" added in the "products.csv" database
- Expected result: The seller can add a product to a store
- Test Status: Passed
- Seller clicks "Edit Product"
- Seller uses drop-down menu and selects "Stop & Shop"
- Seller uses drop-down menu and selects "Oreos"
- Seller uses drop-down menu and selects "Name"
- Seller renames the product "Oreos" to "Biscuits"
- Information prompt states success message
- Program returns to the main menu
- "Oreos" changed to "Biscuits" in the "products.csv" database
- Expected result: The seller can edit a product in a store
- Test Status: Passed
- Seller clicks "Import Products"
- Seller types "ProductsToImport.csv"
- Seller selects "Stop & Shop"
- Information prompt states success message
- Program returns to the main menu
- Products added to store in "products.csv"
- Expected result: The seller can import products into a store
- Test Status: Passed
- Seller clicks "Delete Products"
- Seller uses drop-down menu and selects "Stop & Shop"
- Seller uses drop-down menu and selects "Pasta"
- Information prompt states success message
- Program returns to the main menu
- Product "Pasta" removed from the store "Stop & Shop" in "products.csv"
- Expected result: The seller can remove products from a store
- Test Status: Passed
- Seller clicks "Export Products"
- Seller uses drop-down menu and selects "Stop & Shop"
- Information prompt states success message
- Program returns to the main menu
- File path "/exportProducts/"Stop & Shop.csv" is created with this given store's products Expected result: The seller can remove products from a store Test Status: Passed
- Seller clicks "View Sales by Store"
- Seller can view all stores with the products purchased by customers
- Seller clicks "Ok" and program returns to main menu
- Expected result: The seller can view stores by sales
- Test Status: Passed
- Seller clicks "View Customer Shopping Carts"
- Seller can view all the their items that are currently in customer's shopping carts
- Seller clicks "Ok" and program returns to main menu Expected result: The seller can view their customer's shopping carts Test Status: Passed
- Seller clicks "View Customer Dashboard"
- Seller uses drop-down menu and selects "Customer Email"
- Seller uses drop-down menu and selects "Ascending"
- Seller can view all customers with their emails in alphabetical ascending order
- Seller can exit out and return to main menu
- Expected result: The seller can view all customers in a sorted manner
- Test Status: Passed
- Seller clicks "View Customer Dashboard"
- Seller uses drop-down menu and selects "Product Name"
- Seller uses drop-down menu and selects "Ascending"
- Seller can view all their products' names in alphabetical ascending order
- Seller can exit out and return to main menu
- Expected result: The seller can view their products' names in a sorted manner
- Test Status: Passed
- Seller clicks "Delete Store"
- Seller uses drop-down menu and selects "Stop & Shop"
- Information prompt states success message
- Expected result: The seller can delete a store
- Test Status: Passed
Sign out of the previous seller and sign into the customer account with email: "[email protected]" and password: "test"
- Customer clicks "View All Products" button
- Select "Biscuits" from the drop-down menu of all products
- GUI displays product information and a question panel regarding purchase
- Customer selects "Yes"
- Customer writes "5" for purchase quantity
- Information panel displays a success message
- Expected result: The customer can add items to their cart
- Test Status: Passed
- Customer clicks "Search For Product" button
- Customer writes "Biscuits" for product search
- Customer selects "Biscuits" from the drop-down menu of all products
- GUI displays product information
- Customer selects "Ok"
- Program returns to the main menu
- Expected result: The customer search for products
- Test Status: Passed
- Customer clicks "Sort Products" button
- GUI appears with all products and "Sort by Price" and "Sort By Quantity" buttons
- Customer can click "Sort by Price for ascending products by price
- Customer can click "Sort by Quantity for ascending products by quantity available
- Customer can exit out to return to the main menu
- Expected result: The customer sort products
- Test Status: Passed
- Customer clicks "View Shopping Cart" button
- Information panel displays the "Biscuits" item in the cart with relevant information
- Expected result: The customer can purchase items
- Test Status: Passed
- Customer clicks "Checkout Items" button
- Information panel displays a success message
- The customer's entries in "shoppingCarts.csv" are cleared, the "products.csv" quantity is updated, and "shoppinghistories.csv" is updated
- Expected result: The customer can purchase items
- Test Status: Passed
- Customer clicks "View Purchase History" button
- Information panel displays the "Biscuits" item in the cart with relevant information (Same format as View Shopping Cart)
- Expected result: The customer can view purchase history
- Test Status: Passed
- Customer clicks "View Stores Dashboard" button
- Customer can click "Sort Name" from drop-down menu
- Customer can click "Ascending" from drop-down menu
- Information panel displays the all the stores with product sales and revenue
- Customer can exit out to main menu
- Expected result: The customer can view stores page
- Test Status: Passed
- Customer clicks "View Purchases Dashboard" button
- Customer can click "Sort Name" from drop-down menu
- Customer can click "Ascending" from drop-down menu
- Information panel displays the all the stores the customer has purchased products and the money spent
- Customer can exit out to main menu
- Expected result: The customer can view their personal purchase dashboard
- Test Status: Passed
- Customer clicks "View All Products" button
- Select "Spicy Chicken Wings" from the drop-down menu of all products
- GUI displays product information and a question panel regarding purchase
- Customer selects "Yes"
- Customer writes "5" for purchase quantity
- Information panel displays a success message
- Customer clicks "Remove Item From Shopping Cart" button
- Customer can click "Spicy Chicken Wings" from drop-down menu
- Information panel displays a success message
- Expected result: The customer can remove items
- Test Status: Passed
Stay signed into example customer account
- Customer clicks "Edit Email" button
- Customer can change their email to "[email protected]"
- Information panel displays a success message
- Log out of customer account
- Log in with email: "[email protected]" and password: "test"
- The main menu displays new email at the top of the panel
- Expected result: The customer can change their email (They must log in with the new email)
- Test Status: Passed
- Customer clicks "Edit Password" button
- Customer can change their password to "yes"
- Information panel displays a success message
- Log out of customer account
- Log in successfully with email: "[email protected]" and password: "yes"
- Expected result: The customer can change their password (They must log in with the new password)
- Test Status: Passed
- Customer clicks "Delete Account" button
- Customer clicks "yes" to confirm
- Program returns to main log in menu
- Log in with email: "[email protected]" and password: "yes"
- Error message is displayed
- Expected result: The customer can delete their account (They can no longer log in)
- Test Status: Passed
- Each test case performed independently of other test cases
- Database populated where necessary
- Customer 1 logs in
- Customer 2 logs in
- Customer 1 adds all of a product to cart
- Customer 2 adds one of that product to cart and checks out
- Customer 1 attempts to check out Expected result: Customer 2 sucessfully checks out. Customer 1 gets an error message and the product with too much quantity is removed. Result: as expected
- Customer 1 logs in
- Customer 2 logs in
- Customer 1 adds all of product 1 to cart, does not finish adding to cart
- Customer 2 adds one of product 1to cart and checks out
- Customer 1 attempts to check out Expected result: Customer 2 sucessfully checks out. Customer 1 attempts to add to cart with a previously valid value and recieves an error. Result: as expected
- Customer 1 logs in
- Customer 2 logs in
- Customer 1 adds all of product 1 to cart
- Customer 1 adds all of product 2 to car
- Customer 2 adds one of product 1 and product 2 to cart and checks out
- Customer 1 attempts to check out Expected result: Customer 2 sucessfully checks out. Customer 1 gets an error message and the first product with too much quantity is removed. The second product remains in cart Result: as expected
- Sign in with a non-existent account with valid format Expected result: user recieves error message and is sent back to login Result: as expected
- Sign in with a invalid format email Expected result: user recieves error message and is sent back to login Result: as expected
- Sign in without selecting a user type from the drop down menu Expected result: user recieves error message and is sent back to login Result: as expected
- Seller attempts to input non-numerical data to price or quantity Expected result: user recieves error message at end of product creation and is sent back to homepage Result: as expected
- Sign up for a customer account
- Close program
- Sign up for a customer account with the same credentials as step 1 Expected result: user recieves error message (user already exists) and is sent back to sign up Result: as expected
- Sign up for a customer account
- Close program
- Sign up for a seller account with the same credentials as step 1 Expected result: user recieves error message (user already exists) and is sent back to sign up Result: as expected
Expected result: Error message is shown and user is returned to previous state Result: as expected