Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FAutomationTestBase Class Referenceabstract

#include <AutomationTest.h>

+ Inheritance diagram for FAutomationTestBase:
+ Collaboration diagram for FAutomationTestBase:

Public Member Functions

 FAutomationTestBase (const FString &InName, const bool bInComplexTask)
 
virtual ~FAutomationTestBase ()
 
virtual uint32 GetTestFlags () const =0
 
FString GetTestName () const
 
FString GetTestContext () const
 
virtual FString GetTestFullName () const
 
virtual uint32 GetRequiredDeviceNum () const =0
 
void ClearExecutionInfo ()
 
virtual void AddError (const FString &InError, int32 StackOffset=0)
 
virtual void AddErrorIfFalse (bool bCondition, const FString &InError, int32 StackOffset=0)
 
virtual void AddErrorS (const FString &InError, const FString &InFilename, int32 InLineNumber)
 
virtual void AddWarningS (const FString &InWarning, const FString &InFilename, int32 InLineNumber)
 
virtual void AddWarning (const FString &InWarning, int32 StackOffset=0)
 
virtual void AddInfo (const FString &InLogItem, int32 StackOffset=0, bool bCaptureStack=false)
 
virtual void AddEvent (const FAutomationEvent &InEvent, int32 StackOffset=0, bool bCaptureStack=false)
 
virtual void AddAnalyticsItem (const FString &InAnalyticsItem)
 
virtual void AddTelemetryData (const FString &DataPoint, double Measurement, const FString &Context=TEXT(""))
 
virtual void AddTelemetryData (const TMap< FString, double > &ValuePairs, const FString &Context=TEXT(""))
 
virtual void SetTelemetryStorage (const FString &StorageName)
 
bool HasAnyErrors () const
 
bool HasMetExpectedMessages (ELogVerbosity::Type VerbosityType=ELogVerbosity::All)
 
bool HasMetExpectedErrors ()
 
bool GetLastExecutionSuccessState ()
 
void SetSuccessState (bool bSuccessful)
 
bool GetSuccessState ()
 
void GetExecutionInfo (FAutomationTestExecutionInfo &OutInfo) const
 
void GenerateTestNames (TArray< FAutomationTestInfo > &TestInfo) const
 
void AddExpectedMessage (FString ExpectedPatternString, ELogVerbosity::Type ExpectedVerbosity, EAutomationExpectedMessageFlags::MatchType CompareType=EAutomationExpectedMessageFlags::Contains, int32 Occurrences=1)
 
void AddExpectedMessage (FString ExpectedPatternString, EAutomationExpectedMessageFlags::MatchType CompareType=EAutomationExpectedMessageFlags::Contains, int32 Occurrences=1)
 
void GetExpectedMessages (TArray< FAutomationExpectedMessage > &OutInfo, ELogVerbosity::Type Verbosity=ELogVerbosity::All) const
 
void AddExpectedError (FString ExpectedPatternString, EAutomationExpectedErrorFlags::MatchType CompareType=EAutomationExpectedErrorFlags::Contains, int32 Occurrences=1)
 
const bool IsComplexTask () const
 
const bool IsRanOnSeparateThread () const
 
virtual bool SuppressLogs ()
 
virtual bool SuppressLogErrors ()
 
virtual bool SuppressLogWarnings ()
 
virtual bool ElevateLogWarningsToErrors ()
 
FORCEINLINE void AddCommand (IAutomationLatentCommand *NewCommand)
 
FORCEINLINE void AddCommand (IAutomationNetworkCommand *NewCommand)
 
virtual FString GetTestSourceFileName () const
 
virtual int32 GetTestSourceFileLine () const
 
virtual FString GetTestSourceFileName (const FString &InTestName) const
 
virtual int32 GetTestSourceFileLine (const FString &InTestName) const
 
virtual FString GetTestAssetPath (const FString &Parameter) const
 
virtual FString GetTestOpenCommand (const FString &Parameter) const
 
void PushContext (const FString &Context)
 
void PopContext ()
 
bool TestEqual (const TCHAR *What, const int32 Actual, const int32 Expected)
 
bool TestEqual (const TCHAR *What, const int64 Actual, const int64 Expected)
 
bool TestEqual (const TCHAR *What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const TCHAR *What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const TCHAR *What, const FVector Actual, const FVector Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const TCHAR *What, const FTransform Actual, const FTransform Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const TCHAR *What, const FRotator Actual, const FRotator Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const TCHAR *What, const FColor Actual, const FColor Expected)
 
bool TestEqual (const TCHAR *What, const FLinearColor Actual, const FLinearColor Expected)
 
bool TestEqual (const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
 
bool TestEqualInsensitive (const TCHAR *What, const TCHAR *Actual, const TCHAR *Expected)
 
bool TestEqual (const FString &What, const int32 Actual, const int32 Expected)
 
bool TestEqual (const FString &What, const float Actual, const float Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const FString &What, const double Actual, const double Expected, double Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const FString &What, const FVector Actual, const FVector Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const FString &What, const FRotator Actual, const FRotator Expected, float Tolerance=UE_KINDA_SMALL_NUMBER)
 
bool TestEqual (const FString &What, const FColor Actual, const FColor Expected)
 
bool TestEqual (const FString &What, const TCHAR *Actual, const TCHAR *Expected)
 
bool TestEqual (const TCHAR *What, const FString &Actual, const TCHAR *Expected)
 
bool TestEqual (const FString &What, const FString &Actual, const TCHAR *Expected)
 
bool TestEqual (const TCHAR *What, const TCHAR *Actual, const FString &Expected)
 
bool TestEqual (const FString &What, const TCHAR *Actual, const FString &Expected)
 
bool TestEqual (const TCHAR *What, const FString &Actual, const FString &Expected)
 
bool TestEqual (const FString &What, const FString &Actual, const FString &Expected)
 
template<typename ValueType >
bool TestEqual (const TCHAR *What, const ValueType &Actual, const ValueType &Expected)
 
template<typename ValueType >
bool TestEqual (const FString &What, const ValueType &Actual, const ValueType &Expected)
 
bool TestFalse (const TCHAR *What, bool Value)
 
bool TestFalse (const FString &What, bool Value)
 
template<typename ValueType >
bool TestInvalid (const TCHAR *Description, const TSharedPtr< ValueType > &SharedPointer)
 
template<typename ValueType >
bool TestInvalid (const FString &Description, const TSharedPtr< ValueType > &SharedPointer)
 
template<typename ValueType >
bool TestNotEqual (const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
 
template<typename ValueType >
bool TestNotEqual (const FString &Description, const ValueType &Actual, const ValueType &Expected)
 
template<typename ValueType >
bool TestNotNull (const TCHAR *What, const ValueType *Pointer)
 
template<typename ValueType >
bool TestNotNull (const FString &What, const ValueType *Pointer)
 
template<typename ValueType >
bool TestNotSame (const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
 
template<typename ValueType >
bool TestNotSame (const FString &Description, const ValueType &Actual, const ValueType &Expected)
 
bool TestNull (const TCHAR *What, const void *Pointer)
 
bool TestNull (const FString &What, const void *Pointer)
 
template<typename ValueType >
bool TestSame (const TCHAR *Description, const ValueType &Actual, const ValueType &Expected)
 
template<typename ValueType >
bool TestSame (const FString &Description, const ValueType &Actual, const ValueType &Expected)
 
bool TestTrue (const TCHAR *What, bool Value)
 
bool TestTrue (const FString &What, bool Value)
 
template<typename ValueType >
bool TestValid (const TCHAR *Description, const TSharedPtr< ValueType > &SharedPointer)
 
template<typename ValueType >
bool TestValid (const FString &Description, const TSharedPtr< ValueType > &SharedPointer)
 

Static Public Member Functions

static bool LogCategoryMatchesSeverityInclusive (ELogVerbosity::Type Actual, ELogVerbosity::Type MaximumVerbosity)
 

Protected Member Functions

virtual void GetTests (TArray< FString > &OutBeautifiedNames, TArray< FString > &OutTestCommands) const =0
 
virtual bool RunTest (const FString &Parameters)=0
 
virtual FString GetBeautifiedTestName () const =0
 
virtual void SetTestContext (FString Context)
 
uint32 ExtractAutomationTestFlags (FString InTagNotation)
 

Protected Attributes

bool bComplexTask
 
bool bRunOnSeparateThread
 
bool bSuppressLogs = false
 
FString TestName
 
FString TestParameterContext
 
FAutomationTestExecutionInfo ExecutionInfo
 

Private Member Functions

bool IsExpectedMessage (const FString &Message, const ELogVerbosity::Type &Verbosity=ELogVerbosity::All)
 
void InternalSetSuccessState (bool bSuccessful)
 

Private Attributes

TArray< FAutomationExpectedMessageExpectedMessages
 
FCriticalSection ActionCS
 

Friends

class FAutomationTestFramework
 

Detailed Description

Simple abstract base class for all automation tests

Definition at line 1243 of file AutomationTest.h.

Constructor & Destructor Documentation

◆ FAutomationTestBase()

FAutomationTestBase::FAutomationTestBase ( const FString & InName,
const bool bInComplexTask )
inline

Constructor

Parameters
InNameName of the test

Definition at line 1251 of file AutomationTest.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~FAutomationTestBase()

virtual FAutomationTestBase::~FAutomationTestBase ( )
inlinevirtual

Destructor

Definition at line 1261 of file AutomationTest.h.

Member Function Documentation

◆ AddAnalyticsItem()

virtual void FAutomationTestBase::AddAnalyticsItem ( const FString & InAnalyticsItem)
virtual

Adds a analytics string to parse later

Parameters
InLogItemLog item to add to this test

◆ AddCommand() [1/2]

FORCEINLINE void FAutomationTestBase::AddCommand ( IAutomationLatentCommand * NewCommand)
inline

Enqueues a new latent command.

Definition at line 1530 of file AutomationTest.h.

◆ AddCommand() [2/2]

FORCEINLINE void FAutomationTestBase::AddCommand ( IAutomationNetworkCommand * NewCommand)
inline

Enqueues a new latent network command.

Definition at line 1539 of file AutomationTest.h.

◆ AddError()

virtual void FAutomationTestBase::AddError ( const FString & InError,
int32 StackOffset = 0 )
virtual

Adds an error message to this test

Parameters
InErrorError message to add to this test
+ Here is the caller graph for this function:

◆ AddErrorIfFalse()

virtual void FAutomationTestBase::AddErrorIfFalse ( bool bCondition,
const FString & InError,
int32 StackOffset = 0 )
virtual

Adds an error message to this test if the condition is false

Parameters
bConditionThe condition to validate.
InErrorError message to add to this test

◆ AddErrorS()

virtual void FAutomationTestBase::AddErrorS ( const FString & InError,
const FString & InFilename,
int32 InLineNumber )
virtual

Adds an error message to this test

Parameters
InErrorError message to add to this test
InFilenameThe filename the error originated in
InLineNumberThe line number in the file this error originated in

◆ AddEvent()

virtual void FAutomationTestBase::AddEvent ( const FAutomationEvent & InEvent,
int32 StackOffset = 0,
bool bCaptureStack = false )
virtual

Adds an automation event directly into the execution log.

Parameters
InLogItemLog item to add to this test

◆ AddExpectedError()

void FAutomationTestBase::AddExpectedError ( FString ExpectedPatternString,
EAutomationExpectedErrorFlags::MatchType CompareType = EAutomationExpectedErrorFlags::Contains,
int32 Occurrences = 1 )

Adds a regex pattern to an internal list that this test will expect to encounter in error or warning logs during its execution. If an expected pattern is not encountered, it will cause this test to fail.

Parameters
ExpectedPatternString- The expected message string. Supports basic regex patterns.
CompareType- How to match this string with an encountered error, should it match exactly or simply just contain the string.
Occurrences- How many times to expect this error string to be seen. If > 0, the error must be seen the exact number of times specified or the test will fail. If == 0, the error must be seen one or more times (with no upper limit) or the test will fail.

◆ AddExpectedMessage() [1/2]

void FAutomationTestBase::AddExpectedMessage ( FString ExpectedPatternString,
EAutomationExpectedMessageFlags::MatchType CompareType = EAutomationExpectedMessageFlags::Contains,
int32 Occurrences = 1 )

Adds a regex pattern to an internal list that this test will expect to encounter in logs (of all severities) during its execution. If an expected pattern is not encountered, it will cause this test to fail.

Parameters
ExpectedPatternString- The expected message string. Supports basic regex patterns.
CompareType- How to match this string with an encountered message, should it match exactly or simply just contain the string.
Occurrences- How many times to expect this message string to be seen. If > 0, the message must be seen the exact number of times specified or the test will fail. If == 0, the message must be seen one or more times (with no upper limit) or the test will fail.

◆ AddExpectedMessage() [2/2]

void FAutomationTestBase::AddExpectedMessage ( FString ExpectedPatternString,
ELogVerbosity::Type ExpectedVerbosity,
EAutomationExpectedMessageFlags::MatchType CompareType = EAutomationExpectedMessageFlags::Contains,
int32 Occurrences = 1 )

Adds a regex pattern to an internal list that this test will expect to encounter in logs (of the specified verbosity) during its execution. If an expected pattern is not encountered, it will cause this test to fail.

Parameters
ExpectedPatternString- The expected message string. Supports basic regex patterns.
ExpectedVerbosity- The expected message verbosity. This is treated as a minimum requirement, so for example the Warning level will intercept Warnings, Errors and Fatal.
CompareType- How to match this string with an encountered message, should it match exactly or simply just contain the string.
Occurrences- How many times to expect this message string to be seen. If > 0, the message must be seen the exact number of times specified or the test will fail. If == 0, the message must be seen one or more times (with no upper limit) or the test will fail.

◆ AddInfo()

virtual void FAutomationTestBase::AddInfo ( const FString & InLogItem,
int32 StackOffset = 0,
bool bCaptureStack = false )
virtual

Adds a log item to this test

Parameters
InLogItemLog item to add to this test

◆ AddTelemetryData() [1/2]

virtual void FAutomationTestBase::AddTelemetryData ( const FString & DataPoint,
double Measurement,
const FString & Context = TEXT("") )
virtual

Adds a telemetry data point measurement

Parameters
DataPointName of the Data point
MeasurementValue to associate to the data point
Contextoptional context associated with the data point

◆ AddTelemetryData() [2/2]

virtual void FAutomationTestBase::AddTelemetryData ( const TMap< FString, double > & ValuePairs,
const FString & Context = TEXT("") )
virtual

Adds several telemetry data point measurements

Parameters
ValuePairsvalue pair of Name and Measurement of several Data points
Contextoptional context associated with the data point

◆ AddWarning()

virtual void FAutomationTestBase::AddWarning ( const FString & InWarning,
int32 StackOffset = 0 )
virtual

Adds a warning to this test

Parameters
InWarningWarning message to add to this test

◆ AddWarningS()

virtual void FAutomationTestBase::AddWarningS ( const FString & InWarning,
const FString & InFilename,
int32 InLineNumber )
virtual

Adds an warning message to this test

Parameters
InWarningWarning message to add to this test
InFilenameThe filename the error originated in
InLineNumberThe line number in the file this error originated in

◆ ClearExecutionInfo()

void FAutomationTestBase::ClearExecutionInfo ( )

Clear any execution info/results from a prior running of this test

◆ ElevateLogWarningsToErrors()

virtual bool FAutomationTestBase::ElevateLogWarningsToErrors ( )
inlinevirtual

If returns true then logging with a level of Warning will be treated as an error

Returns
true to make warnings errors

Definition at line 1525 of file AutomationTest.h.

◆ ExtractAutomationTestFlags()

uint32 FAutomationTestBase::ExtractAutomationTestFlags ( FString InTagNotation)
protected

Extracts a combined EAutomationTestFlags value from a string representation using tag notation "[Filter_1]...[Filter_n][Tag_1]...[Tag_m]"

◆ GenerateTestNames()

void FAutomationTestBase::GenerateTestNames ( TArray< FAutomationTestInfo > & TestInfo) const

Helper function that will generate a list of sub-tests via GetTests

◆ GetBeautifiedTestName()

virtual FString FAutomationTestBase::GetBeautifiedTestName ( ) const
protectedpure virtual

Returns the beautified test name

+ Here is the caller graph for this function:

◆ GetExecutionInfo()

void FAutomationTestBase::GetExecutionInfo ( FAutomationTestExecutionInfo & OutInfo) const

Populate the provided execution info object with the execution info contained within the test. Not particularly efficient, but providing direct access to the test's private execution info could result in errors.

Parameters
OutInfoExecution info to be populated with the same data contained within this test's execution info

◆ GetExpectedMessages()

void FAutomationTestBase::GetExpectedMessages ( TArray< FAutomationExpectedMessage > & OutInfo,
ELogVerbosity::Type Verbosity = ELogVerbosity::All ) const

Populate the provided expected log messages object with the expected messages contained within the test. Not particularly efficient, but providing direct access to the test's private execution messages list could result in errors.

Parameters
Verbosity- Optionally filter the returned messages by verbosity. This is inclusive, so Warning will return Warnings, Errors, etc.
OutInfo- Array of Expected Messages to be populated with the same data contained within this test's expected messages list

◆ GetLastExecutionSuccessState()

bool FAutomationTestBase::GetLastExecutionSuccessState ( )

Return the last success state for this test

+ Here is the caller graph for this function:

◆ GetRequiredDeviceNum()

virtual uint32 FAutomationTestBase::GetRequiredDeviceNum ( ) const
pure virtual

Pure virtual method; returns the number of participants for this test

Returns
Number of required participants

Implemented in FAutomationSpecBase.

◆ GetSuccessState()

bool FAutomationTestBase::GetSuccessState ( )
inline

[Deprecated] Return the last success state for this test

Definition at line 1419 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ GetTestAssetPath()

virtual FString FAutomationTestBase::GetTestAssetPath ( const FString & Parameter) const
inlinevirtual

Allows navigation to the asset associated with the test if there is one.

Definition at line 1558 of file AutomationTest.h.

◆ GetTestContext()

FString FAutomationTestBase::GetTestContext ( ) const
inline

Gets the parameter context of the test.

Definition at line 1278 of file AutomationTest.h.

+ Here is the caller graph for this function:

◆ GetTestFlags()

virtual uint32 FAutomationTestBase::GetTestFlags ( ) const
pure virtual

Pure virtual method; returns the flags associated with the given automation test

Returns
Automation test flags associated with the test

◆ GetTestFullName()

virtual FString FAutomationTestBase::GetTestFullName ( ) const
inlinevirtual

Returns the beautified test name with test context. Should return what is displayed in the Test Automation UI. See GenerateTestNames()

Definition at line 1283 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ GetTestName()

FString FAutomationTestBase::GetTestName ( ) const
inline

Gets the C++ name of the test.

Definition at line 1275 of file AutomationTest.h.

◆ GetTestOpenCommand()

virtual FString FAutomationTestBase::GetTestOpenCommand ( const FString & Parameter) const
inlinevirtual

Return an exec command to open the test associated with this parameter.

Definition at line 1561 of file AutomationTest.h.

◆ GetTests()

virtual void FAutomationTestBase::GetTests ( TArray< FString > & OutBeautifiedNames,
TArray< FString > & OutTestCommands ) const
protectedpure virtual

Asks the test to enumerate variants that will all go through the "RunTest" function with different parameters (for load all maps, this should enumerate all maps to load)\

Parameters
OutBeautifiedNames- Name of the test that can be displayed by the UI (for load all maps, it would be the map name without any directory prefix)
OutTestCommands- The parameters to be specified to each call to RunTests (for load all maps, it would be the map name to load)

Implemented in FBDDAutomationTestBase, and FAutomationSpecBase.

◆ GetTestSourceFileLine() [1/2]

virtual int32 FAutomationTestBase::GetTestSourceFileLine ( ) const
inlinevirtual

Gets the line number where this test was defined.

Definition at line 1549 of file AutomationTest.h.

+ Here is the caller graph for this function:

◆ GetTestSourceFileLine() [2/2]

virtual int32 FAutomationTestBase::GetTestSourceFileLine ( const FString & InTestName) const
inlinevirtual

Gets the line number where this test was defined.

Reimplemented in FAutomationSpecBase.

Definition at line 1555 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ GetTestSourceFileName() [1/2]

virtual FString FAutomationTestBase::GetTestSourceFileName ( ) const
inlinevirtual

Gets the filename where this test was defined.

Definition at line 1546 of file AutomationTest.h.

+ Here is the caller graph for this function:

◆ GetTestSourceFileName() [2/2]

virtual FString FAutomationTestBase::GetTestSourceFileName ( const FString & InTestName) const
inlinevirtual

Gets the filename where this test was defined.

Reimplemented in FAutomationSpecBase.

Definition at line 1552 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ HasAnyErrors()

bool FAutomationTestBase::HasAnyErrors ( ) const

Returns whether this test has any errors associated with it or not

Returns
true if this test has at least one error associated with it; false if not
+ Here is the caller graph for this function:

◆ HasMetExpectedErrors()

bool FAutomationTestBase::HasMetExpectedErrors ( )

Returns whether this test has encountered all expected errors defined for it

Returns
true if this test has encountered all expected errors; false if not

◆ HasMetExpectedMessages()

bool FAutomationTestBase::HasMetExpectedMessages ( ELogVerbosity::Type VerbosityType = ELogVerbosity::All)

Returns whether this test has encountered all expected log messages defined for it

Parameters
VerbosityTypeOptionally specify to check by log level. Defaults to all.
Returns
true if this test has encountered all expected messages; false if not

◆ InternalSetSuccessState()

void FAutomationTestBase::InternalSetSuccessState ( bool bSuccessful)
private

Sets whether the test has succeeded or not

Parameters
bSuccessfultrue to mark the test successful, false to mark the test as failed

◆ IsComplexTask()

const bool FAutomationTestBase::IsComplexTask ( ) const
inline

Is this a complex tast - if so it will be a stress test.

Returns
true if this is a complex task.

Definition at line 1486 of file AutomationTest.h.

◆ IsExpectedMessage()

bool FAutomationTestBase::IsExpectedMessage ( const FString & Message,
const ELogVerbosity::Type & Verbosity = ELogVerbosity::All )
private

Returns whether this test has defined any expected log messages matching the given message. If a match is found, the expected message definition increments it actual occurrence count.

Returns
true if this message matches any of the expected messages

◆ IsRanOnSeparateThread()

const bool FAutomationTestBase::IsRanOnSeparateThread ( ) const
inline

Definition at line 1491 of file AutomationTest.h.

◆ LogCategoryMatchesSeverityInclusive()

static bool FAutomationTestBase::LogCategoryMatchesSeverityInclusive ( ELogVerbosity::Type Actual,
ELogVerbosity::Type MaximumVerbosity )
static

Helper function that determines if the given log category matches the expected category, inclusively (so an Error counts as a Warning)

◆ PopContext()

void FAutomationTestBase::PopContext ( )
inline

Definition at line 1568 of file AutomationTest.h.

◆ PushContext()

void FAutomationTestBase::PushContext ( const FString & Context)
inline

Definition at line 1563 of file AutomationTest.h.

◆ RunTest()

virtual bool FAutomationTestBase::RunTest ( const FString & Parameters)
protectedpure virtual

Virtual call to execute the automation test.

Parameters
Parameters- Parameter list for the test (but it will be empty for simple tests)
Returns
TRUE if the test was run successfully; FALSE otherwise

Implemented in FAutomationSpecBase, and FBDDAutomationTestBase.

◆ SetSuccessState()

void FAutomationTestBase::SetSuccessState ( bool bSuccessful)
inline

[Deprecated] Use AddError(msg) instead to change the state of the test to a failure

Definition at line 1413 of file AutomationTest.h.

◆ SetTelemetryStorage()

virtual void FAutomationTestBase::SetTelemetryStorage ( const FString & StorageName)
virtual

Set telemetry storage name

Parameters
StorageNameName of the data storage

◆ SetTestContext()

virtual void FAutomationTestBase::SetTestContext ( FString Context)
inlineprotectedvirtual

Sets the parameter context of the test.

Definition at line 1894 of file AutomationTest.h.

◆ SuppressLogErrors()

virtual bool FAutomationTestBase::SuppressLogErrors ( )
inlinevirtual

If returns true then logging with a level of Error will not be recorded in test results

Returns
false to make errors errors

Definition at line 1511 of file AutomationTest.h.

◆ SuppressLogs()

virtual bool FAutomationTestBase::SuppressLogs ( )
inlinevirtual

If true no logging will be included in test events

Returns
true to suppress logs

Definition at line 1501 of file AutomationTest.h.

◆ SuppressLogWarnings()

virtual bool FAutomationTestBase::SuppressLogWarnings ( )
inlinevirtual

If returns true then logging with a level of Warning will not be recorded in test results

Returns
true to make warnings errors

Definition at line 1518 of file AutomationTest.h.

◆ TestEqual() [1/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const double Actual,
const double Expected,
double Tolerance = UE_KINDA_SMALL_NUMBER )
inline

Definition at line 1600 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [2/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const FColor Actual,
const FColor Expected )
inline

Definition at line 1615 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [3/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const float Actual,
const float Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )
inline

Definition at line 1595 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [4/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const FRotator Actual,
const FRotator Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )
inline

Definition at line 1610 of file AutomationTest.h.

◆ TestEqual() [5/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const FString & Actual,
const FString & Expected )
inline

Definition at line 1650 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [6/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const FString & Actual,
const TCHAR * Expected )
inline

Definition at line 1630 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [7/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const FVector Actual,
const FVector Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )
inline

Definition at line 1605 of file AutomationTest.h.

◆ TestEqual() [8/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const int32 Actual,
const int32 Expected )
inline

Definition at line 1590 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [9/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const TCHAR * Actual,
const FString & Expected )
inline

Definition at line 1640 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [10/25]

bool FAutomationTestBase::TestEqual ( const FString & What,
const TCHAR * Actual,
const TCHAR * Expected )
inline

Definition at line 1620 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [11/25]

template<typename ValueType >
bool FAutomationTestBase::TestEqual ( const FString & What,
const ValueType & Actual,
const ValueType & Expected )
inline

Definition at line 1676 of file AutomationTest.h.

◆ TestEqual() [12/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const double Actual,
const double Expected,
double Tolerance = UE_KINDA_SMALL_NUMBER )
+ Here is the caller graph for this function:

◆ TestEqual() [13/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FColor Actual,
const FColor Expected )
+ Here is the caller graph for this function:

◆ TestEqual() [14/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FLinearColor Actual,
const FLinearColor Expected )

◆ TestEqual() [15/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const float Actual,
const float Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )
+ Here is the caller graph for this function:

◆ TestEqual() [16/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FRotator Actual,
const FRotator Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )

◆ TestEqual() [17/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FString & Actual,
const FString & Expected )
inline

Definition at line 1645 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [18/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FString & Actual,
const TCHAR * Expected )
inline

Definition at line 1625 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [19/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FTransform Actual,
const FTransform Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )

◆ TestEqual() [20/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const FVector Actual,
const FVector Expected,
float Tolerance = UE_KINDA_SMALL_NUMBER )

◆ TestEqual() [21/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const int32 Actual,
const int32 Expected )
+ Here is the caller graph for this function:

◆ TestEqual() [22/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const int64 Actual,
const int64 Expected )

◆ TestEqual() [23/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const TCHAR * Actual,
const FString & Expected )
inline

Definition at line 1635 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestEqual() [24/25]

bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const TCHAR * Actual,
const TCHAR * Expected )
+ Here is the caller graph for this function:

◆ TestEqual() [25/25]

template<typename ValueType >
bool FAutomationTestBase::TestEqual ( const TCHAR * What,
const ValueType & Actual,
const ValueType & Expected )
inline

Logs an error if the two values are not equal.

Parameters
What- Description text for the test.
A- The first value.
B- The second value.
See also
TestNotEqual

Definition at line 1665 of file AutomationTest.h.

◆ TestEqualInsensitive()

bool FAutomationTestBase::TestEqualInsensitive ( const TCHAR * What,
const TCHAR * Actual,
const TCHAR * Expected )
+ Here is the caller graph for this function:

◆ TestFalse() [1/2]

bool FAutomationTestBase::TestFalse ( const FString & What,
bool Value )
inline

Definition at line 1692 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestFalse() [2/2]

bool FAutomationTestBase::TestFalse ( const TCHAR * What,
bool Value )

Logs an error if the specified Boolean value is not false.

Parameters
What- Description text for the test.
Value- The value to test.
See also
TestFalse
+ Here is the caller graph for this function:

◆ TestInvalid() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestInvalid ( const FString & Description,
const TSharedPtr< ValueType > & SharedPointer )
inline

Definition at line 1715 of file AutomationTest.h.

◆ TestInvalid() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestInvalid ( const TCHAR * Description,
const TSharedPtr< ValueType > & SharedPointer )
inline

Logs an error if the given shared pointer is valid.

Parameters
Description- Description text for the test.
SharedPointer- The shared pointer to test.
See also
TestValid

Definition at line 1705 of file AutomationTest.h.

◆ TestNotEqual() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotEqual ( const FString & Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Definition at line 1739 of file AutomationTest.h.

◆ TestNotEqual() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotEqual ( const TCHAR * Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Logs an error if the two values are equal.

Parameters
Description- Description text for the test.
A- The first value.
B- The second value.
See also
TestEqual

Definition at line 1729 of file AutomationTest.h.

◆ TestNotNull() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotNull ( const FString & What,
const ValueType * Pointer )
inline

Definition at line 1762 of file AutomationTest.h.

◆ TestNotNull() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotNull ( const TCHAR * What,
const ValueType * Pointer )
inline

Logs an error if the specified pointer is NULL.

Parameters
What- Description text for the test.
Pointer- The pointer to test.
See also
TestNull

Definition at line 1752 of file AutomationTest.h.

◆ TestNotSame() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotSame ( const FString & Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Definition at line 1786 of file AutomationTest.h.

◆ TestNotSame() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestNotSame ( const TCHAR * Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Logs an error if the two values are the same object in memory.

Parameters
Description- Description text for the test.
A- The first value.
B- The second value.
See also
TestSame

Definition at line 1776 of file AutomationTest.h.

◆ TestNull() [1/2]

bool FAutomationTestBase::TestNull ( const FString & What,
const void * Pointer )
inline

Definition at line 1801 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestNull() [2/2]

bool FAutomationTestBase::TestNull ( const TCHAR * What,
const void * Pointer )

Logs an error if the specified pointer is not NULL.

Parameters
Description- Description text for the test.
Pointer- The pointer to test.
See also
TestNotNull
+ Here is the caller graph for this function:

◆ TestSame() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestSame ( const FString & Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Definition at line 1825 of file AutomationTest.h.

◆ TestSame() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestSame ( const TCHAR * Description,
const ValueType & Actual,
const ValueType & Expected )
inline

Logs an error if the two values are not the same object in memory.

Parameters
Description- Description text for the test.
Actual- The actual value.
Expected- The expected value.
See also
TestNotSame

Definition at line 1815 of file AutomationTest.h.

◆ TestTrue() [1/2]

bool FAutomationTestBase::TestTrue ( const FString & What,
bool Value )
inline

Definition at line 1840 of file AutomationTest.h.

+ Here is the call graph for this function:

◆ TestTrue() [2/2]

bool FAutomationTestBase::TestTrue ( const TCHAR * What,
bool Value )

Logs an error if the specified Boolean value is not true.

Parameters
Description- Description text for the test.
Value- The value to test.
See also
TestFalse
+ Here is the caller graph for this function:

◆ TestValid() [1/2]

template<typename ValueType >
bool FAutomationTestBase::TestValid ( const FString & Description,
const TSharedPtr< ValueType > & SharedPointer )
inline

Definition at line 1866 of file AutomationTest.h.

◆ TestValid() [2/2]

template<typename ValueType >
bool FAutomationTestBase::TestValid ( const TCHAR * Description,
const TSharedPtr< ValueType > & SharedPointer )
inline

Logs an error if the given shared pointer is not valid.

Parameters
Description- Description text for the test.
SharedPointer- The shared pointer to test.
See also
TestInvalid

Definition at line 1856 of file AutomationTest.h.

Friends And Related Symbol Documentation

◆ FAutomationTestFramework

Definition at line 1920 of file AutomationTest.h.

Member Data Documentation

◆ ActionCS

FCriticalSection FAutomationTestBase::ActionCS
private

Critical section lock

Definition at line 1942 of file AutomationTest.h.

◆ bComplexTask

bool FAutomationTestBase::bComplexTask
protected

Definition at line 1902 of file AutomationTest.h.

◆ bRunOnSeparateThread

bool FAutomationTestBase::bRunOnSeparateThread
protected

Definition at line 1905 of file AutomationTest.h.

◆ bSuppressLogs

bool FAutomationTestBase::bSuppressLogs = false
protected

Flag to suppress logs

Definition at line 1908 of file AutomationTest.h.

◆ ExecutionInfo

FAutomationTestExecutionInfo FAutomationTestBase::ExecutionInfo
protected

Info related to the last execution of this test

Definition at line 1917 of file AutomationTest.h.

◆ ExpectedMessages

TArray<FAutomationExpectedMessage> FAutomationTestBase::ExpectedMessages
private

Definition at line 1939 of file AutomationTest.h.

◆ TestName

FString FAutomationTestBase::TestName
protected

Name of the test

Definition at line 1911 of file AutomationTest.h.

◆ TestParameterContext

FString FAutomationTestBase::TestParameterContext
protected

Context of the test

Definition at line 1914 of file AutomationTest.h.


The documentation for this class was generated from the following file: