Skip to content
SlintVox edited this page Apr 10, 2019 · 10 revisions

About

JoshariasSurvival has a hunger and thirst feature. This can be tracked by the hunger bar (orange bar) and thirst bar (blue bar) above the health bar. This test plan is to specifically test hunger and thirst.


image


Thirst

Part 1: Thirst bar goes down over time, and user is able to drink water to fill bar.

  1. Check thirst bar using thirstCheck. Keep track of the number given.
  2. Wait a few seconds for the blue bar to go down.
  3. Check thirst bar again using thirstCheck.
    Verify: The current thirst value given is lower than the thirst value previously given.
  4. Spawn cup using give WoodenCup.
  5. Find body of water or spawn water using give Core:water and place water into a hole.
  6. Right click on body of water with the cup to fill it. Right click again to drink water.
    Verify: Drinking water fills thirst bar.
  7. Check thirst Gin using thirstCheck`.
    Verify: Current thirst value is greater than previous value.

Part 2: Character looses health over time when thirsty.

  1. If necessary set hunger bar and health bar to max using hungerSet 100 and HealthMax
  2. Set regen rate to 0 using setRegenRate 0.
  3. Set thirst bar to 0 using thirstSet 0.
  4. Speed up time using setTimeDilation 10.
    Verify: Character slowly looses heart containers
  5. Set time back to normal using setTimeDilation 10.
  6. View health using showHealth
    Verify: Number is less than 100.

Part 3: Character can die of thirst.

  1. If necessary set hunger bar and health bar to max using hungerSet 100 and HealthMax
  2. Take critical damage using damage 90
  3. Set thirst bar to 0 using thirstSet 0.
  4. Speed up time using setTimeDilation 10.
    Verify: Character dies due to thirst.

Hunger

Part 1: hunger bar goes down over time, and user is able to eat food to fill bar.

  1. Check Hunger bar using hungerCheck. Keep track of the number given.
  2. Wait a few seconds for the hunger bar to go down.
  3. Check hunger bar again using hungerCheck.
    Verify: The hunger value given is lower than the hunger value previously given.
  4. Spawn food using give grape.
  5. Equip grape and hold right click to eat.
    Verify: Eating grape fills hunger bar.
  6. Check Hunger bar using hungerCheck.
    Verify: Current hunger value is greater than previous value.

Part 2: Character looses health over time when hungry.

  1. If necessary set thirst bar and health bar to max using thirstSet 100 and HealthMax
  2. Set regen rate to 0 using setRegenRate 0.
  3. Set thirst bar to 0 using HungerSet 0.
  4. Speed up time using setTimeDilation 10.
    Verify: Character slowly looses heart containers
  5. Set time back to normal using setTimeDilation 10.
  6. View health using showHealth
    Verify: Number is less than 100.

Part 3: Character can eventually die when hungry.

  1. If necessary set thirst bar and health bar to max using thirstSet 100 and HealthMax
  2. Take critical damage using damage 90
  3. Set hunger bar to 0 using hungerSet 0.
  4. Speed up time using setTimeDilation 10.
    Verify: Character dies due to hunger.