Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Misc
Inheritance Hierarchy
- FAutomationTestBase
- FAutomationSpecBase
- FBDDAutomationTestBase
- FCompareBasepassShaders
- FFunctionalTestBase
- FPCGTestBaseClass
- FRigVMStructTestBase
- FControlRigUnitTestBase
- TTestRunner
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Misc/AutomationTest.h |
| Include | #include "Misc/AutomationTest.h" |
Syntax
class FAutomationTestBase
Remarks
Simple abstract base class for all automation tests
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bComplexTask | Flag to indicate if this is a complex task. | |
| bool | bRunOnSeparateThread | Flag to indicate if this test should be ran on it's own thread. | |
| bool | bSuppressLogs | Flag to suppress logs | |
| FAutomationTestExecutionInfo | ExecutionInfo | Info related to the last execution of this test | |
| FString | TestName | Name of the test | |
| FString | TestParameterContext | Context of the test |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FAutomationTestBase
(
const FString& InName, |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddAnalyticsItem
(
const FString& InAnalyticsItem |
Adds a analytics string to parse later | |
| void | AddCommand
(
IAutomationNetworkCommand* NewCommand |
Enqueues a new latent network command. | |
| void | AddCommand
(
IAutomationLatentCommand* NewCommand |
Enqueues a new latent command. | |
| void | Adds an error message to this test | ||
| bool | AddErrorIfFalse
(
bool bCondition, |
Adds an error message to this test if the condition is false | |
| void | Adds an error message to this test | ||
| void | AddEvent
(
const FAutomationEvent& InEvent, |
Adds an automation event directly into the execution log. | |
| void | AddExpectedError
(
FString ExpectedPatternString, |
Adds a regex pattern to an internal list that this test will expect to encounter in error or warning logs during its execution. | |
| void | AddExpectedMessage
(
FString ExpectedPatternString, |
Adds a regex pattern to an internal list that this test will expect to encounter in logs (of the specified verbosity) during its execution. | |
| void | AddExpectedMessage
(
FString ExpectedPatternString, |
Adds a regex pattern to an internal list that this test will expect to encounter in logs (of all severities) during its execution. | |
| void | Adds a log item to this test | ||
| void | AddTelemetryData
(
const TMap< FString, double >& ValuePairs, |
Adds several telemetry data point measurements | |
| void | AddTelemetryData
(
const FString& DataPoint, |
Adds a telemetry data point measurement | |
| void | AddWarning
(
const FString& InWarning, |
Adds a warning to this test | |
| void | AddWarningS
(
const FString& InWarning, |
Adds an warning message to this test | |
| bool | CanRunInEnvironment
(
const FString& TestParams, |
Checks if the test is able to run in the current environment. | |
| void | Clear any execution info/results from a prior running of this test | ||
| bool | If returns true then logging with a level of Warning will be treated as an error | ||
| uint32 | ExtractAutomationTestFlags
(
FString InTagNotation |
Extracts a combined EAutomationTestFlags value from a string representation using tag notation "[Filter_1]...[Filter_n][Tag_1]...[Tag_m]" | |
| void | GenerateTestNames
(
TArray< FAutomationTestInfo >& TestInfo |
Helper function that will generate a list of sub-tests via GetTests | |
| FString | Returns the beautified test name | ||
| void | GetExecutionInfo
(
FAutomationTestExecutionInfo& OutInfo |
Populate the provided execution info object with the execution info contained within the test. | |
| void | GetExpectedMessages
(
TArray< FAutomationExpectedMessage >& OutInfo, |
Populate the provided expected log messages object with the expected messages contained within the test. | |
| bool | Return the last success state for this test | ||
| uint32 | Pure virtual method; returns the number of participants for this test | ||
| TArray< FString > | Return suppressed log categories | ||
| FString | GetTestAssetPath
(
const FString& Parameter |
Allows navigation to the asset associated with the test if there is one. | |
| FString | Gets the parameter context of the test. | ||
| uint32 | GetTestFlags () |
Pure virtual method; returns the flags associated with the given automation test | |
| FString | Returns the beautified test name with test context. | ||
| FString | GetTestName () |
Gets the C++ name of the test. | |
| FString | GetTestOpenCommand
(
const FString& Parameter |
Return an exec command to open the test associated with this parameter. | |
| void | 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)\ | ||
| int32 | Gets the line number where this test was defined. | ||
| int32 | GetTestSourceFileLine
(
const FString& InTestName |
Gets the line number where this test was defined. | |
| FString | GetTestSourceFileName
(
const FString& InTestName |
Gets the filename where this test was defined. | |
| FString | Gets the filename where this test was defined. | ||
| bool | HasAnyErrors () |
Returns whether this test has any errors associated with it or not | |
| bool | Returns whether this test has encountered all expected errors defined for it | ||
| bool | HasMetExpectedMessages
(
ELogVerbosity::Type VerbosityType |
Returns whether this test has encountered all expected log messages defined for it | |
| const bool | Is this a complex tast - if so it will be a stress test. | ||
| const bool | |||
| void | Enables log settings from config | ||
| bool | LogCategoryMatchesSeverityInclusive
(
ELogVerbosity::Type Actual, |
Helper function that determines if the given log category matches the expected category, inclusively (so an Error counts as a Warning) | |
| void | PopContext () |
||
| void | PushContext
(
const FString& Context |
||
| bool | Virtual call to execute the automation test. | ||
| void | SetTelemetryStorage
(
const FString& StorageName |
Set telemetry storage name | |
| void | SetTestContext
(
FString Context |
Sets the parameter context of the test. | |
| bool | ShouldCaptureLogCategory
(
const FName& Category |
Should the log category be captured and surfaced as part of the test. | |
| bool | If returns true then logging with a level of Error will not be recorded in test results | ||
| bool | SuppressLogs () |
If true no logging will be included in test events | |
| bool | If returns true then logging with a level of Warning will not be recorded in test results | ||
| bool | TestEqual
(
const TCHAR* What, |
Logs an error if the two values are not equal. | |
| bool | |||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | |||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | |||
| bool | |||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | |||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | TestEqual
(
const TCHAR* What, |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | TestEqualInsensitive
(
const TCHAR* What, |
||
| bool | TestFalse
(
const TCHAR* What, |
Logs an error if the specified Boolean value is not false. | |
| bool | |||
| bool | TestInvalid
(
const TCHAR* Description, |
Logs an error if the given shared pointer is valid. | |
| bool | TestInvalid
(
const FString& Description, |
||
| bool | TestNearlyEqual
(
const FString& What, |
||
| bool | TestNearlyEqual
(
const FString& What, |
||
| bool | TestNearlyEqual
(
const FString& What, |
||
| bool | TestNearlyEqual
(
const FString& What, |
||
| bool | TestNearlyEqual
(
const FString& What, |
||
| bool | TestNearlyEqual
(
const TCHAR* What, |
||
| bool | TestNearlyEqual
(
const TCHAR* What, |
||
| bool | TestNearlyEqual
(
const TCHAR* What, |
||
| bool | TestNearlyEqual
(
const TCHAR* What, |
||
| bool | TestNearlyEqual
(
const TCHAR* What, |
||
| bool | TestNotEqual
(
const TCHAR* Description, |
Logs an error if the two values are equal. | |
| bool | TestNotEqual
(
const FString& Description, |
||
| bool | TestNotNull
(
const TCHAR* What, |
Logs an error if the specified pointer is NULL. | |
| bool | TestNotNull
(
const FString& What, |
||
| bool | TestNotSame
(
const FString& Description, |
||
| bool | TestNotSame
(
const TCHAR* Description, |
Logs an error if the two values are the same object in memory. | |
| bool | TestNull
(
const TCHAR* What, |
Logs an error if the specified pointer is not NULL. | |
| bool | |||
| bool | TestSame
(
const TCHAR* Description, |
Logs an error if the two values are not the same object in memory. | |
| bool | |||
| bool | TestTrue
(
const TCHAR* What, |
Logs an error if the specified Boolean value is not true. | |
| bool | |||
| bool | TestValid
(
const TCHAR* Description, |
Logs an error if the given shared pointer is not valid. | |
| bool | TestValid
(
const FString& Description, |
Constants
| Name | Description |
|---|---|
| bElevateLogWarningsToErrors | |
| bSuppressLogErrors | |
| bSuppressLogWarnings | Log flags |
| SuppressedLogCategories |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | Use GetLastExecutionSuccessState instead. | ||
| void | SetSuccessState
(
bool bSuccessful |
Use AddError(msg) instead to change the state of the test to a failure. |