Manual Tests - HDBerry/TheNightShift GitHub Wiki
Because all interactions are through the GUI, here are all the tests we have implemented:
Character.java
- Created a character with all stats set to zero
Expected: Strength, Reflex, Intelligence, Perception, Dexterity, and Luck were all set to zero
Result: Pass
Items.java
- Populates the list using items.txt
Expected: populates list with the name of the item, the weight and the value
Result: Pass
Dice.java
- Called Dice.roll() to see if the value was between 3 and 18. I received a 12. I repeated this test 10 more times, getting a 4, 7, 15, 13, 10, 18, 4, 6, 9, 12. The test is successful.
Garage.java
- I created a new character. Went into the house, then to the kitchen, and then into the garage. It displayed the 3 messages that it is supposed to display. You are told what room you are in, what you see initially, and what other doors may be in the room.
Navigation testing and Character persistence testing - Dustin
After creating a new Character test, using the GUI, the room navigation was tested as follows:
-> (input) << (output)
** create character test (default stats) << updated room description to outside
-> help << help menu
-> go onto the roof << rand navError
-> go inside the house << updated description to living room << updated history with room exits
-> help << help menu
-> exit
** load character test << living room description loaded << updated history with room exits
-> go to neverland << random navError
-> go to basement << updated room description to basement
-> go kitchen << random navError
-> save -> exit
** load test character << updated room description to basement
-> go living << update room description to living room << updated history with living room exits
-> go bedroom << updated room description to bedroom
-> go to basement << random navError
-> go to kitchen << updated room description to kitchen
-> go to garage << updated room description to garage
-> save -> exit
** load test character << updated room description to garage.
- all rooms tested, can only access rooms based on the current room you are in.
- character persistence saves the location and state of your character
Errors - some rooms do not show exits, minor error
- implement exits for every room.
Command Line - Connor Nelson
=====
-
Load existing (or create new) character
-
Type roll into command line
Expected: The dice should be rolled 3 times, the console should output the combined total of the rolls, the command line should be locked during the rolls Result: Pass
- Type clear into command line
Expected: The command line should have no text except the upper "Command History" Result: Pass
- Type help into command line
Expected: The command line should list out a few basic commands Result: Pass
- Type exit into command line
Expected: The GUI should close and the program should end Result: Pass
=====
- Create new character with default stats, but only 5 strength
- Type "level strength 2" into command line
Expected: Strength should be 7 in the upper right, Exp should be 3 Result: Pass
GUI Test - Kunal Lanjewar
-
Create new character via GUI. Result: Passed
-
Set Name and attributes such as Strength, Reflex, Etc.
Result: Passed -
On Stats page, Dexterity points are not aligned.
-
Enter Room by command go Kitchen, or room name. Result: Passed
-
Roll command rolls dice and should show dice rolling. Result: Passed
-
Incorrect go command display "You can't go that way message" 3 time. Result: Failed
Tests for escaping After failing to get an item, type escape. The dice will roll and if you roll under your luck, you will escape. If you roll over your luck, you will get caught. After escaping or getting caught, the game is over.
Status: Passed
Tests for Leaderboard Create a new character. Go inside. Go basement. Take vault. Close game. Open game, view leaderboard. Leaderboard shows character with level and total value of inventory. It also shows if the character was caught or escaped if the game is over for that character.
Status: Passed
Tests for Garage.java Once a character is created, navigate from the outside to the garage by ->go inside ->go kitchen ->go garage. Once in the Garage, here are the different tests: ->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->open toolbox This will allow the player to take from the toolbox. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->open toolbox This will allow the player to take from the toolbox. ->take crowbar Crowbar is added to the player’s inventory STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->open toolbox This will allow the player to take from the toolbox. ->take crowbar Crowbar is added to the player’s inventory ->smash window Skill check happens on whether or not you are strong enough to do this. If you fail this, the game says that you failed and you have a chance to escape. If you pass this, then a message is printed out saying that there is a GPS on the dashboard. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->open toolbox This will allow the player to take from the toolbox. ->take crowbar Crowbar is added to the player’s inventory ->smash window Skill check happens on whether or not you are strong enough to do this ->take GPS GPS is added to the player’s inventory STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->take speakers OR take bikes The program outputs that these are too heavy to pick up and take out. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->take crowbar OR smash window OR take cash All of these commands will display a message saying that you cannot do that yet. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->move boxes This causes a skill check against your strength. If you pass then it displays a message that there is some cash on the ground. If you fail, then it will say you were caught and you have a chance to escape. STATUS: Passed
->turn on lights OR turn lights OR switch lights OR turn on the lights This updates the description to show what you can see now. ->move boxes This causes a skill check against your strength. If you pass then it displays a message that there is some cash on the ground. If you fail, then it will say you were caught and you have a chance to escape. ->take cash Cash is added to your inventory. STATUS: Passed
Tests for basement
- Create new character
- Go inside
- Go basement
Take vault
- Roll against strength
- If roll <= strength
- Then take vault
- Else attempt escape Status: Passed
Take katana
- Roll against reflex
- If roll <= reflex
- Then take vault
- Else attempt escape Status: Passed
Take keyboard
- Roll against intelligence
- If roll <= intelligence
- Then take vault
- Else attempt escape Status: Passed
Take ring
- Roll against perception
- If roll <= perception
- Then take vault
- Else attempt escape Status: Passed
Take pot
- Roll against dexterity
- If roll <= dexterity
- Then take vault
- Else attempt escape Status: Passed
Look armor
- Output "You notice a fancy Japanese sword" Status: Passed
Look doll
- Output "You notice some nice jewelery" Status: Passed
Look furnace
- Output "You notice some expensive looking pots and pans" Status: Passed
Look vault
- Output "It's a vault..." Status: Passed
Look computer
- Output "Computer, mouse, keyboard, and monitor--what more could you need?" Status: Passed
Tests for bedroom.java - Kunal Lanjewar
- Once I created a new character, I go inside the bedroom by typing following ->go inside -> go bedroom
STATUS: Passed
Once in the Bedroom, here are the different tests I performed:
- Now I search or explore or find for vacuum cleaner
-> search vacuum -> find vacuum -> look vacuum
This should give you a message that you found roomba. STATUS: Passed
-
Now if I type "take roomba", It should roll dice and I should be get it or fail depending on the dice. -> STATUS: Passed
-
Now I search or explore or find for entertainment
-> search entertainment -> find entertainment -> look entertainment
This should give you a message that you found tv. STATUS: Passed
-
Now if I type take tv, It should roll dice and I should be get it or fail depending on the dice. STATUS: Passed
-
Now I search or explore or find for game -> search game -> find playstation -> look fun
This should give you a message that you found playstation. STATUS: Passed
-
Now if I type "take playstation", It should roll dice and I should be get it or fail depending on the dice. STATUS: Passed
-
Now I search or explore or find for wall
-> search wall -> find painting -> look wall
This should give you a message that you found painting. STATUS: Passed
-
Now if I type take painting, It should roll dice and I should be get it or fail depending on the dice. STATUS: Passed
-
If you fail, you should escape by typing escape. -> escape STATUS: Passed