Navigation
API > API/Developer > API/Developer/FunctionalTesting
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AFunctionalTest
- AEditorFunctionalTest
- AFunctionalAITestBase
- AFunctionalAITest
- AScreenshotFunctionalTestBase
- AFunctionalUIScreenshotTest
- AScreenshotFunctionalTest
- AEditorScreenshotFunctionalTest
References
| Module | FunctionalTesting |
| Header | /Engine/Source/Developer/FunctionalTesting/Classes/FunctionalTest.h |
| Include | #include "FunctionalTest.h" |
Syntax
class AFunctionalTest : public AActor
Variables
| Type | Name | Description | |
|---|---|---|---|
| FString | Author | The owner is the group or person responsible for the test. | |
| TArray< TObjectPtr< AActor > > | AutoDestroyActors | ||
| uint32: 1 | bIsEnabled | Allows a test to be disabled. | |
| bool | bIsRunning | AG TEMP - solving a compile issue in a temp way to unblock the bui.d. | |
| FName | CurrentRerunCause | Cause of the current rerun if we're in a named rerun. | |
| FString | Description | A description of the test, like what is this test trying to determine. | |
| FString | FailureMessage | ||
| EFunctionalTestLogHandling | LogErrorHandling | Determines how LogErrors are handled during this test. | |
| EFunctionalTestLogHandling | LogWarningHandling | Determines how LogWarnings are handled during this test. | |
| TObjectPtr< AActor > | ObservationPoint | Allows you to specify another actor to view the test from. | |
| FFunctionalTestEventSignature | OnTestFinished | Called when the test is finished. Use it to clean up | |
| FFunctionalTestEventSignature | OnTestPrepare | Called when the test is ready to prepare | |
| FFunctionalTestEventSignature | OnTestStart | Called when the test is started | |
| float | PreparationTimeLimit | The Test's time limit for preparation, this is the time it has to return true when checking IsReady(). | |
| FRandomStream | RandomNumbersStream | A random number stream that you can use during testing. | |
| TObjectPtr< class UFuncTestRenderingComponent > | RenderComp | ||
| TArray< FName > | RerunCauses | List of causes we need a re-run. | |
| EFunctionalTestResult | Result | ||
| uint32 | RunFrame | ||
| float | RunTime | ||
| uint32 | StartFrame | ||
| float | StartTime | ||
| TArray< FString > | Steps | ||
| FFunctionalTestDoneSignature | TestFinishedObserver | ||
| FString | TestLabel | ||
| TObjectPtr< class UTextRenderComponent > | TestName | ||
| float | TimeLimit | Test's time limit. '0' means no limit | |
| FText | TimesUpMessage | ||
| EFunctionalTestResult | TimesUpResult | If test is limited by time this is the result that will be returned when time runs out | |
| float | TotalTime |
Constructors
| Type | Name | Description | |
|---|---|---|---|
AFunctionalTest
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | |||
| void | Causes the test to be rerun for a specific named reason. | ||
| void | AddWarning
(
const FString& Message |
||
| bool | AssertEqual_Bool
(
bool Actual, |
Assert that two bools are equal | |
| bool | AssertEqual_Box2D
(
FBox2D Actual, |
Assert that two two-component boxes are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Double
(
double Actual, |
Assert that two double are equal within tolerance between two doubles. | |
| bool | AssertEqual_Float
(
float Actual, |
Assert that two floats are equal within tolerance between two floats. | |
| bool | AssertEqual_Int
(
int Actual, |
Assert that two ints are equal | |
| bool | AssertEqual_Matrix
(
FMatrix Actual, |
Assert that two 4x4 matrices are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Name
(
FName Actual, |
Assert that two FNames are equal | |
| bool | AssertEqual_Object
(
UObject* Actual, |
Assert that two Objects are equal | |
| bool | AssertEqual_Plane
(
FPlane Actual, |
Assert that two planes are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Quat
(
FQuat Actual, |
Assert that two quats are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Rotator
(
FRotator Actual, |
Assert that the component angles of two rotators are all equal within a small tolerance. | |
| bool | AssertEqual_String
(
FString Actual, |
Assert that two Strings are equal. | |
| bool | AssertEqual_TraceQueryResults
(
const UTraceQueryTestResults* Actual, |
Assert that two TraceQueryResults are equal. | |
| bool | AssertEqual_Transform
(
const FTransform& Actual, |
Assert that two transforms are (components memberwise - translation, rotation, scale) equal within a small tolerance. | |
| bool | AssertEqual_Vector
(
FVector Actual, |
Assert that two vectors are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Vector2D
(
FVector2D Actual, |
Assert that two two-component vectors are (memberwise) equal within a small tolerance. | |
| bool | AssertEqual_Vector4
(
FVector4 Actual, |
Assert that two four-component vectors are (memberwise) equal within a small tolerance. | |
| bool | AssertFalse
(
bool Condition, |
Assert that a boolean value is false. | |
| bool | AssertIsValid
(
UObject* Object, |
Assert that a UObject is valid | |
| bool | AssertNotEqual_Box2D
(
FBox2D Actual, |
Assert that two two-component boxes are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Matrix
(
FMatrix Actual, |
Assert that two 4x4 matrices are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Plane
(
FPlane Actual, |
Assert that two planes are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Quat
(
FQuat Actual, |
Assert that two quats are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Rotator
(
FRotator Actual, |
Assert that the component angles of two rotators are all not equal within a small tolerance. | |
| bool | AssertNotEqual_String
(
FString Actual, |
Assert that two Strings are not equal. | |
| bool | AssertNotEqual_Transform
(
const FTransform& Actual, |
Assert that two transforms are (components memberwise - translation, rotation, scale) not equal within a small tolerance. | |
| bool | AssertNotEqual_Vector
(
FVector Actual, |
Assert that two vectors are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Vector2D
(
FVector2D Actual, |
Assert that two two-component vectors are (memberwise) not equal within a small tolerance. | |
| bool | AssertNotEqual_Vector4
(
FVector4 Actual, |
Assert that two four-component vectors are (memberwise) not equal within a small tolerance. | |
| bool | AssertTrue
(
bool Condition, |
Assert that a boolean value is true. | |
| bool | AssertValue_DateTime
(
FDateTime Actual, |
Assert on a relationship between two DateTimes. | |
| bool | AssertValue_Double
(
double Actual, |
Assert on a relationship between two doubles. | |
| bool | AssertValue_Float
(
float Actual, |
Assert on a relationship between two floats. | |
| bool | AssertValue_Int
(
int32 Actual, |
Assert on a relationship between two integers. | |
| void | CleanUp () |
Called to clean up when tests is removed from the list of active tests after finishing execution. | |
| TArray< AActor * > | Used by debug drawing to gather actors this test is using and point at them on the level to better understand test's setup | ||
| void | FinishStep () |
||
| void | FinishTest
(
EFunctionalTestResult TestResult, |
||
| void | GatherRelevantActors
(
TArray< AActor* >& OutActors |
||
| FString | GetAdditionalTestFinishedMessage
(
EFunctionalTestResult TestResult |
||
| FName | Returns the current re-run reason if we're in a named re-run. | ||
| FString | |||
| FString | |||
| UBillboardComponent * | Returns SpriteComponent subobject | ||
| void | Goto an observation location. | ||
| bool | IsEnabled () |
||
| bool | IsInStep () |
||
| bool | IsReady () |
IsReady() is called once per frame after a test is run, until it returns true. | |
| bool | |||
| bool | IsRunning () |
||
| void | LogMessage
(
const FString& Message |
||
| void | LogStep
(
ELogVerbosity::Type Verbosity, |
Protected: | |
| FString | OnAdditionalTestFinishedMessageRequest
(
EFunctionalTestResult TestResult |
||
| void | OnSelectObject
(
UObject* NewSelection |
||
| void | OnTimeout () |
||
| bool | Retrieves information whether test wants to have another run just after finishing | ||
| void | PrepareTest () |
Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called. | |
| void | Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called. | ||
| void | Called once the IsReady() check for the test returns true. | ||
| void | RegisterAutoDestroyActor
(
AActor* ActorToAutoDestroy |
Actors registered this way will be automatically destroyed (by limiting their lifespan) on test finish | |
| bool | |||
| void | SetConsoleVariable
(
const FString& Name, |
Sets the CVar from the given input. Variable gets reset after the test. | |
| void | SetConsoleVariableFromBoolean
(
const FString& Name, |
Sets the CVar from the given input. Variable gets reset after the test. | |
| void | SetConsoleVariableFromFloat
(
const FString& Name, |
Sets the CVar from the given input. Variable gets reset after the test. | |
| void | SetConsoleVariableFromInteger
(
const FString& Name, |
Sets the CVar from the given input. Variable gets reset after the test. | |
| void | SetTimeLimit
(
float NewTimeLimit, |
||
| void | |||
| void | StartTest () |
Called once the IsReady() check for the test returns true. | |
| bool |
Overridden from AActor
| Type | Name | Description | |
|---|---|---|---|
| bool | Returns true if this actor allows changing the spatially loaded flag. | ||
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Overridable function called whenever this actor is being removed from a level | |
| bool | IsDataLayerTypeSupported
(
TSubclassOf< UDataLayerInstance > DataLayerType |
DataLayers functions. | |
| void | OnConstruction
(
const FTransform& Transform |
Called when an instance of this class is placed (in editor) or spawned. | |
| void | Tick
(
float DeltaSeconds |
Function called every frame on this Actor. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |