AFunctionalTest

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

FunctionalTesting

Header

/Engine/Source/Developer/FunctionalTesting/Classes/FunctionalTest.h

Include

#include "FunctionalTest.h"

Syntax

class AFunctionalTest : public AActor

Variables

Name Description

Protected variable

FString

 

Author

The author is the group or person responsible for the test.

Public variable

TArray< TObject...

 

AutoDestroyActors

Protected variable

uint32: 1

 

bIsEnabled

Allows a test to be disabled.

Public variable

bool

 

bIsRunning

AG TEMP - solving a compile issue in a temp way to unblock the bui.d.

Public variable

FName

 

CurrentRerunCause

Cause of the current rerun if we're in a named rerun.

Protected variable

FString

 

Description

A description of the test, like what is this test trying to determine.

Public variable

FString

 

FailureMessage

Protected variable

EFunctionalTest...

 

LogErrorHandling

Determines how LogErrors are handled during this test.

Protected variable

EFunctionalTest...

 

LogWarningHandling

Determines how LogWarnings are handled during this test.

Protected variable

TObjectPtr< AAc...

 

ObservationPoint

Allows you to specify another actor to view the test from.

Public variable

FFunctionalTest...

 

OnTestFinished

Called when the test is finished. Use it to clean up

Public variable

FFunctionalTest...

 

OnTestPrepare

Called when the test is ready to prepare

Public variable

FFunctionalTest...

 

OnTestStart

Called when the test is started

Public variable

float

 

PreparationTimeLimit

The Test's time limit for preparation, this is the time it has to return true when checking IsReady().

Protected variable

FRandomStream

 

RandomNumbersStream

A random number stream that you can use during testing.

Public variable

TObjectPtr< cla...

 

RenderComp

Public variable

TArray< FName >

 

RerunCauses

List of causes we need a re-run.

Public variable

EFunctionalTest...

 

Result

Public variable

uint32

 

RunFrame

Public variable

float

 

RunTime

Public variable

uint32

 

StartFrame

Public variable

float

 

StartTime

Public variable

TArray< FString...

 

Steps

Public variable

FFunctionalTest...

 

TestFinishedObserver

Public variable

FString

 

TestLabel

Public variable

TObjectPtr< cla...

 

TestName

Public variable

float

 

TimeLimit

Test's time limit. '0' means no limit

Public variable

FText

 

TimesUpMessage

Public variable

EFunctionalTest...

 

TimesUpResult

If test is limited by time this is the result that will be returned when time runs out

Public variable

float

 

TotalTime

Constructors

Name Description

Public function

AFunctionalTest

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Virtual

void

 

AddError

(
    const FString& Message
)

Public function

void

 

AddRerun

(
    FName Reason
)

Causes the test to be rerun for a specific named reason.

Public function

void

 

AddWarning

(
    const FString& Message
)

Public function Virtual

bool

 

AssertEqual_Bool

(
    const bool Actual,
    const bool Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two bools are equal

Public function

bool

 

AssertEqual_Double

(
    const double Actual,
    const double Expected,
    const FString& What,
    const double Tolerance,
    const UObject* ContextObject
)

Assert that two double are equal within tolerance between two doubles.

Public function Virtual

bool

 

AssertEqual_Float

(
    const float Actual,
    const float Expected,
    const FString& What,
    const float Tolerance,
    const UObject* ContextObject
)

Assert that two floats are equal within tolerance between two floats.

Public function Virtual

bool

 

AssertEqual_Int

(
    const int Actual,
    const int Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two ints are equal

Public function Virtual

bool

 

AssertEqual_Name

(
    const FName Actual,
    const FName Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two FNames are equal

Public function Virtual

bool

 

AssertEqual_Object

(
    UObject* Actual,
    UObject* Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two Objects are equal

Public function Virtual

bool

 

AssertEqual_Rotator

(
    const FRotator Actual,
    const FRotator Expected,
    const FString& What,
    const float Tolerance,
    const UObject* ContextObject
)

Assert that the component angles of two rotators are all equal within a small tolerance.

Public function Virtual

bool

 

AssertEqual_String

(
    const FString Actual,
    const FString Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two Strings are equal.

Public function Virtual

bool

 

AssertEqual_TraceQueryResults

(
    const UTraceQueryTestResults* ...,
    const UTraceQueryTestResults* ...,
    const FString& What,
    const UObject* ContextObject
)

Assert that two TraceQueryResults are equal.

Public function Virtual

bool

 

AssertEqual_Transform

(
    const FTransform& Actual,
    const FTransform& Expected,
    const FString& What,
    float Tolerance,
    const UObject* ContextObject
)

Assert that two transforms are (components memberwise - translation, rotation, scale) equal within a small tolerance.

Public function Virtual

bool

 

AssertEqual_Vector

(
    const FVector Actual,
    const FVector Expected,
    const FString& What,
    const float Tolerance,
    const UObject* ContextObject
)

Assert that two vectors are (memberwise) equal within a small tolerance.

Public function Virtual

bool

 

AssertFalse

(
    bool Condition,
    const FString& Message,
    const UObject* ContextObject
)

Assert that a boolean value is false.

Public function Virtual

bool

 

AssertIsValid

(
    UObject* Object,
    const FString& Message,
    const UObject* ContextObject
)

Assert that a UObject is valid

Public function Virtual

bool

 

AssertNotEqual_Rotator

(
    const FRotator Actual,
    const FRotator NotExpected,
    const FString& What,
    const UObject* ContextObject
)

Assert that the component angles of two rotators are all not equal within a small tolerance.

Public function Virtual

bool

 

AssertNotEqual_String

(
    const FString Actual,
    const FString NotExpected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two Strings are not equal.

Public function Virtual

bool

 

AssertNotEqual_Transform

(
    const FTransform& Actual,
    const FTransform& NotExpected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two transforms are (components memberwise - translation, rotation, scale) not equal within a small tolerance.

Public function Virtual

bool

 

AssertNotEqual_Vector

(
    const FVector Actual,
    const FVector NotExpected,
    const FString& What,
    const UObject* ContextObject
)

Assert that two vectors are (memberwise) not equal within a small tolerance.

Public function Virtual

bool

 

AssertTrue

(
    bool Condition,
    const FString& Message,
    const UObject* ContextObject
)

Assert that a boolean value is true.

Public function Virtual

bool

 

AssertValue_DateTime

(
    FDateTime Actual,
    EComparisonMethod ShouldBe,
    FDateTime Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert on a relationship between two DateTimes.

Public function

bool

 

AssertValue_Double

(
    double Actual,
    EComparisonMethod ShouldBe,
    double Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert on a relationship between two doubles.

Public function Virtual

bool

 

AssertValue_Float

(
    float Actual,
    EComparisonMethod ShouldBe,
    float Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert on a relationship between two floats.

Public function Virtual

bool

 

AssertValue_Int

(
    int32 Actual,
    EComparisonMethod ShouldBe,
    int32 Expected,
    const FString& What,
    const UObject* ContextObject
)

Assert on a relationship between two integers.

Public function Virtual

void

 

CleanUp()

Called to clean up when tests is removed from the list of active tests after finishing execution.

Public function Const

TArray< AAct...

 

DebugGatherRelevantActors()

Used by debug drawing to gather actors this test is using and point at them on the level to better understand test's setup

Public function

void

 

FinishStep()

Public function Virtual

void

 

FinishTest

(
    EFunctionalTestResult TestResult,
    const FString& Message
)

Public function Virtual Const

void

 

GatherRelevantActors

(
    TArray< AActor* >& OutActors
)

Public function Virtual Const

FString

 

GetAdditionalTestFinishedMessage

(
    EFunctionalTestResult TestResult
)

Public function Const

FName

 

GetCurrentRerunReason()

Returns the current re-run reason if we're in a named re-run.

Public function Const

FString

 

GetCurrentStepName()

Public function Virtual Const

FString

 

GetReproString()

Public function

UBillboardCo...

 

GetSpriteComponent()

Returns SpriteComponent subobject

Protected function

void

 

GoToObservationPoint()

Goto an observation location.

Public function Const

bool

 

IsEnabled()

Public function Const

bool

 

IsInStep()

Protected function

bool

 

IsReady()

IsReady() is called once per frame after a test is run, until it returns true.

Protected function Virtual

bool

 

IsReady_Implementation()

Public function Const

bool

 

IsRunning()

Public function Virtual

void

 

LogMessage

(
    const FString& Message
)

Public function

void

 

LogStep

(
    ELogVerbosity::Type Verbosity,
    const FString& Message
)

Protected:

Public function Const

FString

 

OnAdditionalTestFinishedMessageRequest

(
    EFunctionalTestResult TestResult
)

Public function Static

void

 

OnSelectObject

(
    UObject* NewSelection
)

Protected function Virtual

void

 

OnTimeout()

Public function Const

bool

 

OnWantsReRunCheck()

Retrieves information whether test wants to have another run just after finishing

Protected function Virtual

void

 

PrepareTest()

Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called.

Protected function

void

 

ReceivePrepareTest()

Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called.

Protected function

void

 

ReceiveStartTest()

Called once the IsReady() check for the test returns true.

Public function Virtual

void

 

RegisterAutoDestroyActor

(
    AActor* ActorToAutoDestroy
)

ACtors registered this way will be automatically destroyed (by limiting their lifespan) on test finish

Public function Virtual

bool

 

RunTest

(
    const TArray< FString >& Params
)

Public function Virtual

void

 

SetTimeLimit

(
    float NewTimeLimit,
    EFunctionalTestResult ResultWhenTim...
)

Public function

void

 

StartStep

(
    const FString& StepName
)

Protected function Virtual

void

 

StartTest()

Called once the IsReady() check for the test returns true.

Public function Virtual Const

bool

 

WantsToRunAgain()

Overridden from AActor

Name Description

Public function Virtual

void

 

EndPlay

(
    const EEndPlayReason::Type EndPlayR...
)

Overridable function called whenever this actor is being removed from a level

Public function Virtual

void

 

OnConstruction

(
    const FTransform& Transform
)

Called when an instance of this class is placed (in editor) or spawned.

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Function called every frame on this Actor.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally