Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FTestWorldWrapper |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Tests/AutomationCommon.h |
| Include Path | #include "Tests/AutomationCommon.h" |
Syntax
struct FTestWorldWrapper
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTestWorldWrapper() |
This will properly shut down and destroy the test world as needed | Tests/AutomationCommon.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Gets the actual error messages for reporting to the automation framework | Tests/AutomationCommon.h | ||
virtual bool BeginPlayInTestWorld() |
Starts play in the test world to simulate gameplay | Tests/AutomationCommon.h | |
virtual void ClearFailureState() |
Clears any failures and initial state | Tests/AutomationCommon.h | |
virtual bool CreateTestWorld
(
EWorldType::Type WorldType |
Creates a world of the appropriate world type, returns false on failure | Tests/AutomationCommon.h | |
virtual bool DestroyTestWorld
(
bool bForceGarbageCollect |
Destroys the test world and handles any required cleanup | Tests/AutomationCommon.h | |
virtual bool EndPlayInTestWorld() |
Stops play properly | Tests/AutomationCommon.h | |
virtual void ForwardErrorMessages
(
FAutomationTestBase* AutomationTest |
Reports error messages to a passed in automation test | Tests/AutomationCommon.h | |
UWorld * GetTestWorld() |
Gets the wrapped world, can be null | Tests/AutomationCommon.h | |
virtual bool HasFailed() |
Returns true if there are any errors that should stop further execution | Tests/AutomationCommon.h | |
virtual void ReportFailure
(
const TCHAR* ErrorMessage |
Registers an error message and marks test as failed, called by the functions above | Tests/AutomationCommon.h | |
virtual bool TickTestWorld
(
float DeltaTime |
Ticks the test world for one frame, defaults to 100 fps | Tests/AutomationCommon.h |