Navigation
Unreal Engine C++ API Reference > Plugins > NetcodeUnitTest
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UUnitTestBase
- UUnitTest
- UProcessUnitTest
- UClientUnitTest
- UFTextCrash
- UIPClient
- USteamClient
- UWebSocketClient
- UUTT61_DebugReplicateData
References
Module | NetcodeUnitTest |
Header | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Classes/ProcessUnitTest.h |
Include | #include "ProcessUnitTest.h" |
Syntax
UCLASS&40;Abstract&41;
class UProcessUnitTest : public UUnitTest
Remarks
Base class for all unit tests which launch child processes, whether they be UE child processes, or other arbitrary programs.
Handles management of child processes, memory usage tracking, log/stdout output gathering/printing, and crash detection.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< TSharedPtr< FUnitTestProcess > > | ActiveProcesses | Runtime variables Stores a reference to all running child processes tied to this unit test, for housekeeping |
![]() |
double | LastBlockingProcessCheck | Last time there was a check for processes blocking progress |
![]() |
FOnSuspendStateChange | OnSuspendStateChange | Delegate for notifying the UI, of a change in the unit test suspend state |
![]() |
TArray< FProcessLogWatch > | ProcessLogWatches | Delegates for implementing process log watches |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UProcessUnitTest
(
const FObjectInitializer& ObjectInitializer |
UProcessUnitTest |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | CheckOutputForError
(
TSharedPtr< FUnitTestProcess > InProcess, |
Checks incoming process logs, for any indication of a crash/error |
![]() |
bool | IsBlockingProcessPresent
(
bool bLogIfFound |
Whether or not a child process indicating a long/blocking task is running |
![]() ![]() |
void | NotifyProcessFinished
(
TWeakPtr< FUnitTestProcess > InProcess |
Notifies when a running process is detected as having finished/closed NOTE: This will not get called, when ShutdownUnitTestProcess is used, only when a program ends by itself |
![]() ![]() |
void | NotifyProcessLog
(
TWeakPtr< FUnitTestProcess > InProcess, |
Interface for process unit tests For implementation in subclasses, for helping to verify success/fail upon completion of unit tests NOTE: Not called again once VerificationState is set WARNING: Be careful when iterating InLogLines in multiple different for loops, if the sequence of detected logs is important |
![]() ![]() |
void | NotifyProcessSuspendState
(
TWeakPtr< FUnitTestProcess > InProcess, |
Notifies when the suspend state of a process changes |
![]() ![]() |
void | Notifies that there was a request to suspend/resume the unit test | |
![]() |
void | Processes the standard output (i.e. log output) for processes | |
![]() ![]() |
void | PrintUnitTestProcessErrors
(
TSharedPtr< FUnitTestProcess > InHandle |
If any errors logs were detected upon ShutdownUnitTestProcess, this is called to print them out |
![]() ![]() |
void | ShutdownUnitTestProcess
(
TSharedPtr< FUnitTestProcess > InHandle |
Shuts-down/cleans-up a child process tied to the unit test |
![]() ![]() |
TWeakPtr< FUnitTestProcess > | StartUEUnitTestProcess
(
FString InCommandline, |
Starts a child UE process, tied to the unit test |
![]() ![]() |
TWeakPtr< FUnitTestProcess > | StartUnitTestProcess
(
FString Path, |
Starts a child process, tied to the unit test |
![]() |
void | Updates (and if necessary, saves) the memory stats for processes |
Overridden from UUnitTest
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | CleanupUnitTest
(
EUnitTestResetStage ResetStage |
Cleans up all items needing destruction, and removes the unit test from tracking, before deleting the unit test itself |
Overridden from UUnitTestBase
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | IsTickable () |
Must override in subclasses, that need ticking. |
![]() ![]() |
void | PostUnitTick
(
float DeltaTime |
For cleanup actions that should occur after the primary tick function is called |
![]() ![]() |
void | UnitTick
(
float DeltaTime |
Main tick function for the unit test |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Called to finish destroying the object. | |
![]() ![]() |
void | After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources. |