-
Notifications
You must be signed in to change notification settings - Fork 9
Buildables Team Sprint 2 Test Plan
For testing in this sprint, we planned to use primarily mock based testing to ensure that our classes interacted with other classes in the expected manner. We also did some assertion testing for classes which maintained state, such as the CostComponent
class.
The cost component test used mocking to test its' interactions with other classes. We decided to do white box testing for this class since it requires an intricate knowledge of how it interacts with other classes. When creating the testing plan for this class, we thought through the different cases which were possible with this class. The cases we came up with were:
- Placed with not cost
- Placed with one cost
- Placed with multiple costs
- Removed with no health component and no cost
- Removed with no health component and one cost
- Removed with no health component and multiple costs
- Removed with health at 100% and no cost
- Removed with health at 100% one cost
- Removed with health at 100% and multiple costs
- Removed with health at 50% one cost
- Removed with health at 50% and multiple costs
- Removed with health at 0% one cost
- Removed with health at 0% and multiple costs We then created a test for each of these cases. We additionally verified it by placing down structures with a cost in the game and checking that the appropriate resource meter was depleted.
While this component didn't end up being used for this sprint due to time constraints, we still decided to test it in case we wished to use it for future sprints. For this test we employed both mock testing and assertions so we could test both the internal state and the classes interactions with other classes. We did white box testing since we needed to know what classes it interacted with. For the cases, we thought up what all the possibilities could be. Because it relies on the Rotation enum, there only ended up being 4 possibilities.
- Rotation.NORTH
- Rotation.NORTH
[Yugansh Pancholi]
For testing the functionality of healing.java, firstly we placed both walls and turrets in the game area. Then we lured the enemies to attack us and hid behind these structures for them to take damage. Damage to walls and turrets was then healed by pressing 3 and T-key respectively on keyboard, which is a command in game to open the toolbox and selecting healing icon. Once selected, we clicked on damaged walls and turrets which restored their health to maximum.
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files