Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Tests
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/Tests/AutomationCommon.h |
| Include | #include "Tests/AutomationCommon.h" |
Syntax
struct FTestWorldWrapper
Remarks
Utility class for creating and destroying a temporary test world, can be used for automation or performance testing. This can be used with any test framework but has utility functions for FAutomationTestBase.
Variables
Destructors
| Type | Name | Description | |
|---|---|---|---|
| This will properly shut down and destroy the test world as needed |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AppendErrorMessages
(
TArray< FString >& OutErrorMessages |
Gets the actual error messages for reporting to the automation framework | |
| bool | Starts play in the test world to simulate gameplay | ||
| void | Clears any failures and initial state | ||
| bool | CreateTestWorld
(
EWorldType::Type WorldType |
Creates a world of the appropriate world type, returns false on failure | |
| bool | DestroyTestWorld
(
bool bForceGarbageCollect |
Destroys the test world and handles any required cleanup | |
| bool | Stops play properly | ||
| void | ForwardErrorMessages
(
FAutomationTestBase* AutomationTest |
Reports error messages to a passed in automation test | |
| UWorld * | GetTestWorld () |
Gets the wrapped world, can be null | |
| bool | HasFailed () |
Returns true if there are any errors that should stop further execution | |
| void | ReportFailure
(
const TCHAR* ErrorMessage |
Registers an error message and marks test as failed, called by the functions above | |
| bool | TickTestWorld
(
float DeltaTime |
Ticks the test world for one frame, defaults to 100 fps |