Skip to content

Test results Ethan Vosburg #16

@EthanV1920

Description

@EthanV1920

Testing Flows

Testing Flow 1 (Custom Draft)

  • Ethan calls POST /draft/ with advanced experience level, a PPR draft type, private visibility, and a team name of “Ethan’s Avengers”. Ethan also calls this endpoint with settings specifying a draft length of 60 seconds, roster positions of QB, RB, WR, TE, D/ST, and K, a roster size of 12 players, and a draft size of 10 teams. This returns a new draft with an ID of 1234.

This is what I sent to test flow 1:

{
    "draft_type": "PPR",
        "draft_name": "Ethan's",
        "draft_size": 10,
        "draft_length": 60,
        "roster_positions": [
        {
            "position": "QB",
            "min_num": 1,
            "max_num": 2
        },
        {
            "position": "RB",
            "min_num": 3,
            "max_num": 4
        },
        {
            "position": "WR",
            "min_num": 5,
            "max_num": 6
        },
        {
            "position": "TE",
            "min_num": 7,
            "max_num": 8
        },
        {
            "position": "D/ST",
            "min_num": 9,
            "max_num": 10
        },
        {
            "position": "K",
            "min_num": 11,
            "max_num": 12
        }
    ],
    "flex_spots": 0,
    "roster_size": 12,
    "team_name": "Ethan's Avengers",
    "user_name": "Ethan"
}

I received this return with a 200 ok

{
  "draft_id": 16
}
  • Cameron calls GET /drafts to retrieve a list of all available drafts to join. This list includes Alex’s league, which has a draft ID of 1234.

Calling the get drafts endpoint I got the following results:

[
  {
    "draft_id": 15,
    "draft_name": "Fantastic Footies",
    "draft_type": "LOL",
    "draft_size": 1200,
    "roster_size": 100,
    "draft_length": 11,
    "flex_spots": 60
  },
  {
    "draft_id": 16,
    "draft_name": "Ethan's",
    "draft_type": "PPR",
    "draft_size": 10,
    "roster_size": 12,
    "draft_length": 60,
    "flex_spots": 0
  }
]
  • Cameron calls POST/drafts/1234/join with a team name of “Cameron’s Team” to join the draft room that Alex created and returns a team ID of 65.

Then adding Cameron to the team with this json body:

{
  "team_name": "Ethan's Avengers",
  "user_name": "Cameron"
}

The team ID is then returned as follows:

{
  "team_id": 26
}
  • Cameron calls PUT teams/65/ with a team name of “Cameron’s Commanders” to update his team name.

Updating Cameron's team name as follows:

{
  "team_name": "Cameron's Team"
}

Caution

Finishing this flow results in an internal server error

Internal Server Error

Example Flow 2 (Player Stats)

  • Samantha calls GET /players/ to get a list of all players available in the draft. This includes a player named “Justin Fields” with a player ID of 6752, who Samantha believes is a sleeper in the draft.

Warning

There is no endpoint available on the /docs that is labeled /players and returns a list

Calling the /players/search endpoint with the default values yielded this result:

{
  "previous": "",
  "next": "2",
  "results": [
    {
      "player_id": "LambCe00",
      "player_name": "CeeDee Lamb",
      "position": "WR",
      "team": "DAL",
      "age": 24,
      "standard_fantasy_points": 268,
      "ppr_fantasy_points": 403.2
    },
    {
      "player_id": "AlleJo02",
      "player_name": "Josh Allen",
      "position": "QB",
      "team": "BUF",
      "age": 27,
      "standard_fantasy_points": 393,
      "ppr_fantasy_points": 392.6
    },
    {
      "player_id": "McCaCh01",
      "player_name": "Christian McCaffrey",
      "position": "RB",
      "team": "SFO",
      "age": 27,
      "standard_fantasy_points": 324,
      "ppr_fantasy_points": 391.3
    },
    {
      "player_id": "HillTy00",
      "player_name": "Tyreek Hill",
      "position": "WR",
      "team": "MIA",
      "age": 29,
      "standard_fantasy_points": 257,
      "ppr_fantasy_points": 376.4
    },
    {
      "player_id": "HurtJa00",
      "player_name": "Jalen Hurts",
      "position": "QB",
      "team": "PHI",
      "age": 25,
      "standard_fantasy_points": 357,
      "ppr_fantasy_points": 356.8
    },
    {
      "player_id": "PresDa01",
      "player_name": "Dak Prescott",
      "position": "QB",
      "team": "DAL",
      "age": 30,
      "standard_fantasy_points": 343,
      "ppr_fantasy_points": 342.8
    },
    {
      "player_id": "JackLa00",
      "player_name": "Lamar Jackson",
      "position": "QB",
      "team": "BAL",
      "age": 26,
      "standard_fantasy_points": 331,
      "ppr_fantasy_points": 331.2
    },
    {
      "player_id": "StxxAm00",
      "player_name": "Amon-Ra St. Brown",
      "position": "WR",
      "team": "DET",
      "age": 24,
      "standard_fantasy_points": 212,
      "ppr_fantasy_points": 330.9
    },
    {
      "player_id": "LoveJo03",
      "player_name": "Jordan Love",
      "position": "QB",
      "team": "GNB",
      "age": 25,
      "standard_fantasy_points": 319,
      "ppr_fantasy_points": 319.1
    },
    {
      "player_id": "NacuPu00",
      "player_name": "Puka Nacua",
      "position": "WR",
      "team": "LAR",
      "age": 22,
      "standard_fantasy_points": 194,
      "ppr_fantasy_points": 298.5
    }
  ]
}

There was no player 6752 it does not seem like the players all have numeric IDs so LoveJo03 was chosen and used for the next step

  • Samantha calls GET /players/6752/ to retrieve all the statistics and history for the player named “Justin Fields”. She can now see that the player named “Justin Fields” started 13 games and threw 16 touchdowns last season.

When using the player that was mentioned above, this data is returned:

{
  "player_stats": {
    "history": [
      {
        "player_id": "LoveJo03",
        "year": 2023,
        "age": 25,
        "position": "QB",
        "team": "GNB",
        "games_played": 17,
        "games_started": 17,
        "passing_yards": 4159,
        "passing_tds": 32,
        "interceptions": 11,
        "rushing_atts": 50,
        "rushing_yards": 247,
        "targets": 0,
        "receptions": 0,
        "receiving_yards": 0,
        "receiving_tds": 0,
        "fumbles": 9,
        "fumbles_lost": 3,
        "two_point_conversions": 0,
        "fantasy_points_standard_10": 319,
        "fantasy_points_ppr_10": 319.1,
        "rushing_tds": 4,
        "two_point_conversions_passing": 2
      }
    ]
  }
}

Example Flow 3 (Managing Drafts)

  • Tyler calls PUT /drafts/{draft_id}/start to start the draft that he created. This automatically assigns each team in the draft a random number from 1 to the number of teams in the draft (with no duplicates). This number represents that team’s draft pick.

Using the draft ID generated above (16) the draft was started and returned this:

{
  "success": true,
  "message": "Draft started and draft positions assigned randomly"
}
  • Tyler calls PUT /drafts/{draft_id}/pause to pause the draft. At the current moment, nobody can make a pick and the draft timer for the current pick is halted.

After calling this endpoint a 200 OK response was received

Being unfamiliar with the concept of "picking" I was unable to test weather or not the timer and pick feature was stopped but, it does not seem like there is logic that has been implemented to allow pick.

  • Tyler calls PUT /drafts/{draft_id}/resume once he has turned off the stove to resume the draft.

After calling the resume endpoint, this message is returned:

{
  "success": true,
  "message": "Draft resumed successfully"
}
  • The draft concludes with a call to PUT /drafts/{draft_id}/end.

Then calling the end endpoint this message is returned:

{
  "success": true
}

Additional Test Flows

Additional Flow 1 (Search Functionality)

There should be some way of verifying the search functionality.

  1. Lucas is following the player "Jordan Love" and wants to know more information on the player. He puts his name into the search field of the /player/search endpoint to get more information.
  2. He then hears about another player but only knows their ID of "NacuPu00" and inputs that in to the /player/search as well.
  3. Finally, he wants to see what players are on team "DET" and puts that into the search field.

Additional Flow 2 (Adding Multiple Teammates)

There should be a test of adding multiple teammates to a draft

  1. John creates a custom draft room and wants to add his friends as other teams in the room. He starts by creating his own draft room.
  2. He then adds 10 of his friends to the room.
  3. Finally, he verifies that all of his friends have made it to the room

Additional Flow 3 (Modification During a Draft)

Assuming that there are certain things that cannot be modified during a draft. Attempt to modify during a draft.

  1. Luis starts his draft by calling the start endpoint
  2. Then try to add another person's team to the draft
  3. After attempting to add a person, check to see if they have been added to the draft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions