Navigation
API > API/Plugins > API/Plugins/NetcodeUnitTest
Class for handling per-game implementation of unit test environmental defaults
| Name | FUnitTestEnvironment |
| Type | class |
| Header File | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/UnitTestEnvironment.h |
| Include Path | #include "UnitTestEnvironment.h" |
Syntax
class FUnitTestEnvironment
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FUnitTestEnvironment() |
UnitTestEnvironment.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FUnitTestEnvironment() |
UnitTestEnvironment.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetClientProgressLogs
(
const TArray< FString >*& OutTimeoutResetLogs |
Returns client log messages, for the current game, that indicate progress logs for resetting unit test timeout | UnitTestEnvironment.h | |
virtual FString GetDefaultClientConnectURL() |
Returns the default URL that minimal clients should use, when connecting to a server, for the current game | UnitTestEnvironment.h | |
FString GetDefaultClientParameters() |
Returns the default parameters for launched clients | UnitTestEnvironment.h | |
virtual FString GetDefaultMap
(
EUnitTestFlags UnitTestFlags |
Returns the default map name, that should be used with unit tests, for the current game | UnitTestEnvironment.h | |
FString GetDefaultServerParameters
(
FString InLogCmds, |
Returns the default parameters for launched servers | UnitTestEnvironment.h | |
virtual uint32 GetDefaultUnitTestTimeout() |
Returns the default/minimum timeout that unit tests should use, for the current game | UnitTestEnvironment.h | |
void GetProgressBlockingProcesses
(
const TArray< FString >*& OutBlockingProcesses |
Returns child process names, that indicate progress blockers in starting up (e.g. shader compiler) All child processes, including server/client child processes (and their children) are checked. | UnitTestEnvironment.h | |
| Returns server log messages, for the current game, that indicate progress in starting up | UnitTestEnvironment.h | ||
virtual void HandleClientPlayer
(
EUnitTestFlags UnitTestFlags, |
Executes game-specific handling, upon client unit tests initializing the client PlayerController | UnitTestEnvironment.h | |
virtual void InitializeClientProgressLogs
(
TArray< FString >& TimeoutResetLogs |
Called when initializing the static arrays, containing the client progress logs | UnitTestEnvironment.h | |
virtual void InitializeProgressBlockingProcesses
(
TArray< FString >& BlockingProcesses |
Called when initializing the static arrays, containing the progress blocking processes | UnitTestEnvironment.h | |
| Called when initializing the static arrays, containing the server progress logs | UnitTestEnvironment.h | ||
virtual void InitializeUnitTasks() |
If the game environment requires special/complex setup (e.g. player auth before join), then UnitTask's for handling complex setup, are added here. | UnitTestEnvironment.h | |
virtual void SetupDefaultClientParameters
(
FString& OutCommandline |
Sets up the default client parameters, specifying a (potentially already modified) commandline for modification | UnitTestEnvironment.h | |
virtual void SetupDefaultServerParameters
(
FString& OutCommandline, |
Sets up the default server parameters, specifying commandline and '-*Cmds=x' separately (combined within parent function above) | UnitTestEnvironment.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddUnitTestEnvironment
(
FString Game, |
Adds a new environment to the unit test environment list | UnitTestEnvironment.h | |
static void Register() |
Registers the unit test environment, with the environment list IMPORTANT: This MUST be implemented in every subclass, and the subclass version MUST called, within your modules 'StartupModule' | UnitTestEnvironment.h | |
static void Unregister() |
Winds-down the UnitTestEnvironments map; does not need implementation in subclasses | UnitTestEnvironment.h |