7#include "Containers/Array.h"
8#include "Containers/Map.h"
9#include "Containers/Queue.h"
10#include "Containers/Set.h"
41#include "Misc/Optional.h"
62#ifndef WITH_AUTOMATION_TESTS
63 #define WITH_AUTOMATION_TESTS (WITH_DEV_AUTOMATION_TESTS || WITH_PERF_AUTOMATION_TESTS)
67#define SAFE_GETSTACK(VariableName, IgnoreCount, MaxDepth) \
68 TArray<FProgramCounterSymbolInfo> VariableName = FPlatformStackWalk::GetStack(IgnoreCount, MaxDepth); \
69 if (VariableName.Num() == 0) \
72 FProgramCounterSymbolInfo& Info = VariableName.Emplace_GetRef(); \
73 TCString<ANSICHAR>::Strncpy(Info.Filename, "Unknown", FProgramCounterSymbolInfo::MAX_NAME_LENGTH); \
74 Info.LineNumber = 1; \
79#ifndef UE_RETURN_ON_ERROR
80#define UE_RETURN_ON_ERROR(Condition, Message) const bool PREPROCESSOR_JOIN(UE____bCondition_Line_, __LINE__) = (Condition); AddErrorIfFalse(PREPROCESSOR_JOIN(UE____bCondition_Line_, __LINE__), (Message)); if(!PREPROCESSOR_JOIN(UE____bCondition_Line_, __LINE__)) return false
168 return TEXT(
"Contains");
170 return TEXT(
"Exact");
172 return TEXT(
"Unknown");
242 if ( ContextStack.
Num() > 0 )
298 FAutomationTestInfo(
const FString&
InDisplayName,
const FString&
InFullTestPath,
const FString&
InTestName,
const EAutomationTestFlags InTestFlags,
const int32 InNumParticipantsRequired,
const FString&
InParameterName = FString(),
const FString&
InSourceFile = FString(),
int32 InSourceFileLine = 0,
const FString&
InAssetPath = FString(),
const FString&
InOpenCommand = FString(),
const FString&
InTestTags = FString())
310 , NumDevicesCurrentlyRunningTest( 0 )
373 return TestParameter;
393 return SourceFileLine;
431 NumDevicesCurrentlyRunningTest = 0;
439 NumDevicesCurrentlyRunningTest++;
449 return NumDevicesCurrentlyRunningTest;
459 return NumParticipantsRequired;
487 FString FullTestPath;
496 FString TestParameter;
502 int32 SourceFileLine;
514 uint32 NumParticipantsRequired = 0;
517 uint32 NumDevicesCurrentlyRunningTest = 0;
539 bool InternalUpdate()
1155 return LatentCommands.
IsEmpty();
1247 bCaptureStack = bCapture;
1270 return CurrentTestFullPath;
1325 FAutomationTestOutputDevice()
1326 : CurTest( nullptr ) {}
1328 ~FAutomationTestOutputDevice()
1346 virtual bool CanBeUsedOnMultipleThreads()
const override
1364 std::atomic<FAutomationTestBase*>CurTest;
1371 FAutomationTestMessageFilter()
1373 , DestinationContext(nullptr) {}
1375 ~FAutomationTestMessageFilter()
1377 DestinationContext =
nullptr;
1390 virtual void SerializeRecord(
const UE::FLogRecord& Record)
override;
1397 virtual bool CanBeUsedOnMultipleThreads()
const override
1426 std::atomic<FAutomationTestBase*> CurTest;
1427 std::atomic<FFeedbackContext*> DestinationContext;
1433 CORE_API void PrepForAutomationTests();
1436 CORE_API void ConcludeAutomationTests();
1476 FAutomationTestMessageFilter AutomationTestMessageFilter;
1509 bool bTestSuccessful;
1518 FString CurrentTestFullPath;
1521 bool bDeveloperDirectoryIncluded;
1533 bool bForceSmokeTests;
1547 bool TagsMatchPattern(
const FString&
Tags,
const FString&
TagPattern)
const;
1582 if (!TestFullName.IsEmpty())
1589 FString TestFullName;
2035 UE_DEPRECATED(5.5,
"Use TestEqual instead (string tests are case insensitive by default)")
2116 FString Tmp(Expected);
2145 FString Tmp(Expected);
2174 FString Tmp(Expected);
2194 template<
typename ValueType>
2199 AddError(FString::Printf(
TEXT(
"%s: The two values are not equal."), What));
2205 template<
typename ValueType>
2361 #define TestFalseExpr(Expression) TestFalse(TEXT(#Expression), Expression)
2371 template<
typename ValueType>
2374 if (
Value.IsValid())
2376 AddError(FString::Printf(
TEXT(
"%s: The value is valid (.IsValid() returned true)."), Description));
2382 template<
typename ValueType>
2397 template<
typename ValueType>
2402 AddError(FString::Printf(
TEXT(
"%s: The two values are equal."), Description));
2408 template<
typename ValueType>
bool TestNotEqual(
const FString& Description,
const ValueType&
Actual,
const ValueType& Expected)
2434 template<
typename ValueType>
2437 if (Pointer ==
nullptr)
2439 AddError(FString::Printf(
TEXT(
"Expected '%s' to be not null."), What));
2445 template<
typename ValueType>
bool TestNotNull(
const FString& What,
const ValueType* Pointer)
2459 template<
typename ValueType>
2462 if (&
Actual == &Expected)
2464 AddError(FString::Printf(
TEXT(
"%s: The two values are the same."), Description));
2470 template<
typename ValueType>
bool TestNotSame(
const FString& Description,
const ValueType&
Actual,
const ValueType& Expected)
2484 template<
typename ValueType>
2489 AddWarning(FString::Printf(
TEXT(
"%s: Actual value is nullptr."), Description));
2491 if (
nullptr == Expected)
2493 AddWarning(FString::Printf(
TEXT(
"%s: Expected value is nullptr, which may be unintended. If intentional consider instead using TestNotNull()."), Description));
2497 AddError(FString::Printf(
TEXT(
"%s: The two pointers are the same."), Description));
2503 template<
typename ValueType>
bool TestNotSamePtr(
const FString& Description,
const ValueType*
Actual,
const ValueType* Expected)
2518 bool TestNull(
const FString& What,
const void* Pointer)
2532 template<
typename ValueType>
2535 if (&
Actual != &Expected)
2537 AddError(FString::Printf(
TEXT(
"%s: The two values are not the same."), Description));
2543 template<
typename ValueType>
bool TestSame(
const FString& Description,
const ValueType&
Actual,
const ValueType& Expected)
2557 template<
typename ValueType>
2562 AddWarning(FString::Printf(
TEXT(
"%s: Actual value is nullptr."), Description));
2564 if (
nullptr == Expected)
2566 AddWarning(FString::Printf(
TEXT(
"%s: Expected value is nullptr, which may be unintended. If intentional consider instead using TestNull()."), Description));
2570 AddError(FString::Printf(
TEXT(
"%s: The two pointers are not the same."), Description));
2576 template<
typename ValueType>
bool TestSamePtr(
const FString& Description,
const ValueType*
Actual,
const ValueType* Expected)
2597 #define TestTrueExpr(...) TestTrue(TEXT(#__VA_ARGS__), __VA_ARGS__)
2607 template<
typename ValueType>
2610 if (!
Value.IsValid())
2612 AddError(FString::Printf(
TEXT(
"%s: The value is not valid (.IsValid() returned false)."), Description));
2618 template<
typename ValueType>
2639 virtual bool RunTest(
const FString& Parameters)=0;
2684 CORE_API void InternalSetSuccessState(
bool bSuccessful);
2706 , bIsDiscoveryMode(
false)
2707 , bBaseRunTestRan(
false)
2710 virtual bool RunTest(
const FString& Parameters)
override
2712 bBaseRunTestRan =
true;
2713 TestIdToExecute = Parameters;
2723 bIsDiscoveryMode =
true;
2725 bIsDiscoveryMode =
false;
2729 bBaseRunTestRan =
false;
2734 return bIsDiscoveryMode;
2739 check(bBaseRunTestRan);
2745 check(bBaseRunTestRan);
2757 BeforeEachStack.
Pop();
2763 AfterEachStack.
Pop();
2771 check(bBaseRunTestRan);
2777 check(bBaseRunTestRan);
2781 if (bIsDiscoveryMode)
2783 BeautifiedNames.
Add(GetDescription());
2785 bIsDiscoveryMode =
false;
2786 TestCommands.
Add(GetDescription());
2787 bIsDiscoveryMode =
true;
2789 else if (TestIdToExecute.IsEmpty() || GetDescription() == TestIdToExecute)
2793 BeforeEachStack[
Index]();
2800 AfterEachStack[
Index]();
2809 BeforeEachStack.
Push(DoWork);
2814 AfterEachStack.
Push(DoWork);
2829 FString GetDescription()
const
2845 if (bIsDiscoveryMode)
2856 if (bIsDiscoveryMode)
2872 FString TestIdToExecute;
2879 mutable bool bIsDiscoveryMode;
2880 mutable bool bBaseRunTestRan;
2900 virtual ~FSingleExecuteLatentCommand()
2903 virtual bool Update()
override
2905 if (bSkipIfErrored && Spec->HasAnyErrors())
2918 const bool bSkipIfErrored;
2934 virtual ~FUntilDoneLatentCommand()
2937 virtual bool Update()
override
2941 if (bSkipIfErrored && Spec->HasAnyErrors())
2949 Predicate(FDoneDelegate::CreateSP(
this, &FUntilDoneLatentCommand::Done));
2960 Spec->AddError(
TEXT(
"Latent command timed out."), 0);
2989 const bool bSkipIfErrored;
3009 virtual ~FAsyncUntilDoneLatentCommand()
3012 virtual bool Update()
override
3014 if (!Future.IsValid())
3016 if (bSkipIfErrored && Spec->HasAnyErrors())
3025 Predicate(FDoneDelegate::CreateRaw(
this, &FAsyncUntilDoneLatentCommand::Done));
3037 Spec->AddError(
TEXT(
"Latent command timed out."), 0);
3049 if (Future.IsValid())
3069 const bool bSkipIfErrored;
3090 virtual ~FAsyncLatentCommand()
3093 virtual bool Update()
override
3095 if (!Future.IsValid())
3097 if (bSkipIfErrored && Spec->HasAnyErrors())
3119 Spec->AddError(
TEXT(
"Latent command timed out."), 0);
3131 if (Future.IsValid())
3151 const bool bSkipIfErrored;
3163 FString Description;
3178 struct FSpecDefinitionScope
3182 FString Description;
3196 FString Description;
3208 , RootDefinitionScope(
MakeShareable(new FSpecDefinitionScope()))
3209 , bHasBeenDefined(
false)
3232 IdToSpecMap.GenerateValueArray(
Specs);
3236 for (
int32 CommandIndex = 0; CommandIndex <
Specs[
SpecIndex]->Commands.Num(); ++CommandIndex)
3265 if (Spec !=
nullptr)
3267 return (*Spec)->Filename;
3282 if (Spec !=
nullptr)
3284 return (*Spec)->LineNumber;
3295 IdToSpecMap.GenerateValueArray(
Specs);
3324 DefinitionScopeStack.
Pop();
3551 CurrentScope->AfterEach.Push(
MakeShareable(
new FSingleExecuteLatentCommand(
this, DoWork)));
3575 CurrentScope->AfterEach.Push(
MakeShareable(
new FUntilDoneLatentCommand(
this, DoWork,
Timeout)));
3600 if (!bHasBeenDefined)
3617 while (Stack.
Num() > 0)
3630 Spec->Description =
It->Description;
3631 Spec->Filename =
It->Filename;
3632 Spec->LineNumber =
It->LineNumber;
3634 Spec->Commands.Add(
It->Command);
3641 check(!IdToSpecMap.Contains(Spec->Id));
3642 IdToSpecMap.Add(Spec->Id, Spec);
3646 if (Scope->Children.Num() > 0)
3648 Stack.
Append(Scope->Children);
3649 Scope->Children.Empty();
3653 while (Stack.
Num() > 0 && Stack.
Last()->Children.Num() == 0 && Stack.
Last()->It.Num() == 0)
3670 RootDefinitionScope.
Reset();
3671 DefinitionScopeStack.
Reset();
3672 bHasBeenDefined =
true;
3677 Description.
Empty();
3678 IdToSpecMap.Empty();
3679 RootDefinitionScope.
Reset();
3680 DefinitionScopeStack.
Empty();
3681 bHasBeenDefined =
false;
3683 RootDefinitionScope =
MakeShareable(
new FSpecDefinitionScope());
3700 FString GetDescription()
const
3727 FString GetId()
const
3729 if (Description.
Last().EndsWith(
TEXT(
"]")))
3772 bool bHasBeenDefined;
3779#define DEFINE_LATENT_AUTOMATION_COMMAND(CommandName) \
3780class CommandName : public IAutomationLatentCommand \
3783 virtual ~CommandName() \
3785 virtual bool Update() override; \
3788#define DEFINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER(CommandName,ParamType,ParamName) \
3789class CommandName : public IAutomationLatentCommand \
3792 CommandName(ParamType InputParam) \
3793 : ParamName(InputParam) \
3795 virtual ~CommandName() \
3797 virtual bool Update() override; \
3799 ParamType ParamName; \
3802#define DEFINE_LATENT_AUTOMATION_COMMAND_TWO_PARAMETER(CommandName,ParamType0,ParamName0,ParamType1,ParamName1) \
3803class CommandName : public IAutomationLatentCommand \
3806 CommandName(ParamType0 InputParam0, ParamType1 InputParam1) \
3807 : ParamName0(InputParam0) \
3808 , ParamName1(InputParam1) \
3810 virtual ~CommandName() \
3812 virtual bool Update() override; \
3814 ParamType0 ParamName0; \
3815 ParamType1 ParamName1; \
3818#define DEFINE_LATENT_AUTOMATION_COMMAND_THREE_PARAMETER(CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2) \
3819class CommandName : public IAutomationLatentCommand \
3822 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2) \
3823 : ParamName0(InputParam0) \
3824 , ParamName1(InputParam1) \
3825 , ParamName2(InputParam2) \
3827 virtual ~CommandName() \
3829 virtual bool Update() override; \
3831 ParamType0 ParamName0; \
3832 ParamType1 ParamName1; \
3833 ParamType2 ParamName2; \
3836#define DEFINE_LATENT_AUTOMATION_COMMAND_FOUR_PARAMETER(CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2,ParamType3,ParamName3) \
3837class CommandName : public IAutomationLatentCommand \
3840 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2, ParamType3 InputParam3) \
3841 : ParamName0(InputParam0) \
3842 , ParamName1(InputParam1) \
3843 , ParamName2(InputParam2) \
3844 , ParamName3(InputParam3) \
3846 virtual ~CommandName() \
3848 virtual bool Update() override; \
3850 ParamType0 ParamName0; \
3851 ParamType1 ParamName1; \
3852 ParamType2 ParamName2; \
3853 ParamType3 ParamName3; \
3856#define DEFINE_LATENT_AUTOMATION_COMMAND_FIVE_PARAMETER(CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2,ParamType3,ParamName3,ParamType4,ParamName4) \
3857class CommandName : public IAutomationLatentCommand \
3860 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2, ParamType3 InputParam3, ParamType4 InputParam4) \
3861 : ParamName0(InputParam0) \
3862 , ParamName1(InputParam1) \
3863 , ParamName2(InputParam2) \
3864 , ParamName3(InputParam3) \
3865 , ParamName4(InputParam4) \
3867 virtual ~CommandName() \
3869 virtual bool Update() override; \
3871 ParamType0 ParamName0; \
3872 ParamType1 ParamName1; \
3873 ParamType2 ParamName2; \
3874 ParamType3 ParamName3; \
3875 ParamType4 ParamName4; \
3878#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND(EXPORT_API, CommandName) \
3879class CommandName : public IAutomationLatentCommand \
3882 virtual ~CommandName() \
3884 EXPORT_API virtual bool Update() override; \
3887#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER(EXPORT_API, CommandName,ParamType,ParamName) \
3888class CommandName : public IAutomationLatentCommand \
3891 CommandName(ParamType InputParam) \
3892 : ParamName(InputParam) \
3894 virtual ~CommandName() \
3896 EXPORT_API virtual bool Update() override; \
3898 ParamType ParamName; \
3901#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_TWO_PARAMETER(EXPORT_API, CommandName,ParamType0,ParamName0,ParamType1,ParamName1) \
3902class CommandName : public IAutomationLatentCommand \
3905 CommandName(ParamType0 InputParam0, ParamType1 InputParam1) \
3906 : ParamName0(InputParam0) \
3907 , ParamName1(InputParam1) \
3909 virtual ~CommandName() \
3911 EXPORT_API virtual bool Update() override; \
3913 ParamType0 ParamName0; \
3914 ParamType1 ParamName1; \
3917#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_THREE_PARAMETER(EXPORT_API, CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2) \
3918class CommandName : public IAutomationLatentCommand \
3921 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2) \
3922 : ParamName0(InputParam0) \
3923 , ParamName1(InputParam1) \
3924 , ParamName2(InputParam2) \
3926 virtual ~CommandName() \
3928 EXPORT_API virtual bool Update() override; \
3930 ParamType0 ParamName0; \
3931 ParamType1 ParamName1; \
3932 ParamType2 ParamName2; \
3935#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_FOUR_PARAMETER(EXPORT_API, CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2,ParamType3,ParamName3) \
3936class CommandName : public IAutomationLatentCommand \
3939 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2, ParamType3 InputParam3) \
3940 : ParamName0(InputParam0) \
3941 , ParamName1(InputParam1) \
3942 , ParamName2(InputParam2) \
3943 , ParamName3(InputParam3) \
3945 virtual ~CommandName() \
3947 EXPORT_API virtual bool Update() override; \
3949 ParamType0 ParamName0; \
3950 ParamType1 ParamName1; \
3951 ParamType2 ParamName2; \
3952 ParamType3 ParamName3; \
3955#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_FIVE_PARAMETER(EXPORT_API, CommandName,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2,ParamType3,ParamName3,ParamType4,ParamName4) \
3956class CommandName : public IAutomationLatentCommand \
3959 CommandName(ParamType0 InputParam0, ParamType1 InputParam1, ParamType2 InputParam2, ParamType3 InputParam3, ParamType4 InputParam4) \
3960 : ParamName0(InputParam0) \
3961 , ParamName1(InputParam1) \
3962 , ParamName2(InputParam2) \
3963 , ParamName3(InputParam3) \
3964 , ParamName4(InputParam4) \
3966 virtual ~CommandName() \
3968 EXPORT_API virtual bool Update() override; \
3970 ParamType0 ParamName0; \
3971 ParamType1 ParamName1; \
3972 ParamType2 ParamName2; \
3973 ParamType3 ParamName3; \
3974 ParamType4 ParamName4; \
3977#define DEFINE_ENGINE_LATENT_AUTOMATION_COMMAND(CommandName) \
3978 DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND(ENGINE_API, CommandName)
3980#define DEFINE_ENGINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER(CommandName,ParamType,ParamName) \
3981 DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER(ENGINE_API, CommandName, ParamType, ParamName)
3983#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES(EXPORT_API,CommandName,RetryCount,WaitTimeBetweenRuns) \
3984class CommandName : public IAutomationLatentCommandWithRetriesAndDelays \
3987 CommandName(int32 InRetryCount, double InWaitTimeBetweenRuns) \
3988 : IAutomationLatentCommandWithRetriesAndDelays(#CommandName, InRetryCount, InWaitTimeBetweenRuns) \
3990 virtual ~CommandName() \
3992 EXPORT_API virtual bool Execute() override; \
3996#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_ONE_PARAMETER(EXPORT_API,CommandName,RetryCount,WaitTimeBetweenRuns,ParamType,ParamName) \
3997class CommandName : public IAutomationLatentCommandWithRetriesAndDelays \
4000 CommandName(int32 InRetryCount, double InWaitTimeBetweenRuns, ParamType ParamName) \
4001 : IAutomationLatentCommandWithRetriesAndDelays(#CommandName, InRetryCount, InWaitTimeBetweenRuns) \
4002 , ParamName(ParamName) \
4004 virtual ~CommandName() \
4006 EXPORT_API virtual bool Execute() override; \
4008 ParamType ParamName; \
4011#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_TWO_PARAMETERS(EXPORT_API,CommandName,RetryCount,WaitTimeBetweenRuns,ParamType0,ParamName0,ParamType1,ParamName1) \
4012class CommandName : public IAutomationLatentCommandWithRetriesAndDelays \
4015 CommandName(int32 InRetryCount, double InWaitTimeBetweenRuns, ParamType0 ParamName0, ParamType1 ParamName1) \
4016 : IAutomationLatentCommandWithRetriesAndDelays(#CommandName, InRetryCount, InWaitTimeBetweenRuns) \
4017 , ParamName0(ParamName0) \
4018 , ParamName1(ParamName1) \
4020 virtual ~CommandName() \
4022 EXPORT_API virtual bool Execute() override; \
4024 ParamType0 ParamName0; \
4025 ParamType1 ParamName1; \
4028#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_THREE_PARAMETERS(EXPORT_API,CommandName,RetryCount,WaitTimeBetweenRuns,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2) \
4029class CommandName : public IAutomationLatentCommandWithRetriesAndDelays \
4032 CommandName(int32 InRetryCount, double InWaitTimeBetweenRuns, ParamType0 ParamName0, ParamType1 ParamName1, ParamType2 ParamName2) \
4033 : IAutomationLatentCommandWithRetriesAndDelays(#CommandName, InRetryCount, InWaitTimeBetweenRuns) \
4034 , ParamName0(ParamName0) \
4035 , ParamName1(ParamName1) \
4036 , ParamName2(ParamName2) \
4038 virtual ~CommandName() \
4040 EXPORT_API virtual bool Execute() override; \
4042 ParamType0 ParamName0; \
4043 ParamType1 ParamName1; \
4044 ParamType2 ParamName2; \
4047#define DEFINE_EXPORTED_LATENT_AUTOMATION_COMMAND_WITH_RETRIES_FOUR_PARAMETERS(EXPORT_API,CommandName,RetryCount,WaitTimeBetweenRuns,ParamType0,ParamName0,ParamType1,ParamName1,ParamType2,ParamName2,ParamType3,ParamName3) \
4048class CommandName : public IAutomationLatentCommandWithRetriesAndDelays \
4051 CommandName(int32 InRetryCount, double InWaitTimeBetweenRuns, ParamType0 ParamName0, ParamType1 ParamName1, ParamType2 ParamName2, ParamType3 ParamName3) \
4052 : IAutomationLatentCommandWithRetriesAndDelays(#CommandName, InRetryCount, InWaitTimeBetweenRuns) \
4053 , ParamName0(ParamName0) \
4054 , ParamName1(ParamName1) \
4055 , ParamName2(ParamName2) \
4056 , ParamName3(ParamName3) \
4058 virtual ~CommandName() \
4060 EXPORT_API virtual bool Execute() override; \
4062 ParamType0 ParamName0; \
4063 ParamType1 ParamName1; \
4064 ParamType2 ParamName2; \
4065 ParamType3 ParamName3; \
4069#if WITH_AUTOMATION_TESTS
4070#define ADD_LATENT_AUTOMATION_COMMAND(ClassDeclaration) FAutomationTestFramework::Get().EnqueueLatentCommand(MakeShareable(new ClassDeclaration));
4072#define ADD_LATENT_AUTOMATION_COMMAND(ClassDeclaration)
4076#define START_NETWORK_AUTOMATION_COMMAND(ClassDeclaration) \
4077class F##ClassDeclaration : public IAutomationNetworkCommand \
4082 F##ClassDeclaration(int32 InRoleIndex) : RoleIndex(InRoleIndex) {} \
4083 virtual ~F##ClassDeclaration() {} \
4084 virtual uint32 GetRoleIndex() const override { return RoleIndex; } \
4085 virtual void Run() override
4088#define END_NETWORK_AUTOMATION_COMMAND(ClassDeclaration,InRoleIndex) }; \
4089 FAutomationTestFramework::Get().EnqueueNetworkCommand(MakeShareable(new F##ClassDeclaration(InRoleIndex))); \
4104#define IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE( TClass, TBaseClass, PrettyName, TFlags, FileName, LineNumber ) \
4105 class TClass : public TBaseClass \
4108 TClass( const FString& InName ) \
4109 :TBaseClass( InName, false ) {\
4110 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4111 static_assert( !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4112 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4113 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4114 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4115 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4116 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4117 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4119 virtual EAutomationTestFlags GetTestFlags() const override { return TFlags; } \
4120 virtual bool IsStressTest() const { return false; } \
4121 virtual uint32 GetRequiredDeviceNum() const override { return 1; } \
4122 virtual FString GetTestSourceFileName() const override { return FileName; } \
4123 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4125 virtual void GetTests(TArray<FString>& OutBeautifiedNames, TArray <FString>& OutTestCommands) const override \
4127 OutBeautifiedNames.Add(PrettyName); \
4128 OutTestCommands.Add(FString()); \
4130 virtual bool RunTest(const FString& Parameters) override; \
4131 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4136#define IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE( TClass, TBaseClass, PrettyName, TFlags, FileName, LineNumber ) \
4137 class TClass : public TBaseClass \
4140 TClass( const FString& InName ) \
4141 :TBaseClass( InName, true ) { \
4142 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4143 static_assert( !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4144 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4145 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4146 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4147 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4148 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4149 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4151 virtual EAutomationTestFlags GetTestFlags() const override { return ((TFlags) & ~(EAutomationTestFlags::SmokeFilter)); } \
4152 virtual bool IsStressTest() const { return true; } \
4153 virtual uint32 GetRequiredDeviceNum() const override { return 1; } \
4154 virtual FString GetTestSourceFileName() const override { return FileName; } \
4155 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4157 virtual void GetTests(TArray<FString>& OutBeautifiedNames, TArray <FString>& OutTestCommands) const override; \
4158 virtual bool RunTest(const FString& Parameters) override; \
4159 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4162#define IMPLEMENT_NETWORKED_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, NumParticipants, FileName, LineNumber) \
4163 class TClass : public TBaseClass \
4166 TClass( const FString& InName ) \
4167 :TBaseClass( InName, false ) { \
4168 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4169 static_assert( !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4170 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4171 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4172 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4173 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4174 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4175 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4177 virtual EAutomationTestFlags GetTestFlags() const override { return ((TFlags) & ~(EAutomationTestFlags::EditorContext | EAutomationTestFlags::CommandletContext | EAutomationTestFlags::SmokeFilter)); } \
4178 virtual uint32 GetRequiredDeviceNum() const override { return NumParticipants; } \
4179 virtual FString GetTestSourceFileName() const override { return FileName; } \
4180 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4182 virtual void GetTests(TArray<FString>& OutBeautifiedNames, TArray <FString>& OutTestCommands) const override \
4184 OutBeautifiedNames.Add(PrettyName); \
4185 OutTestCommands.Add(FString()); \
4187 virtual bool RunTest(const FString& Parameters) override; \
4188 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4191#define IMPLEMENT_BDD_AUTOMATION_TEST_PRIVATE( TClass, PrettyName, TFlags, FileName, LineNumber ) \
4192 class TClass : public FBDDAutomationTestBase \
4195 TClass( const FString& InName ) \
4196 :FBDDAutomationTestBase( InName, false ) {\
4197 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4198 static_assert( !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4199 !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4200 !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4201 !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4202 !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4203 !!((((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4204 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4206 virtual EAutomationTestFlags GetTestFlags() const override { return TFlags; } \
4207 virtual bool IsStressTest() const { return false; } \
4208 virtual uint32 GetRequiredDeviceNum() const override { return 1; } \
4209 virtual FString GetTestSourceFileName() const override { return FileName; } \
4210 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4212 virtual bool RunTest(const FString& Parameters) override; \
4213 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4218#define DEFINE_SPEC_PRIVATE( TClass, PrettyName, TFlags, FileName, LineNumber ) \
4219 class TClass : public FAutomationSpecBase \
4222 TClass( const FString& InName ) \
4223 : FAutomationSpecBase( InName, false ) {\
4224 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4225 static_assert( !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4226 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4227 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4228 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4229 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4230 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4231 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4233 virtual EAutomationTestFlags GetTestFlags() const override { return TFlags; } \
4234 using FAutomationSpecBase::GetTestSourceFileName; \
4235 virtual FString GetTestSourceFileName() const override { return FileName; } \
4236 using FAutomationSpecBase::GetTestSourceFileLine; \
4237 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4238 virtual FString GetTestSourceFileName(const FString&) const override { return GetTestSourceFileName(); } \
4239 virtual int32 GetTestSourceFileLine(const FString&) const override { return GetTestSourceFileLine(); } \
4241 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4242 virtual void Define() override; \
4245#define BEGIN_DEFINE_SPEC_PRIVATE( TClass, PrettyName, TFlags, FileName, LineNumber ) \
4246 class TClass : public FAutomationSpecBase \
4249 TClass( const FString& InName ) \
4250 : FAutomationSpecBase( InName, false ) {\
4251 static_assert(!!((TFlags) & EAutomationTestFlags_ApplicationContextMask), "AutomationTest has no application flag. It shouldn't run. See AutomationTest.h."); \
4252 static_assert( !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::SmokeFilter) || \
4253 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::EngineFilter) || \
4254 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::ProductFilter) || \
4255 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::PerfFilter) || \
4256 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::StressFilter) || \
4257 !!(((TFlags) & EAutomationTestFlags_FilterMask) == EAutomationTestFlags::NegativeFilter), \
4258 "All AutomationTests must have exactly 1 filter type specified. See AutomationTest.h."); \
4260 virtual EAutomationTestFlags GetTestFlags() const override { return TFlags; } \
4261 using FAutomationSpecBase::GetTestSourceFileName; \
4262 virtual FString GetTestSourceFileName() const override { return FileName; } \
4263 using FAutomationSpecBase::GetTestSourceFileLine; \
4264 virtual int32 GetTestSourceFileLine() const override { return LineNumber; } \
4266 virtual FString GetBeautifiedTestName() const override { return PrettyName; } \
4267 virtual void Define() override;
4269#define REGISTER_SIMPLE_AUTOMATION_TEST_TAGS( TClass, PrettyName, TagsString ) \
4272 FAutomationTestTags TClass##AutomationTagsInstance(PrettyName, TagsString);\
4275#if WITH_AUTOMATION_WORKER
4276 #define IMPLEMENT_SIMPLE_AUTOMATION_TEST( TClass, PrettyName, TFlags ) \
4277 IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__) \
4280 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4282 #define IMPLEMENT_COMPLEX_AUTOMATION_TEST( TClass, PrettyName, TFlags ) \
4283 IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__) \
4286 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4288 #define IMPLEMENT_COMPLEX_AUTOMATION_CLASS( TClass, PrettyName, TFlags ) \
4289 IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__)
4290 #define IMPLEMENT_NETWORKED_AUTOMATION_TEST(TClass, PrettyName, TFlags, NumParticipants) \
4291 IMPLEMENT_NETWORKED_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, NumParticipants, __FILE__, __LINE__) \
4294 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4297 #define IMPLEMENT_CUSTOM_SIMPLE_AUTOMATION_TEST( TClass, TBaseClass, PrettyName, TFlags ) \
4298 IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__) \
4301 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4304 #define IMPLEMENT_CUSTOM_COMPLEX_AUTOMATION_TEST( TClass, TBaseClass, PrettyName, TFlags ) \
4305 IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__) \
4308 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4311 #define IMPLEMENT_BDD_AUTOMATION_TEST( TClass, PrettyName, TFlags ) \
4312 IMPLEMENT_BDD_AUTOMATION_TEST_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__) \
4315 TClass TClass##AutomationTestInstance( TEXT(#TClass) );\
4318 #define DEFINE_SPEC( TClass, PrettyName, TFlags ) \
4319 DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__) \
4322 TClass TClass##AutomationSpecInstance( TEXT(#TClass) );\
4325 #define BEGIN_DEFINE_SPEC( TClass, PrettyName, TFlags ) \
4326 BEGIN_DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__)
4328 #define END_DEFINE_SPEC( TClass ) \
4332 TClass TClass##AutomationSpecInstance( TEXT(#TClass) );\
4346 #define IMPLEMENT_SIMPLE_AUTOMATION_TEST( TClass, PrettyName, TFlags ) \
4347 IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__)
4348 #define IMPLEMENT_COMPLEX_AUTOMATION_TEST( TClass, PrettyName, TFlags ) \
4349 IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, __FILE__, __LINE__)
4350 #define IMPLEMENT_NETWORKED_AUTOMATION_TEST(TClass, PrettyName, TFlags, NumParticipants) \
4351 IMPLEMENT_NETWORKED_AUTOMATION_TEST_PRIVATE(TClass, FAutomationTestBase, PrettyName, TFlags, NumParticipants, __FILE__, __LINE__)
4353 #define IMPLEMENT_CUSTOM_SIMPLE_AUTOMATION_TEST( TClass, TBaseClass, PrettyName, TFlags ) \
4354 IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__)
4355 #define IMPLEMENT_CUSTOM_COMPLEX_AUTOMATION_TEST( TClass, TBaseClass, PrettyName, TFlags ) \
4356 IMPLEMENT_COMPLEX_AUTOMATION_TEST_PRIVATE(TClass, TBaseClass, PrettyName, TFlags, __FILE__, __LINE__)
4357 #define IMPLEMENT_BDD_AUTOMATION_TEST(TClass, PrettyName, TFlags) \
4358 IMPLEMENT_BDD_AUTOMATION_TEST_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__)
4359 #define DEFINE_SPEC(TClass, PrettyName, TFlags) \
4360 DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__)
4361 #define BEGIN_DEFINE_SPEC(TClass, PrettyName, TFlags) \
4362 BEGIN_DEFINE_SPEC_PRIVATE(TClass, PrettyName, TFlags, __FILE__, __LINE__)
4363 #define END_DEFINE_SPEC(TClass) \
4396#define UTEST_EQUAL(What, Actual, Expected)\
4397 if (!TestEqual(What, Actual, Expected))\
4402#define UTEST_EQUAL_EXPR(Actual, Expected)\
4403 if (!TestEqual(TEXT(#Actual), Actual, Expected))\
4408#define UTEST_EQUAL_TOLERANCE(What, Actual, Expected, Tolerance)\
4409 if (!TestEqual(What, Actual, Expected, Tolerance))\
4414#define UTEST_EQUAL_TOLERANCE_EXPR(Actual, Expected, Tolerance)\
4415 if (!TestEqual(TEXT(#Actual), Actual, Expected, Tolerance))\
4420#define UTEST_NEARLY_EQUAL(What, Actual, Expected, Tolerance)\
4421 if (!TestNearlyEqual(What, Actual, Expected, Tolerance))\
4426#define UTEST_NEARLY_EQUAL_EXPR(Actual, Expected, Tolerance)\
4427 if (!TestNearlyEqual(TEXT(#Actual), Actual, Expected, Tolerance))\
4432#define UTEST_EQUAL_INSENSITIVE(What, Actual, Expected)\
4433 if (!TestEqual(What, Actual, Expected))\
4438#define UTEST_EQUAL_INSENSITIVE_EXPR(Actual, Expected)\
4439 if (!TestEqual(TEXT(#Actual), Actual, Expected))\
4444#define UTEST_NOT_EQUAL_INSENSITIVE(What, Actual, Expected)\
4445 if (!TestNotEqual(What, Actual, Expected))\
4450#define UTEST_NOT_EQUAL_INSENSITIVE_EXPR(Actual, Expected)\
4451 if (!TestNotEqual(TEXT(#Actual), Actual, Expected))\
4456#define UTEST_EQUAL_SENSITIVE(What, Actual, Expected)\
4457 if (!TestEqualSensitive(What, Actual, Expected))\
4462#define UTEST_EQUAL_SENSITIVE_EXPR(Actual, Expected)\
4463 if (!TestEqualSensitive(TEXT(#Actual), Actual, Expected))\
4468#define UTEST_NOT_EQUAL_SENSITIVE(What, Actual, Expected)\
4469 if (!TestNotEqualSensitive(What, Actual, Expected))\
4474#define UTEST_NOT_EQUAL_SENSITIVE_EXPR(Actual, Expected)\
4475 if (!TestNotEqualSensitive(TEXT(#Actual), Actual, Expected))\
4480#define UTEST_NOT_EQUAL(What, Actual, Expected)\
4481 if (!TestNotEqual(What, Actual, Expected))\
4486#define UTEST_NOT_EQUAL_EXPR(Actual, Expected)\
4487 if (!TestNotEqual(FString::Printf(TEXT("%s != %s"), TEXT(#Actual), TEXT(#Expected)), Actual, Expected))\
4492#define UTEST_LESS(What, Actual, Expected)\
4493 if (!TestLessThan(What, Actual, Expected))\
4498#define UTEST_LESS_EXPR(Actual, Expected)\
4499 if (!TestLessThan(TEXT(#Actual), Actual, Expected))\
4504#define UTEST_LESS_TOLERANCE(What, Actual, Expected, Tolerance)\
4505 if (!TestLessThan(What, Actual, Expected, Tolerance))\
4510#define UTEST_LESS_TOLERANCE_EXPR(Actual, Expected, Tolerance)\
4511 if (!TestLessThan(TEXT(#Actual), Actual, Expected, Tolerance))\
4516#define UTEST_GREATER(What, Actual, Expected)\
4517 if (!TestGreaterThan(What, Actual, Expected))\
4522#define UTEST_GREATER_EXPR(Actual, Expected)\
4523 if (!TestGreaterThan(TEXT(#Actual), Actual, Expected))\
4528#define UTEST_GREATER_TOLERANCE(What, Actual, Expected, Tolerance)\
4529 if (!TestGreaterThan(What, Actual, Expected, Tolerance))\
4534#define UTEST_GREATER_TOLERANCE_EXPR(Actual, Expected, Tolerance)\
4535 if (!TestGreaterThan(TEXT(#Actual), Actual, Expected, Tolerance))\
4540#define UTEST_LESS_EQUAL(What, Actual, Expected)\
4541 if (!TestLessEqual(What, Actual, Expected))\
4546#define UTEST_LESS_EQUAL_EXPR(Actual, Expected)\
4547 if (!TestLessEqual(TEXT(#Actual), Actual, Expected))\
4552#define UTEST_LESS_EQUAL_TOLERANCE(What, Actual, Expected, Tolerance)\
4553 if (!TestLessEqual(What, Actual, Expected, Tolerance))\
4558#define UTEST_LESS_EQUAL_TOLERANCE_EXPR(Actual, Expected, Tolerance)\
4559 if (!TestLessEqual(TEXT(#Actual), Actual, Expected, Tolerance))\
4564#define UTEST_GREATER_EQUAL(What, Actual, Expected)\
4565 if (!TestGreaterEqual(What, Actual, Expected))\
4570#define UTEST_GREATER_EQUAL_EXPR(Actual, Expected)\
4571 if (!TestGreaterEqual(TEXT(#Actual), Actual, Expected))\
4576#define UTEST_GREATER_EQUAL_TOLERANCE(What, Actual, Expected, Tolerance)\
4577 if (!TestGreaterEqual(What, Actual, Expected, Tolerance))\
4582#define UTEST_GREATER_EQUAL_TOLERANCE_EXPR(Actual, Expected, Tolerance)\
4583 if (!TestGreaterEqual(TEXT(#Actual), Actual, Expected, Tolerance))\
4588#define UTEST_SAME(What, Actual, Expected)\
4589 if (!TestSame(What, Actual, Expected))\
4594#define UTEST_SAME_EXPR(Actual, Expected)\
4595 if (!TestSame(FString::Printf(TEXT("%s == %s"), TEXT(#Actual), TEXT(#Expected)), Actual, Expected))\
4600#define UTEST_NOT_SAME(What, Actual, Expected)\
4601 if (!TestNotSame(What, Actual, Expected))\
4606#define UTEST_NOT_SAME_EXPR(Actual, Expected)\
4607 if (!TestNotSame(FString::Printf(TEXT("%s != %s"), TEXT(#Actual), TEXT(#Expected)), Actual, Expected))\
4612#define UTEST_SAME_PTR(What, Actual, Expected)\
4613 if (!TestSamePtr(What, Actual, Expected))\
4618#define UTEST_SAME_PTR_EXPR(Actual, Expected)\
4619 if (!TestSamePtr(FString::Printf(TEXT("%s == %s"), TEXT(#Actual), TEXT(#Expected)), Actual, Expected))\
4624#define UTEST_NOT_SAME_PTR(What, Actual, Expected)\
4625 if (!TestNotSamePtr(What, Actual, Expected))\
4630#define UTEST_NOT_SAME_PTR_EXPR(Actual, Expected)\
4631 if (!TestNotSamePtr(FString::Printf(TEXT("%s != %s"), TEXT(#Actual), TEXT(#Expected)), Actual, Expected))\
4636#define UTEST_TRUE(What, Value)\
4637 if (!TestTrue(What, Value))\
4642#define UTEST_TRUE_EXPR(Expression)\
4643 if (!TestTrue(TEXT(#Expression), Expression))\
4648#define UTEST_FALSE(What, Value)\
4649 if (!TestFalse(What, Value))\
4654#define UTEST_FALSE_EXPR(Expression)\
4655 if (!TestFalse(TEXT(#Expression), Expression))\
4660#define UTEST_VALID(What, Value)\
4661 if (!TestValid(What, Value))\
4666#define UTEST_VALID_EXPR(Value)\
4667 if (!TestValid(TEXT(#Value), Value))\
4672#define UTEST_INVALID(What, Value)\
4673 if (!TestInvalid(What, Value))\
4678#define UTEST_INVALID_EXPR(Value)\
4679 if (!TestInvalid(TEXT(#Value), Value))\
4684#define UTEST_NULL(What, Pointer)\
4685 if (!TestNull(What, Pointer))\
4690#define UTEST_NULL_EXPR(Pointer)\
4691 if (!TestNull(TEXT(#Pointer), Pointer))\
4696#define UTEST_NOT_NULL(What, Pointer)\
4697 if (!TestNotNull(What, Pointer))\
4703#define UTEST_NOT_NULL_EXPR(Pointer)\
4704 if (!TestNotNull(TEXT(#Pointer), Pointer))\
4731 return LatentPredicate();
4827 TEXT(
"%s has failed due to exceeding the max allowed run time of %f seconds. ")
4828 TEXT(
"This may be due to an error, or having a single command attempt to do ")
4829 TEXT(
"too many things. If this is not due to an error, consider breaking ")
4883 int32 CurrentIteration = 0;
4904 TEXT(
"%s has been set to Unlimited retries. Will be using MaxTotalRunTime to prevent ")
4905 TEXT(
"running forever. Default time is set at 300 seconds. If this is not enough time, ")
4950 MaxTotalRunTimeInSeconds = OverrideValue;
4974 double MaxTotalRunTimeInSeconds = 300.0;
4978#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_6
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
EAsyncExecution
Definition Async.h:28
EAutomationEventType
Definition AutomationEvent.h:10
constexpr EAutomationTestFlags EAutomationTestFlags_MediumPriorityAndAbove
Definition AutomationTest.h:146
constexpr EAutomationTestFlags EAutomationTestFlags_HighPriorityAndAbove
Definition AutomationTest.h:145
EAutomationComparisonToleranceLevel
Definition AutomationTest.h:864
UE_FORCEINLINE_HINT uint32 GetTypeHash(const FAutomationExpectedMessage &Object)
Definition AutomationTest.h:715
EAutomationTestFlags
Definition AutomationTest.h:88
CORE_API const TMap< FString, EAutomationTestFlags > & EAutomationTestFlags_GetTestFlagsMap()
Definition AutomationTest.cpp:179
constexpr EAutomationTestFlags EAutomationTestFlags_PriorityMask
Definition AutomationTest.h:147
constexpr EAutomationTestFlags EAutomationTestFlags_ApplicationContextMask
Definition AutomationTest.h:143
constexpr EAutomationTestFlags EAutomationTestFlags_FeatureMask
Definition AutomationTest.h:144
constexpr EAutomationTestFlags EAutomationTestFlags_FilterMask
Definition AutomationTest.h:148
bool bSuccess
Definition ConvexDecomposition3.cpp:819
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
SharedPointerInternals::TRawPtrProxy< ObjectType > MakeShareable(ObjectType *InObject)
Definition SharedPointer.h:1947
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:58
#define DECLARE_DELEGATE(DelegateName)
Definition DelegateCombinations.h:20
#define DECLARE_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:57
#define DECLARE_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:48
#define DECLARE_DELEGATE_ThreeParams(DelegateName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:66
#define DECLARE_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:49
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
return true
Definition ExternalRpcRegistry.cpp:601
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
#define LLM_SCOPE_BYNAME(...)
Definition LowLevelMemTracker.h:1098
const bool
Definition NetworkReplayStreaming.h:178
ERegexPatternFlags
Definition Regex.h:12
::FCriticalSection FTransactionallySafeCriticalSection
Definition TransactionallySafeCriticalSection.h:16
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition AutomationTest.h:2888
void xLatentIt(const FString &InDescription, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3358
FTimespan DefaultTimeout
Definition AutomationTest.h:3593
void xLatentBeforeEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3466
void xIt(const FString &InDescription, EAsyncExecution Execution, TFunction< void()> DoWork)
Definition AutomationTest.h:3343
void xLatentIt(const FString &InDescription, EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3363
virtual FString GetTestSourceFileName(const FString &InTestName) const override
Definition AutomationTest.h:3256
void xLatentIt(const FString &InDescription, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3353
void LatentAfterEach(TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3566
void xLatentIt(const FString &InDescription, EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3368
void LatentAfterEach(const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3572
void LatentIt(const FString &InDescription, EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3427
void xBeforeEach(EAsyncExecution Execution, TFunction< void()> DoWork)
Definition AutomationTest.h:3441
void xLatentAfterEach(const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3533
void xIt(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:3338
void xLatentAfterEach(TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3528
void xLatentAfterEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3543
void xLatentAfterEach(EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3538
void LatentBeforeEach(const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3495
void LatentAfterEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3584
void xBeforeEach(TFunction< void()> DoWork)
Definition AutomationTest.h:3436
void It(const FString &InDescription, EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3391
void LatentIt(const FString &InDescription, TFunction< void(const FDoneDelegate &)> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3400
void PostDefine()
Definition AutomationTest.h:3609
FAutomationSpecBase(const FString &InName, const bool bInComplexTask)
Definition AutomationTest.h:3204
void AfterEach(TFunction< void()> DoWork)
Definition AutomationTest.h:3548
void It(const FString &InDescription, EAsyncExecution Execution, TFunction< void()> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3382
void BeforeEach(EAsyncExecution Execution, TFunction< void()> DoWork)
Definition AutomationTest.h:3477
virtual int32 GetTestSourceFileLine(const FString &InTestName) const override
Definition AutomationTest.h:3273
void EnsureDefinitions() const
Definition AutomationTest.h:3598
void xAfterEach(EAsyncExecution Execution, TFunction< void()> DoWork)
Definition AutomationTest.h:3518
void xAfterEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork)
Definition AutomationTest.h:3523
void It(const FString &InDescription, TFunction< void()> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3373
void AfterEach(EAsyncExecution Execution, TFunction< void()> DoWork)
Definition AutomationTest.h:3554
void LatentIt(const FString &InDescription, EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3418
void xLatentBeforeEach(const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3456
void xLatentBeforeEach(EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3461
void xIt(const FString &InDescription, EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork)
Definition AutomationTest.h:3348
void LatentAfterEach(EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3578
void Describe(const TArray< FString > InDescriptions, TFunction< void(int32)> DoWork)
Definition AutomationTest.h:3309
void Redefine()
Definition AutomationTest.h:3675
void xBeforeEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork)
Definition AutomationTest.h:3446
virtual bool RunTest(const FString &InParameters) override
Definition AutomationTest.h:3214
void xAfterEach(TFunction< void()> DoWork)
Definition AutomationTest.h:3513
virtual uint32 GetRequiredDeviceNum() const override
Definition AutomationTest.h:3251
void LatentBeforeEach(TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3489
void LatentBeforeEach(EAsyncExecution Execution, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3501
void xLatentBeforeEach(TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3451
bool bEnableSkipIfError
Definition AutomationTest.h:3596
void LatentIt(const FString &InDescription, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork, UE::FSourceLocation Location=UE::FSourceLocation::Current())
Definition AutomationTest.h:3409
void BeforeEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork)
Definition AutomationTest.h:3483
void LatentBeforeEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void(const FDoneDelegate &)> DoWork)
Definition AutomationTest.h:3507
virtual void GetTests(TArray< FString > &OutBeautifiedNames, TArray< FString > &OutTestCommands) const override
Definition AutomationTest.h:3290
void AfterEach(EAsyncExecution Execution, const FTimespan &Timeout, TFunction< void()> DoWork)
Definition AutomationTest.h:3560
virtual bool IsStressTest() const
Definition AutomationTest.h:3246
void BeforeEach(TFunction< void()> DoWork)
Definition AutomationTest.h:3471
void Describe(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:3333
void xDescribe(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:3304
Definition AutomationTest.h:1594
bool TestEqual(const TCHAR *What, const FString &Actual, const FString &Expected)
Definition AutomationTest.h:2018
bool TestGreaterEqual(const FString &What, const int64 Actual, const int64 Expected)
Definition AutomationTest.h:2300
bool TestNotEqualSensitive(const FString &What, FStringView Actual, FStringView Expected)
Definition AutomationTest.h:2166
CORE_API bool TestNull(const TCHAR *What, const void *Pointer)
Definition AutomationTest.cpp:2681
CORE_API bool TestEqual(const TCHAR *What, const int32 Actual, const int32 Expected)
Definition AutomationTest.cpp:2066
virtual uint32 GetRequiredDeviceNum() const =0
CORE_API void AddExpectedMessage(FString ExpectedPatternString, ELogVerbosity::Type ExpectedVerbosity, EAutomationExpectedMessageFlags::MatchType CompareType=EAutomationExpectedMessageFlags::Contains, int32 Occurrences=1, bool IsRegex=true)
Definition AutomationTest.cpp:1917
CORE_API bool TestNotEqualSensitive(const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.cpp:2364
bool TestValid(const FString &Description, const ValueType &Value)
Definition AutomationTest.h:2619
bool TestNotEqual(const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2398
bool TestEqual(const FString &What, FUtf8StringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2103
bool TestNotEqualSensitive(const FString &What, FStringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2171
bool TestNotSamePtr(const TCHAR *Description, const ValueType *Actual, const ValueType *Expected)
Definition AutomationTest.h:2485
bool TestNotSamePtr(const FString &Description, const ValueType *Actual, const ValueType *Expected)
Definition AutomationTest.h:2503
bool TestLessThan(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2310
CORE_API bool TestLessThan(const TCHAR *What, const int32 Actual, const int32 Expected)
Definition AutomationTest.cpp:2423
FAutomationTestExecutionInfo ExecutionInfo
Definition AutomationTest.h:2665
bool TestEqualSensitive(const FString &What, FUtf8StringView Actual, FStringView Expected)
Definition AutomationTest.h:2149
bool TestInvalid(const TCHAR *Description, const ValueType &Value)
Definition AutomationTest.h:2372
static CORE_API TArray< FString > SuppressedLogCategories
Definition AutomationTest.h:1610
bool TestNotSame(const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2460
bool TestSame(const FString &Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2543
bool TestNotEqualSensitive(const TCHAR *What, const FString &Actual, const FString &Expected)
Definition AutomationTest.h:2057
virtual bool SuppressLogWarnings()
Definition AutomationTest.h:1933
CORE_API bool HasMetExpectedMessages(ELogVerbosity::Type VerbosityType=ELogVerbosity::All)
Definition AutomationTest.cpp:1813
virtual bool SuppressLogErrors()
Definition AutomationTest.h:1926
CORE_API bool TestGreaterThan(const TCHAR *What, const int32 Actual, const int32 Expected)
Definition AutomationTest.cpp:2443
bool TestEqual(const FString &What, FStringView Actual, FStringView Expected)
Definition AutomationTest.h:2108
FString GetTestContext() const
Definition AutomationTest.h:1623
virtual FString GetBeautifiedTestName() const =0
bool TestEqual(const FString &What, const int32 Actual, const int32 Expected)
Definition AutomationTest.h:2063
bool TestGreaterThan(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2320
bool TestLessThan(const FString &What, const int64 Actual, const int64 Expected)
Definition AutomationTest.h:2270
bool TestNotEqualSensitive(const FString &What, FUtf8StringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2161
virtual void SetTestContext(FString Context)
Definition AutomationTest.h:2642
bool bSuppressLogs
Definition AutomationTest.h:2656
virtual FString GetTestSourceFileName() const
Definition AutomationTest.h:1967
virtual bool CanRunInEnvironment(const FString &TestParams, FString *OutReason, bool *OutWarn) const
Definition AutomationTest.h:1995
bool bRunOnSeparateThread
Definition AutomationTest.h:2653
bool bComplexTask
Definition AutomationTest.h:2650
bool TestValid(const TCHAR *Description, const ValueType &Value)
Definition AutomationTest.h:2608
virtual CORE_API void AddErrorS(const FString &InError, const FString &InFilename, int32 InLineNumber)
Definition AutomationTest.cpp:1720
static CORE_API void LoadDefaultLogSettings()
Definition AutomationTest.cpp:2056
bool TestNotEqual(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2416
bool TestGreaterThan(const FString &What, const int32 Actual, const int32 Expected)
Definition AutomationTest.h:2275
bool TestLessEqual(const FString &What, const int64 Actual, const int64 Expected)
Definition AutomationTest.h:2290
bool TestSamePtr(const FString &Description, const ValueType *Actual, const ValueType *Expected)
Definition AutomationTest.h:2576
bool TestNotEqual(const TCHAR *What, const FString &Actual, const FString &Expected)
Definition AutomationTest.h:2027
bool TestNotSame(const FString &Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2470
virtual CORE_API void AddError(const FString &InError, int32 StackOffset=0)
Definition AutomationTest.cpp:1700
bool TestNotNull(const FString &What, const ValueType *Pointer)
Definition AutomationTest.h:2445
bool TestNotEqualSensitive(const FString &What, FUtf8StringView Actual, FStringView Expected)
Definition AutomationTest.h:2178
const bool IsComplexTask() const
Definition AutomationTest.h:1892
bool TestNull(const FString &What, const void *Pointer)
Definition AutomationTest.h:2518
bool TestSame(const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2533
virtual void GetTests(TArray< FString > &OutBeautifiedNames, TArray< FString > &OutTestCommands) const =0
bool TestEqual(const FString &What, FUtf8StringView Actual, FStringView Expected)
Definition AutomationTest.h:2120
CORE_API bool GetLastExecutionSuccessState()
Definition AutomationTest.cpp:1907
static CORE_API bool bElevateLogWarningsToErrors
Definition AutomationTest.h:1609
bool TestSamePtr(const TCHAR *Description, const ValueType *Actual, const ValueType *Expected)
Definition AutomationTest.h:2558
bool TestNearlyEqual(const FString &What, const FTransform Actual, const FTransform Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2232
bool TestEqual(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2073
bool TestTrue(const FString &What, bool Value)
Definition AutomationTest.h:2591
virtual bool RunTest(const FString &Parameters)=0
FString GetTestName() const
Definition AutomationTest.h:1620
bool TestLessEqual(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2325
bool TestGreaterEqual(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2335
CORE_API bool HasMetExpectedErrors()
Definition AutomationTest.cpp:1873
virtual CORE_API void AddEvent(const FAutomationEvent &InEvent, int32 StackOffset=0, bool bCaptureStack=false)
Definition AutomationTest.cpp:1789
bool TestEqual(const FString &What, const FTransform Actual, const FTransform Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2083
virtual FString GetTestOpenCommand(const FString &Parameter) const
Definition AutomationTest.h:1982
virtual CORE_API ~FAutomationTestBase()
Definition AutomationTest.cpp:168
CORE_API void GenerateTestNames(TArray< FAutomationTestInfo > &TestInfo) const
Definition AutomationTest.cpp:2005
virtual int32 GetTestSourceFileLine(const FString &InTestName) const
Definition AutomationTest.h:1976
bool TestInvalid(const FString &Description, const ValueType &Value)
Definition AutomationTest.h:2383
virtual EAutomationTestFlags GetTestFlags() const =0
CORE_API void AddExpectedMessagePlain(FString ExpectedString, ELogVerbosity::Type ExpectedVerbosity, EAutomationExpectedMessageFlags::MatchType CompareType=EAutomationExpectedMessageFlags::Contains, int32 Occurrences=1)
Definition AutomationTest.cpp:1937
const bool IsRanOnSeparateThread() const
Definition AutomationTest.h:1897
bool TestGreaterThan(const FString &What, const int64 Actual, const int64 Expected)
Definition AutomationTest.h:2280
bool TestEqual(const FString &What, const FColor Actual, const FColor Expected)
Definition AutomationTest.h:2093
virtual FString GetTestSourceFileName(const FString &InTestName) const
Definition AutomationTest.h:1973
CORE_API bool TestTrue(const TCHAR *What, bool Value)
Definition AutomationTest.cpp:2671
virtual CORE_API void AddWarning(const FString &InWarning, int32 StackOffset=0)
Definition AutomationTest.cpp:1740
CORE_API void GetExecutionInfo(FAutomationTestExecutionInfo &OutInfo) const
Definition AutomationTest.cpp:1912
CORE_API bool TestNearlyEqual(const TCHAR *What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.cpp:2398
virtual bool SuppressLogs()
Definition AutomationTest.h:1907
virtual FString GetTestAssetPath(const FString &Parameter) const
Definition AutomationTest.h:1979
virtual bool ShouldCaptureLogCategory(const class FName &Category) const
Definition AutomationTest.h:1919
CORE_API void ClearExecutionInfo()
Definition AutomationTest.cpp:1694
bool TestLessThan(const FString &What, const int32 Actual, const int32 Expected)
Definition AutomationTest.h:2265
bool TestFalse(const FString &What, bool Value)
Definition AutomationTest.h:2355
bool TestEqual(const FString &What, FStringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2113
CORE_API bool TestFalse(const TCHAR *What, bool Value)
Definition AutomationTest.cpp:2661
bool TestEqual(const FString &What, const FVector Actual, const FVector Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2078
CORE_API void AddExpectedErrorPlain(FString ExpectedString, EAutomationExpectedErrorFlags::MatchType CompareType=EAutomationExpectedErrorFlags::Contains, int32 Occurrences=1)
Definition AutomationTest.cpp:1982
virtual TArray< FString > GetSuppressedLogCategories()
Definition AutomationTest.h:1945
virtual int32 GetTestSourceFileLine() const
Definition AutomationTest.h:1970
CORE_API bool TestEqualInsensitive(const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.cpp:2300
static CORE_API bool bSuppressLogWarnings
Definition AutomationTest.h:1607
CORE_API EAutomationTestFlags ExtractAutomationTestFlags(FString InTagNotation)
Definition AutomationTest.cpp:1990
virtual CORE_API bool AddErrorIfFalse(bool bCondition, const FString &InError, int32 StackOffset=0)
Definition AutomationTest.cpp:1710
void PushContext(const FString &Context)
Definition AutomationTest.h:1984
bool TestEqual(const TCHAR *What, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2195
bool TestNearlyEqual(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2222
bool TestNearlyEqual(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2217
static CORE_API bool LogCategoryMatchesSeverityInclusive(ELogVerbosity::Type Actual, ELogVerbosity::Type MaximumVerbosity)
Definition AutomationTest.cpp:2048
bool TestEqual(const FString &What, const FRotator Actual, const FRotator Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2088
CORE_API bool TestEqualSensitive(const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.cpp:2330
FString TestParameterContext
Definition AutomationTest.h:2662
virtual CORE_API void SetTelemetryStorage(const FString &StorageName)
Definition AutomationTest.cpp:1783
CORE_API bool HasAnyErrors() const
Definition AutomationTest.cpp:1808
virtual FString GetTestFullName() const
Definition AutomationTest.h:1633
static CORE_API bool bSuppressLogErrors
Definition AutomationTest.h:1608
CORE_API bool TestNotEqualInsensitive(const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.cpp:2315
bool TestEqualSensitive(const FString &What, FUtf8StringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2132
bool TestNearlyEqual(const FString &What, const FRotator Actual, const FRotator Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2237
bool TestEqual(const FString &What, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2206
CORE_API bool TestGreaterEqual(const TCHAR *What, const int32 Actual, const int32 Expected)
Definition AutomationTest.cpp:2483
virtual CORE_API void AddAnalyticsItem(const FString &InAnalyticsItem)
Definition AutomationTest.cpp:1760
bool TestNotEqual(const FString &Description, const ValueType &Actual, const ValueType &Expected)
Definition AutomationTest.h:2408
bool TestLessEqual(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2330
bool TestGreaterThan(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2315
bool TestEqualSensitive(const FString &What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.h:2127
CORE_API void GetExpectedMessages(TArray< FAutomationExpectedMessage > &OutInfo, ELogVerbosity::Type Verbosity=ELogVerbosity::All) const
Definition AutomationTest.cpp:1954
bool TestEqualSensitive(const FString &What, FStringView Actual, FUtf8StringView Expected)
Definition AutomationTest.h:2142
CORE_API void AddExpectedError(FString ExpectedPatternString, EAutomationExpectedErrorFlags::MatchType CompareType=EAutomationExpectedErrorFlags::Contains, int32 Occurrences=1, bool IsRegex=true)
Definition AutomationTest.cpp:1976
bool TestEqualSensitive(const FString &What, FStringView Actual, FStringView Expected)
Definition AutomationTest.h:2137
CORE_API bool TestNotEqual(const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.cpp:2224
void PopContext()
Definition AutomationTest.h:1989
void AddCommand(IAutomationNetworkCommand *NewCommand)
Definition AutomationTest.h:1960
FString TestName
Definition AutomationTest.h:2659
bool TestLessThan(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2305
virtual bool ElevateLogWarningsToErrors()
Definition AutomationTest.h:1940
bool TestNotEqualSensitive(const FString &What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.h:2156
bool TestGreaterEqual(const FString &What, const int32 Actual, const int32 Expected)
Definition AutomationTest.h:2295
bool TestNotEqual(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2421
virtual CORE_API void AddWarningS(const FString &InWarning, const FString &InFilename, int32 InLineNumber)
Definition AutomationTest.cpp:1730
bool TestGreaterEqual(const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2340
void AddCommand(IAutomationLatentCommand *NewCommand)
Definition AutomationTest.h:1951
bool TestNearlyEqual(const FString &What, const FVector Actual, const FVector Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2227
virtual CORE_API void AddTelemetryData(const FString &DataPoint, double Measurement, const FString &Context=TEXT(""))
Definition AutomationTest.cpp:1767
bool TestLessEqual(const FString &What, const int32 Actual, const int32 Expected)
Definition AutomationTest.h:2285
CORE_API bool TestLessEqual(const TCHAR *What, const int32 Actual, const int32 Expected)
Definition AutomationTest.cpp:2463
bool TestNotNull(const TCHAR *What, const ValueType *Pointer)
Definition AutomationTest.h:2435
bool TestEqual(const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
Definition AutomationTest.h:2068
bool TestEqual(const FString &What, const TCHAR *Actual, const TCHAR *Expected)
Definition AutomationTest.h:2098
virtual CORE_API void AddInfo(const FString &InLogItem, int32 StackOffset=0, bool bCaptureStack=false)
Definition AutomationTest.cpp:1750
Definition AutomationTest.h:195
void PushContext(const FString &Context)
Definition AutomationTest.h:235
~FAutomationTestExecutionInfo()
Definition AutomationTest.h:206
int32 GetErrorTotal() const
Definition AutomationTest.h:227
const FString & GetContext() const
Definition AutomationTest.h:229
TArray< FAutomationTelemetryData > TelemetryItems
Definition AutomationTest.h:257
CORE_API void AddEvent(const FAutomationEvent &Event, int StackOffset=0, bool bCaptureStack=true)
Definition AutomationTest.cpp:1607
double Duration
Definition AutomationTest.h:263
CORE_API void AddError(const FString &ErrorMessage)
Definition AutomationTest.cpp:1648
void PopContext()
Definition AutomationTest.h:240
TArray< FString > AnalyticsItems
Definition AutomationTest.h:254
CORE_API int32 RemoveAllEvents(EAutomationEventType EventType)
Definition AutomationTest.cpp:1577
FString TelemetryStorage
Definition AutomationTest.h:260
CORE_API void AddWarning(const FString &WarningMessage)
Definition AutomationTest.cpp:1643
const TArray< FAutomationExecutionEntry > & GetEntries() const
Definition AutomationTest.h:219
bool bSuccessful
Definition AutomationTest.h:251
CORE_API void Clear()
Definition AutomationTest.cpp:1564
int32 GetWarningTotal() const
Definition AutomationTest.h:226
FAutomationTestExecutionInfo()
Definition AutomationTest.h:198
Definition AutomationTest.h:947
CORE_API void LoadTestTagMappings()
Definition AutomationTest.cpp:924
CORE_API bool RunSmokeTests()
Definition AutomationTest.cpp:526
static CORE_API bool NeedLogBPTestMetadata()
Definition AutomationTest.cpp:343
FOnTestEvent OnTestStartEvent
Definition AutomationTest.h:956
bool IsLatentCommandQueueEmpty() const
Definition AutomationTest.h:1153
CORE_API void EnqueueNetworkCommand(TSharedPtr< IAutomationNetworkCommand > NewCommand)
Definition AutomationTest.cpp:482
FSimpleMulticastDelegate OnAfterAllTestsEvent
Definition AutomationTest.h:980
static FAutomationTestFramework & GetInstance()
Definition AutomationTest.h:998
FString GetCurrentTestFullPath() const
Definition AutomationTest.h:1268
FOnTestEvent OnTestEndEvent
Definition AutomationTest.h:959
CORE_API bool RegisterAutomationTest(const FString &InTestNameToRegister, FAutomationTestBase *InTestToRegister)
Definition AutomationTest.cpp:358
FOnTestDataRetrieved OnTestDataRetrieved
Definition AutomationTest.h:968
CORE_API void GetValidTestNames(TArray< FAutomationTestInfo > &TestInfo) const
Definition AutomationTest.cpp:795
CORE_API bool CanRunTestInEnvironment(const FString &InTestToRun, FString *OutReason, bool *OutWarn) const
Definition AutomationTest.cpp:1411
FOnTestScreenshotComparisonReport OnScreenshotComparisonReport
Definition AutomationTest.h:965
CORE_API void SetRequestedTestFilter(const EAutomationTestFlags InRequestedTestFlags)
Definition AutomationTest.cpp:1115
CORE_API void GetTestFullNamesMatchingTagPattern(TArray< FString > &OutTestNames, const FString &TagPattern) const
Definition AutomationTest.cpp:895
FSimpleMulticastDelegate PostTestingEvent
Definition AutomationTest.h:953
CORE_API bool ExecuteLatentCommands()
Definition AutomationTest.cpp:674
CORE_API FString GetUserAutomationDirectory() const
Definition AutomationTest.cpp:331
CORE_API void SaveTestTagMappings(const TArray< FString > &TestFullNames, const TArray< FString > &TestFilePaths, const FBeforeTagMappingConfigSaved &BeforeConfigSaved, const FAfterTagMappingConfigSaved &AfterConfigSaved) const
Definition AutomationTest.cpp:990
CORE_API TSet< FString > GetAllExistingTags()
Definition AutomationTest.cpp:440
CORE_API bool IsAnyOnLeavingTestSectionBound() const
Definition AutomationTest.cpp:1182
CORE_API FOnTestSectionEvent & GetOnEnteringTestSection(const FString &Section)
Definition AutomationTest.cpp:1130
CORE_API FOnTestScreenshotCaptured & OnScreenshotCaptured()
Definition AutomationTest.cpp:1120
CORE_API void NotifyPerformanceDataRetrieved(bool bSuccess, const FString &ErrorMessage)
Definition AutomationTest.cpp:1486
CORE_API void GetPossibleRestrictedPaths(const FString &BasePath, const TArray< FString > &RestrictedFolderNames, TArray< FString > &OutRestrictedFolders) const
Definition AutomationTest.cpp:910
CORE_API TArray< FString > GetTagsForAutomationTestAsArray(const FString &InTestName)
Definition AutomationTest.cpp:460
friend class FAutomationTestOutputDevice
Definition AutomationTest.h:1431
void SetForceSmokeTests(const bool bInForceSmokeTests)
Definition AutomationTest.h:1231
CORE_API void NotifyTestDataRetrieved(bool bWasNew, const FString &JsonData)
Definition AutomationTest.cpp:1481
CORE_API void TriggerOnEnteringTestSection(const FString &Section) const
Definition AutomationTest.cpp:1140
FSimpleMulticastDelegate PreTestingEvent
Definition AutomationTest.h:950
CORE_API FOnTestSectionEvent & GetOnLeavingTestSection(const FString &Section)
Definition AutomationTest.cpp:1164
CORE_API void NotifyScreenshotComparisonComplete(const FAutomationScreenshotCompareResults &CompareResults)
Definition AutomationTest.cpp:1471
CORE_API void EnqueueLatentCommand(TSharedPtr< IAutomationLatentCommand > NewCommand)
Definition AutomationTest.cpp:471
CORE_API bool RegisterAutomationTestTags(const FString &InTestNameToRegister, const FString &InTestTagsToRegister, bool InImmutable=true)
Definition AutomationTest.cpp:379
CORE_API void DequeueAllCommands()
Definition AutomationTest.cpp:732
CORE_API bool StopTest(FAutomationTestExecutionInfo &OutExecutionInfo)
Definition AutomationTest.cpp:661
FOnTestScreenshotComparisonComplete OnScreenshotCompared
Definition AutomationTest.h:962
static CORE_API bool NeedPerformStereoTestVariants()
Definition AutomationTest.cpp:348
FOnPerformanceDataRetrieved OnPerformanceDataRetrieved
Definition AutomationTest.h:971
static CORE_API bool NeedUseLightweightStereoTestVariants()
Definition AutomationTest.cpp:353
CORE_API FOnTestScreenshotAndTraceCaptured & OnScreenshotAndTraceCaptured()
Definition AutomationTest.cpp:1125
CORE_API bool ContainsTest(const FString &InTestName) const
Definition AutomationTest.cpp:493
CORE_API void SetDeveloperDirectoryIncluded(const bool bInDeveloperDirectoryIncluded)
Definition AutomationTest.cpp:1110
CORE_API bool ExecuteNetworkCommands()
Definition AutomationTest.cpp:713
FSimpleMulticastDelegate OnBeforeAllTestsEvent
Definition AutomationTest.h:977
void SetCaptureStack(bool bCapture)
Definition AutomationTest.h:1245
CORE_API void NotifyScreenshotComparisonReport(const FAutomationScreenshotCompareResults &CompareResults)
Definition AutomationTest.cpp:1476
CORE_API void NotifyScreenshotTakenAndCompared()
Definition AutomationTest.cpp:1491
CORE_API void TriggerOnLeavingTestSection(const FString &Section) const
Definition AutomationTest.cpp:1174
CORE_API FString GetTagsForAutomationTest(const FString &InTestName)
Definition AutomationTest.cpp:450
CORE_API void StartTestByName(const FString &InTestToRun, const int32 InRoleIndex, const FString &InFullTestPath=FString())
Definition AutomationTest.cpp:611
CORE_API bool IsTagImmutable(const FString &InTestName, const FString &InTag) const
Definition AutomationTest.cpp:445
CORE_API void ResetTests()
Definition AutomationTest.cpp:603
FSimpleMulticastDelegate OnScreenshotTakenAndCompared
Definition AutomationTest.h:974
CORE_API bool ShouldTestContent(const FString &Path) const
Definition AutomationTest.cpp:1083
bool GetCaptureStack() const
Definition AutomationTest.h:1236
CORE_API bool UnregisterAutomationTestTags(const FString &InTestNameToUnregister)
Definition AutomationTest.cpp:424
CORE_API bool RegisterComplexAutomationTestTags(const FAutomationTestBase *InTest, const FString &InBeautifiedTestName, const FString &InTestTagsToRegister)
Definition AutomationTest.cpp:434
static CORE_API FAutomationTestFramework & Get()
Definition AutomationTest.cpp:325
CORE_API void AddAnalyticsItemToCurrentTest(const FString &AnalyticsItem)
Definition AutomationTest.cpp:1459
FAutomationTestBase * GetCurrentTest() const
Definition AutomationTest.h:1260
static CORE_API bool NeedSkipStackWalk()
Definition AutomationTest.cpp:337
CORE_API void LoadTestModules()
Definition AutomationTest.cpp:746
CORE_API bool UnregisterAutomationTest(const FString &InTestNameToUnregister)
Definition AutomationTest.cpp:369
CORE_API bool IsAnyOnEnteringTestSectionBound() const
Definition AutomationTest.cpp:1148
Definition AutomationTest.h:277
FString GetTestTags() const
Definition AutomationTest.h:361
const int32 GetNumParticipantsRequired() const
Definition AutomationTest.h:457
const FString & GetDisplayName() const
Definition AutomationTest.h:331
const FString GetOpenCommand() const
Definition AutomationTest.h:411
void InformOfNewDeviceRunningTest()
Definition AutomationTest.h:437
const FString GetTestParameter() const
Definition AutomationTest.h:371
void ResetNumDevicesRunningTest()
Definition AutomationTest.h:429
FAutomationTestInfo()=default
void SetNumParticipantsRequired(int32 NumRequired)
Definition AutomationTest.h:478
const FString GetAssetPath() const
Definition AutomationTest.h:401
FAutomationTestInfo(const FString &InDisplayName, const FString &InFullTestPath, const FString &InTestName, const EAutomationTestFlags InTestFlags, const int32 InNumParticipantsRequired, const FString &InParameterName=FString(), const FString &InSourceFile=FString(), int32 InSourceFileLine=0, const FString &InAssetPath=FString(), const FString &InOpenCommand=FString(), const FString &InTestTags=FString())
Definition AutomationTest.h:298
const FString GetSourceFile() const
Definition AutomationTest.h:381
const EAutomationTestFlags GetTestFlags() const
Definition AutomationTest.h:421
void AddTestFlags(const EAutomationTestFlags InTestFlags)
Definition AutomationTest.h:321
void SetDisplayName(const FString &InDisplayName)
Definition AutomationTest.h:468
const int32 GetSourceFileLine() const
Definition AutomationTest.h:391
const FString & GetFullTestPath() const
Definition AutomationTest.h:341
const int GetNumDevicesRunningTest() const
Definition AutomationTest.h:447
FString GetTestName() const
Definition AutomationTest.h:351
Definition AutomationTest.h:2702
bool IsDiscoveryMode() const
Definition AutomationTest.h:2732
void It(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:2775
FBDDAutomationTestBase(const FString &InName, const bool bInComplexTask)
Definition AutomationTest.h:2704
virtual void GetTests(TArray< FString > &OutBeautifiedNames, TArray< FString > &OutTestCommands) const override
Definition AutomationTest.h:2718
void xIt(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:2769
virtual bool RunTest(const FString &Parameters) override
Definition AutomationTest.h:2710
void Describe(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:2743
void xDescribe(const FString &InDescription, TFunction< void()> DoWork)
Definition AutomationTest.h:2737
void BeforeEach(TFunction< void()> DoWork)
Definition AutomationTest.h:2807
void AfterEach(TFunction< void()> DoWork)
Definition AutomationTest.h:2812
Definition AutomationTest.h:4740
virtual bool Update() override
Definition AutomationTest.h:4747
FDelayedFunctionLatentCommand(TFunction< void()> InCallback, float InDelay=0.1f)
Definition AutomationTest.h:4742
Definition FeedbackContext.h:30
Definition AutomationTest.h:4718
virtual bool Update() override
Definition AutomationTest.h:4729
virtual ~FFunctionLatentCommand()
Definition AutomationTest.h:4725
FFunctionLatentCommand(TFunction< bool()> InLatentPredicate)
Definition AutomationTest.h:4720
Definition NameTypes.h:617
Definition UnrealType.h:3087
Definition OutputDevice.h:133
Definition TextFilterExpressionEvaluator.h:198
Definition ThreadSafeBool.h:17
Definition AutomationTest.h:577
FThreadedAutomationLatentCommand(TUniqueFunction< void()> InFunction)
Definition AutomationTest.h:592
TFuture< void > Future
Definition AutomationTest.h:600
virtual bool Update() override
Definition AutomationTest.h:582
virtual ~FThreadedAutomationLatentCommand()
Definition AutomationTest.h:580
TUniqueFunction< void()> Function
Definition AutomationTest.h:598
Definition AutomationTest.h:4765
FUntilCommand(TFunction< bool()> InCallback, TFunction< bool()> InTimeoutCallback, float InTimeout=5.0f)
Definition AutomationTest.h:4767
virtual bool Update() override
Definition AutomationTest.h:4773
Definition AutomationTest.h:4803
bool IsDelayTimerRunning() const
Definition AutomationTest.h:4917
IAutomationLatentCommandWithRetriesAndDelays(const FString InCommandClassName, const int32 InMaxRetries, const double InWaitTimeBetweenRuns)
Definition AutomationTest.h:4890
const int32 MaxRetries
Definition AutomationTest.h:4958
virtual ~IAutomationLatentCommandWithRetriesAndDelays()
Definition AutomationTest.h:4805
bool HasExceededMaxTotalRunTime()
Definition AutomationTest.h:4924
bool CanRetry() const
Definition AutomationTest.h:4931
const double DelayTimeInSeconds
Definition AutomationTest.h:4966
void OverrideMaxTotalRunTimeInSeconds(double OverrideValue)
Definition AutomationTest.h:4948
const FString CommandClassName
Definition AutomationTest.h:4954
void ResetDelayTimer()
Definition AutomationTest.h:4911
IAutomationLatentCommandWithRetriesAndDelays()
Definition AutomationTest.h:4887
const bool bHasUnlimitedRetries
Definition AutomationTest.h:4962
double DelayStartTime
Definition AutomationTest.h:4969
virtual void CommandFailedDueToError(const FString &ErrorMessage)
Definition AutomationTest.h:4807
FAutomationTestBase * GetCurrentTest() const
Definition AutomationTest.h:4943
virtual bool Update() override
Definition AutomationTest.h:4818
FString GetTestAndCommandName() const
Definition AutomationTest.h:4937
Definition AutomationTest.h:525
double StartTime
Definition AutomationTest.h:568
virtual ~IAutomationLatentCommand()
Definition AutomationTest.h:528
IAutomationLatentCommand()
Definition AutomationTest.h:551
double GetCurrentRunTime() const
Definition AutomationTest.h:557
Definition AutomationTest.h:610
virtual uint32 GetRoleIndex() const =0
virtual ~IAutomationNetworkCommand()
Definition AutomationTest.h:613
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType & Last(SizeType IndexFromTheEnd=0) UE_LIFETIMEBOUND
Definition Array.h:1263
void RemoveAt(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2083
UE_NODEBUG UE_FORCEINLINE_HINT void Push(ElementType &&Item)
Definition Array.h:1224
void Reset(SizeType NewSize=0)
Definition Array.h:2246
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void Append(const TArray< OtherElementType, OtherAllocatorType > &Source)
Definition Array.h:2412
ElementType Pop(EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:1196
UE_NODEBUG UE_FORCEINLINE_HINT ElementType & Top() UE_LIFETIMEBOUND
Definition Array.h:1248
void Empty(SizeType Slack=0)
Definition Array.h:2273
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
bool IsValid() const
Definition Future.h:267
bool IsReady() const
Definition Future.h:256
Definition UnrealString.h.inl:34
bool IsEmpty() const
Definition Queue.h:206
Definition SharedPointer.h:1640
Definition SharedPointer.h:692
TSharedRef< ObjectType, Mode > ToSharedRef() const &
Definition SharedPointer.h:1028
UE_FORCEINLINE_HINT void Reset()
Definition SharedPointer.h:1120
Definition SharedPointer.h:153
Definition FunctionFwd.h:19
Definition StructuredLog.h:182
Definition SourceLocation.h:21
static UE_CONSTEVAL FSourceLocation Current(FSourceLocationImpl Impl=FSourceLocationImpl::current()) noexcept
Definition SourceLocation.h:107
Definition ScopeLock.h:21
Definition AutomationTest.h:154
MatchType
Definition AutomationTest.h:156
@ Contains
Definition AutomationTest.h:160
@ Exact
Definition AutomationTest.h:158
Definition GenericPlatformFile.h:25
Type
Definition LogVerbosity.h:17
@ All
Definition LogVerbosity.h:56
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
static double Seconds()
Definition AndroidPlatformTime.h:20
Definition AutomationTest.h:872
FAutomationComparisonToleranceAmount()
Definition AutomationTest.h:875
uint8 MinBrightness
Definition AutomationTest.h:914
uint8 Green
Definition AutomationTest.h:911
uint8 MaxBrightness
Definition AutomationTest.h:915
static FAutomationComparisonToleranceAmount FromToleranceLevel(EAutomationComparisonToleranceLevel InTolerance)
Definition AutomationTest.h:895
FAutomationComparisonToleranceAmount(uint8 R, uint8 G, uint8 B, uint8 A, uint8 InMinBrightness, uint8 InMaxBrightness)
Definition AutomationTest.h:885
uint8 Red
Definition AutomationTest.h:910
uint8 Blue
Definition AutomationTest.h:912
uint8 Alpha
Definition AutomationTest.h:913
Definition AutomationEvent.h:17
Definition AutomationTest.h:627
bool operator<(const FAutomationExpectedMessage &Other) const
Definition AutomationTest.h:708
bool operator==(const FAutomationExpectedMessage &Other) const
Definition AutomationTest.h:703
bool Matches(const FString &Message)
Look if Message matches the expected message and increment internal counter if true.
Definition AutomationTest.h:687
FAutomationExpectedMessage(FString &InMessagePattern, ELogVerbosity::Type InVerbosity, int32 InExpectedNumberOfOccurrences)
Definition AutomationTest.h:663
FString MessagePatternString
Definition AutomationTest.h:632
int32 ActualNumberOfOccurrences
Definition AutomationTest.h:643
FAutomationExpectedMessage(FString &InMessagePattern, ELogVerbosity::Type InVerbosity, EAutomationExpectedMessageFlags::MatchType InCompareType, int32 InExpectedNumberOfOccurrences=1, bool IsRegex=true)
Definition AutomationTest.h:650
TOptional< FRegexPattern > MessagePatternRegex
Definition AutomationTest.h:634
bool IsRegex() const
Definition AutomationTest.h:672
int32 ExpectedNumberOfOccurrences
Definition AutomationTest.h:642
ELogVerbosity::Type Verbosity
Definition AutomationTest.h:645
bool IsExactCompareType() const
Definition AutomationTest.h:677
EAutomationExpectedMessageFlags::MatchType CompareType
Definition AutomationTest.h:636
Definition AutomationTest.h:813
FAutomationScreenshotCompareResults()
Definition AutomationTest.h:826
bool bWasNew
Definition AutomationTest.h:818
FString ReportIncomingFilePath
Definition AutomationTest.h:823
FString ReportApprovedFilePath
Definition AutomationTest.h:822
double GlobalDifference
Definition AutomationTest.h:817
FString ScreenshotPath
Definition AutomationTest.h:824
double MaxLocalDifference
Definition AutomationTest.h:816
FString ReportComparisonFilePath
Definition AutomationTest.h:821
FGuid UniqueId
Definition AutomationTest.h:814
CORE_API FAutomationEvent ToAutomationEvent() const
Definition AutomationTest.cpp:1655
FString ErrorMessage
Definition AutomationTest.h:815
bool bWasSimilar
Definition AutomationTest.h:819
FString IncomingFilePath
Definition AutomationTest.h:820
FAutomationScreenshotCompareResults(FGuid InUniqueId, FString InErrorMessage, double InMaxLocalDifference, double InGlobalDifference, bool InWasNew, bool InWasSimilar, FString InIncomingFilePath, FString InReportComparisonFilePath, FString InReportApprovedFilePath, FString InReportIncomingFilePath, FString InScreenshotPath)
Definition AutomationTest.h:834
Definition AutomationTest.h:721
FString Rhi
Definition AutomationTest.h:736
float MaximumLocalError
Definition AutomationTest.h:771
int32 TextureQuality
Definition AutomationTest.h:758
int32 ShadingQuality
Definition AutomationTest.h:761
bool bIgnoreColors
Definition AutomationTest.h:774
uint8 ToleranceRed
Definition AutomationTest.h:765
uint8 ToleranceMaxBrightness
Definition AutomationTest.h:770
int32 PostProcessQuality
Definition AutomationTest.h:757
int32 ReflectionQuality
Definition AutomationTest.h:756
FString UniqueDeviceId
Definition AutomationTest.h:748
FString AdapterInternalDriverVersion
Definition AutomationTest.h:746
FString ScreenshotPath
Definition AutomationTest.h:777
int32 AntiAliasingQuality
Definition AutomationTest.h:753
int32 Width
Definition AutomationTest.h:731
bool bIgnoreAntiAliasing
Definition AutomationTest.h:773
FString FeatureLevel
Definition AutomationTest.h:737
FString TestName
Definition AutomationTest.h:725
uint8 ToleranceMinBrightness
Definition AutomationTest.h:769
bool bHasComparisonRules
Definition AutomationTest.h:764
FString Platform
Definition AutomationTest.h:735
float MaximumGlobalError
Definition AutomationTest.h:772
int32 FoliageQuality
Definition AutomationTest.h:760
FString Vendor
Definition AutomationTest.h:744
FString VariantName
Definition AutomationTest.h:723
FString AdapterUserDriverVersion
Definition AutomationTest.h:747
FAutomationScreenshotData()
Definition AutomationTest.h:779
uint8 ToleranceAlpha
Definition AutomationTest.h:768
FString Commit
Definition AutomationTest.h:729
bool bIsStereo
Definition AutomationTest.h:738
uint8 ToleranceGreen
Definition AutomationTest.h:766
FString Notes
Definition AutomationTest.h:726
bool bIsSubstrate
Definition AutomationTest.h:741
FString AdapterName
Definition AutomationTest.h:745
float ResolutionQuality
Definition AutomationTest.h:751
FString ScreenShotName
Definition AutomationTest.h:722
uint8 ToleranceBlue
Definition AutomationTest.h:767
int32 ShadowQuality
Definition AutomationTest.h:754
int32 Height
Definition AutomationTest.h:732
FGuid Id
Definition AutomationTest.h:728
FString Context
Definition AutomationTest.h:724
int32 GlobalIlluminationQuality
Definition AutomationTest.h:755
int32 EffectsQuality
Definition AutomationTest.h:759
int32 ViewDistanceQuality
Definition AutomationTest.h:752
Definition AutomationTest.h:180
FString Context
Definition AutomationTest.h:183
FAutomationTelemetryData(const FString &InDataPoint, double InMeasurement, const FString &InContext)
Definition AutomationTest.h:185
FString DataPoint
Definition AutomationTest.h:181
double Measurement
Definition AutomationTest.h:182
static CORE_API FDateTime UtcNow()
Definition DateTime.cpp:980
static bool IsWhitespace(CharType Char)
Definition Char.h:282
Definition Optional.h:131
constexpr OptionalType & GetValue()
Definition Optional.h:443
constexpr bool IsSet() const
Definition Optional.h:69