Open katieslobodsky opened 6 days ago
Request
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/admin/reset' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -d ''
Response
Internal Server Error
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/info/current_time' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "year": 2024, "month": 11, "day": 11 }'
Successful Response
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/village/' \ -H 'accept: application/json' \ -H 'access_token: hlath'
{ "buildings": [ "Mine", "Town Hall", "Villager Hut", "Hunter/Forager Hut", "Farm", "Lumber Mill" ], "num_buildings": [ 0, 4, 3, 6, 5, 1 ], "num_villager": 0 }
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/village/catalog' \ -H 'accept: application/json' \ -H 'access_token: hlath'
{ "buildings": [ "Villager Hut", "Hunter/Forager Hut", "Farm", "Lumber Mill", "Mine" ], "costs": [ 30, 35, 40, 25, 25 ], "funds": 45 }
[ "Villager(s) successfully created" ]
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/village/kill_villager?amount=3' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -d ''
"OK"
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/village/build_building' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "quantity": 5, "building_name": "string" } ]'
curl -X 'PUT' \ 'https://testinghosting-yyoz.onrender.com/village/fill_inventory' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "resource_name": "wood", "amount": 10 } ]'
[ "Success" ]
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/village/village_inventory' \ -H 'accept: application/json' \ -H 'access_token: hlath'
[ { "resource_name": "wood", "quantity": 55 }, { "resource_name": "food", "quantity": 50 }, { "resource_name": "water", "quantity": 100 } ]
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/eco/biomes/' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '{ "additionalProp1": 1, "additionalProp2": 2, "additionalProp3": 3 }'
null
curl -X 'PUT' \ 'https://testinghosting-yyoz.onrender.com/eco/grow_plants' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "quantity": 5, "nourishment": 8, "entity_type": "string", "biome_id": 12 } ]'
OK
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/eco/plants/' \ -H 'accept: application/json' \ -H 'access_token: hlath'
[ { "entity_type": "plants", "quantity": 250 } ]
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/eco/prey/' \ -H 'accept: application/json' \ -H 'access_token: hlath'
[ { "entity_type": "prey", "quantity": 59 } ]
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/eco/spawn_prey' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "quantity": 10, "nourishment": 5, "entity_type": "string", "biome_id": 15 } ]'
Biome Prey (GET)
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/eco/prey/55' \ -H 'accept: application/json' \ -H 'access_token: hlath'
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/eco/spawn_predator/' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "quantity": 5, "nourishment": 7, "entity_type": "string", "biome_id": 8 } ]'
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/eco/predator/7' \ -H 'accept: application/json' \ -H 'access_token: hlath'
curl -X 'GET' \ 'https://testinghosting-yyoz.onrender.com/assignments/get_job_list' \ -H 'accept: application/json' \ -H 'access_token: hlath'
[ { "job_id": 2, "job_title": "forager", "villagers_assigned": 0 }, { "job_id": 3, "job_title": "farmer", "villagers_assigned": 0 }, { "job_id": 5, "job_title": "lumberjack", "villagers_assigned": 0 }, { "job_id": 4, "job_title": "butcher", "villagers_assigned": 0 }, { "job_id": 6, "job_title": "miner", "villagers_assigned": 0 }, { "job_id": 0, "job_title": "unassigned", "villagers_assigned": 0 }, { "job_id": 1, "job_title": "hunter", "villagers_assigned": 0 } ]
curl -X 'PUT' \ 'https://testinghosting-yyoz.onrender.com/assignments/assign_villager' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "job_id": 7, "job_title": "hunter", "villagers_assigned": 5 } ]'
curl -X 'POST' \ 'https://testinghosting-yyoz.onrender.com/village/kill_villager?amount=-10000' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -d ''
curl -X 'PUT' \ 'https://testinghosting-yyoz.onrender.com/eco/grow_plants' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "quantity": 10, "nourishment": 5, "biome_id": 222 } ]'
{ "message": [ "['body', 0, 'entity_type']: field required" ], "data": null }
curl -X 'PUT' \ 'https://testinghosting-yyoz.onrender.com/assignments/assign_villager' \ -H 'accept: application/json' \ -H 'access_token: hlath' \ -H 'Content-Type: application/json' \ -d '[ { "job_id": 12, "job_title": "farmer", "villagers_assigned": 1 } ]'
Test Results
Reset (POST)
Request
Response
Internal Server Error
Post Time (GET)
Request
Response
Successful Response
Get Village Overview (GET)
Request
Response
Catalog (GET)
Request
Response
Create Villager (PUT)
Request
Response
Kill Villager (POST)
Request
Response
"OK"
Build Structure (POST)
Request
Response
"OK"
Adjust Storage (PUT)
Request
Response
View Village Inventory (GET)
Request
Response
Post Biome Counts (POST)
Request
Response
null
Grow Plants (PUT)
Request
Response
OK
Plants Overview (GET)
Request
Response
Prey Overview (GET)
Request
Response
Spawn Prey (POST)
Request
Response
"OK"
Biome Prey (GET)
Request
Response
Internal Server Error
Spawn Predator (POST)
Request
Response
"OK"
Biome Predator (GET)
Request
Response
Internal Server Error
Get Job List (GET)
Request
Response
Assign Villager (PUT)
Request
Response
"OK"
Additional Test Cases
Test Case 1: Attempting to Kill a Negative Amount of Villagers - Kill Villager (POST)
Request
Response
"OK"
Test Case 2: Attempting to grow plants without an entity_type - Grow Plants (PUT)
Request
Response
Test Case 3: Attempting to assign a villager as a farmer - Assign Villager (PUT)
Request
Response
"OK"
Test Case 4: Attempting to access all villagers assigned as farmers - Get Job List (GET)
Request
Response