0felicia0 / Shoetopia

0 stars 0 forks source link

Test Results - Jin Wu #15

Open jinwu23 opened 11 months ago

jinwu23 commented 11 months ago

Example Workflow 1

POST shop/create_account to create a unique username and provide necessary account information POST shop/create_shop is called so the seller can decide their store name. POST listing/create_listing now that the store name is created they can upload their listing for their shoes by providing necessary information such as the name, size, brand, and meaningful tags that will be used for searching

Testing results

  1. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_account' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "name": "jin", "email": "jwu205@calpoly.edu", "password": "password" }'
  2. "OK"
  3. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_shop?account_id=5' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "store_name": "store" }'
  4. "OK"
  5. { "shoe": { "brand": "Converse", "color": "Black", "style": "Chuck 70" }, "listing": { "shop_id": 5, "quantity": 1, "price": 100, "size": 10 } }
  6. Internal Server Error

    Example Workflow 2

    A potential customer comes to our shop because the new shoe that just dropped from Nike is already sold out. First, they use the appropriate filters to get the availability across multiple shops. Then, after reviewing the potential sellers, they add the shoe to their cart and checkout. They can now track the status of the order.

POST/catalog/filter with filters like “brand” = Nike POST/cart/ POST/cart/id/items/product_id where product id is unique POST /carts/id/checkout GET /buyer/track_order The seller will receive their percentage of the sale, and Shoetopia will receive a percentage of the sale. Now, the customer will wait for their new shoes.

Testing results

  1. curl -X 'GET' \ 'https://shoetopia-avot.onrender.com/carts/filters?brand=Nike&min_price=1&sort_order=desc' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA'
  2. [ { "listing_id": 15, "quantity": 1, "price": 550 }, { "listing_id": 13, "quantity": 1, "price": 450 }, { "listing_id": 14, "quantity": 1, "price": 450 }, { "listing_id": 17, "quantity": 1, "price": 350 } ]
  3. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/carts/create_cart' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 6 }' 4.{ "cart_id": 29 }
  4. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/carts/set_item_quantity?cart_id=29&listing_id=13&quantity=1' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  5. "insufficient quantity"
  6. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/carts/checkout?cart_id=6' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  7. Internal Server Error

    Example Workflow 3

    A shoe seller has collected various rare shoes over the years and is looking to list their shoes for sale on Shoetopia. They first need to make an account. From there they will create their shop before finally making their listing.

    Testing results

  8. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_account' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "name": "jin", "email": "jwu205@calpoly.edu", "password": "password" }'
  9. "OK"
  10. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_shop?account_id=7' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "store_name": "store" }' 4."OK"
  11. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_listing' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "shoe": { "brand": "Converse", "color": "Black", "style": "Chuck 70" }, "listing": { "shop_id": 5, "quantity": 1, "price": 100, "size": 10 } }'
  12. Internal Server Error

    Example Workflow 4

    Sellers may apply for verification on Shoetopia to demonstrate to potential buyers that a particular seller is trustworthy and an established reputation. After providing their shop id to create an application request, administrators will run a background check on the profile. The seller will be able to check the status of the application, and if the application is successful, their status will be update accordingly.

Testing results

  1. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/post_application?shop_id=7' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  2. Internal Server Error
  3. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/update_verification?shop_id=6&status=true' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  4. "OK"
  5. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/verification_status?shop_id=6' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  6. null

    Personal Test Case 1

    I want some converse. I will make an account to view the store then apply converse as the filter to see all results of converse. Then I will pick a converse shoe and create a cart as well as add it to my cart and checkout.

    Testing results

  7. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_account' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "name": "jin", "email": "jwu205@calpoly.edu", "password": "password" }'
  8. "OK"
  9. curl -X 'GET' \ 'https://shoetopia-avot.onrender.com/carts/filters?brand=Converse&min_price=1&sort_order=desc' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA'
  10. [ { "listing_id": 28, "quantity": 1, "price": 100 }, { "listing_id": 16, "quantity": 1, "price": 90 } ] 5.curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/carts/create_cart' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 8 }'
  11. { "cart_id": 30 }
  12. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/carts/set_item_quantity?cart_id=30&listing_id=16&quantity=1' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  13. "insufficient quantity"

    Personal Test Case 2

    I hate these converse shoes and want to sell them for dirt cheap. I will make an account and a shop and list my converse on there for 5 bucks. Then I will try to find it on the application by putting converse as a filter.

    Testing results

  14. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_account' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "name": "jin", "email": "jwu205@calpoly.edu", "password": "password" }'
  15. "OK"
  16. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/create_shop?account_id=7' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -H 'Content-Type: application/json' \ -d '{ "store_name": "store" }'
  17. Internal Server Error

    Personal Test Case 3

    I have sold multiple shoes and I want to be a verified store! I will call /shop/post_application and an admin will call /shop/update_verification and set my status to true!

    Testing results

  18. curl -X 'POST' \ 'https://shoetopia-avot.onrender.com/shop/post_application?shop_id=6' \ -H 'accept: application/json' \ -H 'access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imlvd3Fzdm5tZWd4bm9hbGJjdnFsIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTgzNjgzMjUsImV4cCI6MjAxMzk0NDMyNX0.pb9Dq_POqNgChJNjtDCGUiIC0xlYxhcAP70vT5C_xuA' \ -d ''
  19. Internal Sever Error