This project is a simple example of testing automation in Unreal Engine 4 using Blueprint Visual Scripting and Unreal Engine's C++ in the third-person starter kit.
The automation tests will simulate the character running on the map, climbing on the platform and jumping over the box. The character is expected to arrive at the trigger sphere and attain the position.
- ThirdPersonFTestBlueprint: Developed using Blueprint Visual Scripting.
- ThirdPersonFTestScript: Developed using Unreal Engine's C++.
- On Actor Begin Overlap [AActor]: Called when another actor begins to overlap this actor, for example a player walking into a trigger.
- SetActorRotation [AActor/bool]: Set the Actor's rotation instantly to the specified rotation.
- Jump [ACharacter/void]: Make the character jump on the next update.
- Delay [FlowControl]: Perform a latent action with a delay (specified in seconds). Calling again while it is counting down will be ignored.
- Add Movement Input [BlueprintAPI/Input]: Add movement input along the given world direction vector (usually normalized) scaled by 'ScaleValue'.
- Get Actor Forward Vector [Transformation]: Get the forward (X) vector (length 1.0) from this Actor, in world space.
- Variables types used: character, sphere trigger.
- AActor::GetActorForwardVector: Get the forward (X) vector (length 1.0) from this Actor, in world space.
- APawn::AddMovementInput: Add movement input along the given world direction vector.
- AActor::IsOverlappingActor: Check whether any component of this Actor is overlapping any component of another Actor.
- AActor::K2_SetActorRotation: Set the Actor's rotation instantly to the specified rotation.
- UWorld::GetTimerManager: Returns TimerManager instance for this world.
- UPROPERTY: Property Specifiers can be added to the declaration to control in editor.
Follow the steps below to clone and run automated tests.
- Hardware and Software Specifications
https://docs.unrealengine.com/en-US/Basics/RecommendedSpecifications/index.html
- Unreal Engine > 4
https://www.unrealengine.com/en-US/download
- Clone the Git repository.
- Build the project through the Toolbar > Build all Levels.
- Compile the project through the Toolbar > Recompiles and reloads C++.
- Run the tests through the Development Tool > Session Frontend window > Automation > Project > Functional Tests.