Navigation
API > API/Plugins > API/Plugins/Gauntlet
Base class for games to implement test controllers that use the Gauntlet native framework. This is a very thin class that is created automatically based on command line params (-gauntlet=MyControllerName) and provides easily overridden functions that represent state changes and ticking
In essence your derived class should implement logic that starts and monitors a test, then calls EndTest(Result) when the desired criteria are met (or not!)
| Name | UGauntletTestController |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Gauntlet/Source/Gauntlet/Public/GauntletTestController.h |
| Include Path | #include "GauntletTestController.h" |
Syntax
UCLASS (MinimalAPI)
class UGauntletTestController : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UGauntletTestController
Derived Classes
- UAutomatedPerfTestControllerBase
- UGauntletTestControllerBootTest
- UGauntletTestControllerErrorTest
- UICVFXTestControllerBase
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGauntletTestController
(
const FObjectInitializer& ObjectInitializer |
Default constructur | GauntletTestController.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UGauntletTestController() |
GauntletTestController.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ParentModule | FGauntletModule * | GauntletTestController.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
APlayerController * GetFirstPlayerController() |
Helper function that returns the first player controller in the world (may be null depending on when called). | GauntletTestController.h | |
UWorld * GetWorld() |
Return the current world | GauntletTestController.h | |
virtual void OnInit() |
Called when the controller is first initialized | GauntletTestController.h | |
virtual void OnPostMapChange
(
UWorld* World |
Called after a map change. GetCurrentMap() will now return the new map | GauntletTestController.h | |
virtual void OnPreMapChange() |
Called prior to a map change | GauntletTestController.h | |
virtual void OnStateChange
(
FName OldState, |
Called when a state change is applied to the module. | GauntletTestController.h | |
virtual void OnTick
(
float TimeDelta |
Called periodically to let the controller check and control state | GauntletTestController.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FString GetCurrentMap() |
Return the name of the current persistent map | GauntletTestController.h | |
FName GetCurrentState() |
Returns the current state applied to Gauntlet | GauntletTestController.h | |
FGauntletModule * GetGauntlet() |
Returns the gauntlet module running this test | GauntletTestController.h | |
double GetTimeInCurrentState() |
Return the time since OnStateChange was called with the current state | GauntletTestController.h | |
void MarkHeartbeatActive
(
const FString& OptionalStatusMessage |
Marks the next heartbeat as active and immediately forces a heartbeat with the given status message if one is specified. | GauntletTestController.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void EndTest
(
int32 ExitCode |
Called to end testing and exit the app with provided code, static to avoid test instance state/lifetime dependency | GauntletTestController.h |