UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AutomationWorkerModule.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Containers/Array.h"
8#include "IMessageContext.h"
10
12
14
25struct FMessageAddress;
27
28
34{
35public:
36
37 //~ IModuleInterface interface
38
39 virtual void StartupModule() override;
40 virtual void ShutdownModule() override;
41 virtual bool SupportsDynamicReloading() override;
42
43public:
44
45 //~ IAutomationWorkerModule interface
46
47 virtual void Tick() override;
48
49protected:
50
53
56
58 void Initialize();
59
62
64 void ReportTestComplete();
65
72
81
82private:
83
85 void HandleFindWorkersMessage(const FAutomationWorkerFindWorkers& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
86
88 void SendWorkerFound(const FMessageAddress& ControllerAddress);
89
91 void HandleMessageEndpointShutdown();
92
94 void HandleNextNetworkCommandReplyMessage(const FAutomationWorkerNextNetworkCommandReply& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
95
97 void HandlePingMessage(const FAutomationWorkerPing& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
98
100 void HandleStartTestSession(const FAutomationWorkerStartTestSession& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
101
103 void HandleStopTestSession(const FAutomationWorkerStopTestSession& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
104
106 void HandleRequestTestsMessage(const FAutomationWorkerRequestTests& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
107
109 void HandleRunTestsMessage(const FAutomationWorkerRunTests& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
110
112 void HandleStopTestsMessage(const struct FAutomationWorkerStopTests& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
113
116
118 void HandleTestDataRetrieved(const FAutomationWorkerTestDataResponse& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
119
121 void HandlePerformanceDataRetrieved(const FAutomationWorkerPerformanceDataResponse& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
122
124 void HandleTelemetryData(const FString& StorageName, const FString& InTestName, const TArray<FAutomationTelemetryData>& InItems);
125
127 void HandlePreTestingEvent();
128
130 void HandlePostTestingEvent();
131
132#if WITH_ENGINE
135
138
141#endif
142
144 void SendAnalyticsEvents(TArray<FString>& InAnalyticsItems);
145
147 void RecordPerformanceAnalytics(const FAutomationPerformanceSnapshot& PerfSnapshot);
148
150 bool IsTestExcluded(const FString& InTestToRun, FString* OutReason, bool* OutWarn) const;
151
153 void TriggerSectionNotifications();
154
155private:
156
159
160private:
161
164
166 FMessageAddress TestRequesterAddress;
167
169 uint32 ExecutionCount;
170
172 FString TestName;
173
175 FString BeautifiedTestName;
176
178 FString FullTestPath;
179
181 bool bSendAnalytics;
182
184 bool bPruneLogsOnSuccess;
185
187 bool bExecuteNextNetworkCommand;
188
190 bool bExecutingNetworkCommandResults;
191
193 FStopTestEvent StopTestEvent;
194
196 FString DeviceTag;
197
199 FString ActiveSection;
200
202 FGuid ActiveScreenshotComparisonId;
203};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition AutomationWorkerModule.h:34
virtual void ShutdownModule() override
Definition AutomationWorkerModule.cpp:50
virtual bool SupportsDynamicReloading() override
Definition AutomationWorkerModule.cpp:56
void Initialize()
Definition AutomationWorkerModule.cpp:134
void ReportTestComplete()
Definition AutomationWorkerModule.cpp:186
void SendMessage(FAutomationWorkerMessageBase *Message, UScriptStruct *TypeInfo, const FMessageAddress &ControllerAddress)
Definition AutomationWorkerModule.cpp:262
void SendTests(const FMessageAddress &ControllerAddress)
Definition AutomationWorkerModule.cpp:248
bool ExecuteNetworkCommands()
Definition AutomationWorkerModule.cpp:120
bool ExecuteLatentCommands()
Definition AutomationWorkerModule.cpp:106
virtual void Tick() override
Definition AutomationWorkerModule.cpp:65
void ReportNetworkCommandComplete()
Definition AutomationWorkerModule.cpp:170
virtual void StartupModule() override
Definition AutomationWorkerModule.cpp:42
Definition MessageEndpoint.h:70
Definition IAutomationWorkerModule.h:72
Definition Array.h:670
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition Class.h:1720
Definition IAutomationWorkerModule.h:13
Definition AutomationTest.h:813
Definition AutomationTest.h:721
Definition AutomationWorkerMessages.h:33
Definition AutomationWorkerMessages.h:761
Definition AutomationWorkerMessages.h:16
Definition AutomationWorkerMessages.h:410
Definition AutomationWorkerMessages.h:919
Definition AutomationWorkerMessages.h:136
Definition AutomationWorkerMessages.h:182
Definition AutomationWorkerMessages.h:301
Definition AutomationWorkerMessages.h:145
Definition AutomationWorkerMessages.h:154
Definition AutomationWorkerMessages.h:163
Definition AutomationWorkerMessages.h:878
Definition Guid.h:109
Definition IMessageContext.h:26