AFunctionalTest

Unreal Engine C++ API Reference > Developer > FunctionalTesting

Inheritance Hierarchy

References

   
Module FunctionalTesting
Header /Engine/Source/Developer/FunctionalTesting/Classes/FunctionalTest.h
Include #include "FunctionalTest.h"

Syntax

class AFunctionalTest : public [AActor](API\Runtime\Engine\GameFramework\AActor)  

Variables

Type Name Description
FString Author The owner is the group or person responsible for the test.
TArray< TObject... 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  
EFunctionalTest... LogErrorHandling Determines how LogErrors are handled during this test.
EFunctionalTest... LogWarningHandling Determines how LogWarnings are handled during this test.
TObjectPtr< AAc... ObservationPoint Allows you to specify another actor to view the test from.
FFunctionalTest... OnTestFinished Called when the test is finished. Use it to clean up
FFunctionalTest... OnTestPrepare Called when the test is ready to prepare
FFunctionalTest... 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< cla... RenderComp  
TArray< FName > RerunCauses List of causes we need a re-run.
EFunctionalTest... Result  
uint32 RunFrame  
float RunTime  
uint32 StartFrame  
float StartTime  
TArray< FString... Steps  
FFunctionalTest... TestFinishedObserver  
FString TestLabel  
TObjectPtr< cla... TestName  
float TimeLimit Test's time limit. '0' means no limit
FText TimesUpMessage  
EFunctionalTest... 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& ObjectIn... )  

Functions

Type Name Description
void AddError ( const FString& Message )  
void AddInfo ( const FString& Message )  
void AddRerun ( FName Reason ) Causes the test to be rerun for a specific named reason.
void AddWarning ( const FString& Message )  
bool AssertEqual_Bool ( bool Actual, bool Expected, const FString& What, const UObject* ContextObject ) Assert that two bools are equal
bool AssertEqual_Box2D ( FBox2D Actual, FBox2D Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two two-component boxes are (memberwise) equal within a small tolerance.
bool AssertEqual_Double ( double Actual, double Expected, const FString& What, double Tolerance, const UObject* ContextObject ) Assert that two double are equal within tolerance between two doubles.
bool AssertEqual_Float ( float Actual, float Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two floats are equal within tolerance between two floats.
bool AssertEqual_Int ( int Actual, int Expected, const FString& What, const UObject* ContextObject ) Assert that two ints are equal
bool AssertEqual_Matrix ( FMatrix Actual, FMatrix Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two 4x4 matrices are (memberwise) equal within a small tolerance.
bool AssertEqual_Name ( FName Actual, FName Expected, const FString& What, const UObject* ContextObject ) Assert that two FNames are equal
bool AssertEqual_Object ( UObject* Actual, UObject* Expected, const FString& What, const UObject* ContextObject ) Assert that two Objects are equal
bool AssertEqual_Plane ( FPlane Actual, FPlane Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two planes are (memberwise) equal within a small tolerance.
bool AssertEqual_Quat ( FQuat Actual, FQuat Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two quats are (memberwise) equal within a small tolerance.
bool AssertEqual_Rotator ( FRotator Actual, FRotator Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that the component angles of two rotators are all equal within a small tolerance.
bool AssertEqual_String ( FString Actual, FString Expected, const FString& What, const UObject* ContextObject ) Assert that two Strings are equal.
bool AssertEqual_TraceQueryResults ( const UTraceQueryTestResults* ..., const UTraceQueryTestResults* ..., const FString& What, const UObject* ContextObject ) Assert that two TraceQueryResults are equal.
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.
bool AssertEqual_Vector ( FVector Actual, FVector Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two vectors are (memberwise) equal within a small tolerance.
bool AssertEqual_Vector2D ( FVector2D Actual, FVector2D Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two two-component vectors are (memberwise) equal within a small tolerance.
bool AssertEqual_Vector4 ( FVector4 Actual, FVector4 Expected, const FString& What, float Tolerance, const UObject* ContextObject ) Assert that two four-component vectors are (memberwise) equal within a small tolerance.
bool AssertFalse ( bool Condition, const FString& Message, const UObject* ContextObject ) Assert that a boolean value is false.
bool AssertIsValid ( UObject* Object, const FString& Message, const UObject* ContextObject ) Assert that a UObject is valid
bool AssertNotEqual_Box2D ( FBox2D Actual, FBox2D NotExpected, const FString& What, const UObject* ContextObject ) Assert that two two-component boxes are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Matrix ( FMatrix Actual, FMatrix NotExpected, const FString& What, const UObject* ContextObject ) Assert that two 4x4 matrices are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Plane ( FPlane Actual, FPlane NotExpected, const FString& What, const UObject* ContextObject ) Assert that two planes are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Quat ( FQuat Actual, FQuat NotExpected, const FString& What, const UObject* ContextObject ) Assert that two quats are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Rotator ( FRotator Actual, FRotator NotExpected, const FString& What, const UObject* ContextObject ) Assert that the component angles of two rotators are all not equal within a small tolerance.
bool AssertNotEqual_String ( FString Actual, FString NotExpected, const FString& What, const UObject* ContextObject ) Assert that two Strings are not equal.
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.
bool AssertNotEqual_Vector ( FVector Actual, FVector NotExpected, const FString& What, const UObject* ContextObject ) Assert that two vectors are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Vector2D ( FVector2D Actual, FVector2D NotExpected, const FString& What, const UObject* ContextObject ) Assert that two two-component vectors are (memberwise) not equal within a small tolerance.
bool AssertNotEqual_Vector4 ( FVector4 Actual, FVector4 NotExpected, const FString& What, const UObject* ContextObject ) Assert that two four-component vectors are (memberwise) not equal within a small tolerance.
bool AssertTrue ( bool Condition, const FString& Message, const UObject* ContextObject ) Assert that a boolean value is true.
bool AssertValue_DateTime ( FDateTime Actual, EComparisonMethod ShouldBe, FDateTime Expected, const FString& What, const UObject* ContextObject ) Assert on a relationship between two DateTimes.
bool AssertValue_Double ( double Actual, EComparisonMethod ShouldBe, double Expected, const FString& What, const UObject* ContextObject ) Assert on a relationship between two doubles.
bool AssertValue_Float ( float Actual, EComparisonMethod ShouldBe, float Expected, const FString& What, const UObject* ContextObject ) Assert on a relationship between two floats.
bool AssertValue_Int ( int32 Actual, EComparisonMethod ShouldBe, int32 Expected, const FString& What, const UObject* ContextObject ) 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< 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
void FinishStep ()  
void FinishTest ( EFunctionalTestResult TestResult, const FString& Message )  
void GatherRelevantActors ( TArray< AActor* >& OutActors )  
FString GetAdditionalTestFinishedMessage ( EFunctionalTestResult TestResult )  
FName GetCurrentRerunReason () Returns the current re-run reason if we're in a named re-run.
FString GetCurrentStepName ()  
FString GetReproString ()  
UBillboardCo... GetSpriteComponent () Returns SpriteComponent subobject
void GoToObservationPoint () 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 IsReady_Implementation ()  
bool IsRunning ()  
void LogMessage ( const FString& Message )  
void LogStep ( ELogVerbosity::Type Verbosity, const FString& Message ) Protected:
FString OnAdditionalTestFinishedMessageRequest ( EFunctionalTestResult TestResult )  
void OnSelectObject ( UObject* NewSelection )  
void OnTimeout ()  
bool OnWantsReRunCheck () 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 ReceivePrepareTest () Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called.
void ReceiveStartTest () 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 RunTest ( const TArray< FString >& Params )  
void SetConsoleVariable ( const FString& Name, const FString& InValue ) Sets the CVar from the given input. Variable gets reset after the test.
void SetConsoleVariableFromBoolean ( const FString& Name, const bool InValue ) Sets the CVar from the given input. Variable gets reset after the test.
void SetConsoleVariableFromFloat ( const FString& Name, const float InValue ) Sets the CVar from the given input. Variable gets reset after the test.
void SetConsoleVariableFromInteger ( const FString& Name, const int32 InValue ) Sets the CVar from the given input. Variable gets reset after the test.
void SetTimeLimit ( float NewTimeLimit, EFunctionalTestResult ResultWhenTim... )  
void StartStep ( const FString& StepName )  
void StartTest () Called once the IsReady() check for the test returns true.
bool WantsToRunAgain ()  

Overridden from AActor

Type Name Description
bool CanChangeIsSpatiallyLoadedFlag () Returns true if this actor allows changing the spatially loaded flag.
void EndPlay ( const EEndPlayReason::Type EndPlayR... ) Overridable function called whenever this actor is being removed from a level
bool IsDataLayerTypeSupported ( TSubclassOf< UDataLayerInstance > D... ) 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 >& OutTa... ) 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& PropertyCha... ) Called when a property on this object has been modified externally

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library