-
Notifications
You must be signed in to change notification settings - Fork 4
DroidAnimationController Test Plan
In a game, smooth animations for entities like DroidTower not only enhance visual aesthetics but also provide intuitive cues to the player. This test plan outlines the approach for validating that the DroidAnimationController
functions as expected and triggers the right animations for various events.
The main aim of these tests is to ensure that DroidAnimationController
correctly triggers the following animations based on event names:
- "walk" animation when "walkStart" event is triggered.
- "idle" animation when "idleStart" event is triggered.
- "goUp" animation when "goUpStart" event is triggered.
- "goDown" animation when "goDownStart" event is triggered.
- "attackUp" animation when "attackUpStart" event is triggered.
- "attackDown" animation when "attackDownStart" event is triggered.
- "death" animation when "deathStart" event is triggered.
- Initialize necessary services and resources for testing using
ServiceLocator
. - Register
PhysicsService
,ResourceService
, andRenderService
withServiceLocator
. - Load textures and texture atlases for the DroidTower using a new
ResourceService
instance.
Objective: To verify that the "walk" animation plays when "walkStart" is triggered.
Steps:
- Trigger the "walkStart" event on the entity.
- Verify that the
AnimationRenderComponent
'sgetCurrentAnimation
method returns "walk".
Objective: To verify that the "idle" animation plays when "idleStart" is triggered.
Steps:
- Trigger the "idleStart" event on the entity.
- Verify that the
AnimationRenderComponent
'sgetCurrentAnimation
method returns "idle".
Objective: To verify that the "goUp" animation plays when "goUpStart" is triggered.
Steps:
- Trigger the "goUpStart" event on the entity.
- Verify that the
AnimationRenderComponent
'sgetCurrentAnimation
method returns "goUp".
... The same testing procedure will be applied for the rest of the events
- The
ServiceLocator
class functions as expected and has been previously tested. - The
AnimationRenderComponent
class has methods and behavior that are correctly implemented. - External extensions such as
MockitoExtension
andGameExtension
function as expected.
This should cover the basic testing requirements for the DroidAnimationController
. Remember to execute these tests regularly, especially when there are code changes affecting animation logic.