BaldoHado / csc365-fitness-tracker

0 stars 0 forks source link

Test results Taran Singh #16

Open tarannssingh opened 3 weeks ago

tarannssingh commented 3 weeks ago

Example Test Case #1: Doug’s Journey to Get Stronger Doug wants to get stronger, but he only knows how to do push-ups. Doug decides to create an account on the app by calling POST /users to create an account. Doug then creates a user workout by calling POST /users/{user_id}/workouts/{workout_name} with the fields 18 for user_id and Pushups for workout_name. Doug also puts in his recent push-up stats to the app: he only does 1 set of 200 push-ups with 100 pounds of weight and no rest. His max is 300 push-ups. Doug then calls /analysis/{user_id}/tips/{fitness_goal} with his user_id of 18 and goal to get stronger. Doug finds out that he is doing too few sets with too many reps. In other words, he needs to split up his workout a bit more. Doug decides to try this out in his next workout session.

Create Doug’s User Account curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/users/Doug/Doug' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: { "first_name": "Doug", "last_name": "Doug" }

Log Doug’s Push-Up Workout curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/users/18/workouts/Pushups?sets=1&reps=200&weight=100&rest_time=0&one_rep_max=300' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: { "user_id": "18", "workout_id": 56, "sets": 1, "reps": 200, "weight": 100, "rest_time": 0, "one_rep_max": 300 }

Analyze Doug’s Workout and Provide Tips curl -X 'GET' 'https://csc365-fitness-tracker-1.onrender.com/analysis/18/tips/strength' -H 'accept: application/json' -H 'access_token: fitnesstracker' Response: { "Pushups": { "sets": "too_few", "reps": "too_many", "weight": "just_right", "rest_time": "just_right" } }

Example Test Case #2: Frank’s Search for Progress Frank wants to be more frank. He doesn’t know what is causing him to not progress in the gym. Frank decides to create an account on the app by calling POST /users to create an account. He hopes to find out which exercise is causing him to not progress. When at the gym, Frank only does Close-Grip Front Lat Pulldown. He calls POST /users/{user_id}/workouts/{workout_name} to input this with his appropriate stats. Frank then calls /analysis/{user_id}/distribution/ to find out if his Close-Grip Front Lat Pulldown is 100% conducive to his lack of progress in the gym. Frank discovers the truth and becomes extremely devastated from the news. He vows to never do Close-Grip Front Lat Pulldown ever again.

Create Frank’s User Account curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/users/Frank/Frank' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: { "first_name": "Frank", "last_name": "Frank" }

Log Frank’s Close-Grip Front Lat Pulldown Workout curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/users/19/workouts/Close-Grip%20Front%20Lat%20Pulldown?sets=1&reps=200&weight=100&rest_time=0&one_rep_max=300' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: { "user_id": "19", "workout_id": 221, "sets": 1, "reps": 200, "weight": 100, "rest_time": 0, "one_rep_max": 300 }

Analyze Frank’s Workout Distribution curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/analysis/19/distribution/' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: [ { "Close-Grip Front Lat Pulldown": 1 } ]

Example Test Case #3: Jattinder’s Preparation for Vertical Jump Training Jattinder wants to increase his vertical jump. He does some research and decides that Bulgarian Split Squat Jump is the move. He uses his friend’s account on the app to see if there is support for Bulgarian Split Squat Jump. He makes a GET request to /workouts/ and finds out there is not. He wants to add the Bulgarian Split Squat Jump so when he signs up for the app later, it is already there. He calls /workouts/workouts/{workout_name}/{muscle_group}/{equipment} with the Bulgarian Split Squat Jump, stating you need a bench and it targets the hamstrings. Jattinder gives back his friend’s account and is content knowing that when he creates an account, he will see Bulgarian Split Squat Jump as an available exercise.

Check Existing Workouts curl -X 'GET' 'https://csc365-fitness-tracker-1.onrender.com/workouts/' -H 'accept: application/json' -H 'access_token: fitnesstracker' Response: [ { "name": "Not Bulgarian Split Squat Jump", "muscle_group": "Not Hamstrings" }, ... ]

Add Bulgarian Split Squat Jump to Workouts curl -X 'POST' 'https://csc365-fitness-tracker-1.onrender.com/workouts/workouts/Bulgarian%20Split%20Squat%20Jump/Hamstring/Bench' -H 'accept: application/json' -H 'access_token: fitnesstracker' -d '' Response: [ { "name": "Bulgarian Split Squat Jump", "muscle_group": "Hamstring", "equipment": "Bench" } ]

BaldoHado commented 2 days ago

Thank you.