Skip to content

Testcases and Outcomes

Jay edited this page Apr 17, 2023 · 7 revisions

Login/Logout

Buyer Login

  1. Give test login to client as buyer
  2. Assert a true response PASS

Seller Login

  1. Give test login to client as seller
  2. Assert a true response PASS

Admin Login

  1. Give test login to client as admin
  2. Assert a true response PASS

Invalid Login

  1. Give test login to client as invalid username
  2. Assert a false response PASS

Logout

  1. Give test login to client as any user
  2. Log out of client as said user
  3. Assert no response PASS

Seller

Add Product

  1. Create test product and fill attributes
  2. Assert equal to ensure proper storage PASS

Remove Product

  1. Create test product and fill attributes
  2. Delete product from database PASS

Edit Product

  1. Create test product and fill attributes
  2. Change attribute
  3. Save model
  4. Assert equal to ensure proper change PASS

Sell Product

  1. Create test product and fill attributes
  2. Assert equal to check quantity
  3. Decrement quantity corresponding with order quantity
  4. Save model
  5. Assert equal to ensure change of quantity

Receive Payment

  1. Create test customer account
  2. Fill user model with attributes
  3. Fill Customer model with user model attributes
  4. Create test order model with customer's attributes
  5. Create example Product model
  6. Fill Order Item model with product's attributes
  7. Assert equal to ensure correct order total
  8. Create shopping cart model
  9. Create cart item model, fill with shopping cart's attributes
  10. Assert equal to ensure correct cart price
  11. Finish order

Customer

Customer Creation

  1. Create customer model
  2. Assert instance of customer model

Customer String Model

  1. Create customer model
  2. Assert equal to ensure instance is string

Customer/UserModel

  1. Create customer model
  2. Assert equal to ensure customer is UserModel

Customer Deletion

  1. Create customer model
  2. Delete UserModel instance
  3. Raise Customer DNE and ensure customer is deleted

Customer Datatbase

  1. Create test user account
  2. Create UserModel instance
  3. Create test user account
  4. Create UserModel instance
  5. Create customer 1 of UserModel instance
  6. Create customer 2 of UserModel instance
  7. Get all customer objects from database
  8. Assert equal to ensure customers 1 and 2 are correctly queried