2019-12-26 15:32:37 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2014-03-14 14:13:41 -04:00
# pragma once
2016-11-23 15:48:37 -05:00
# include "CoreMinimal.h"
# include "UObject/ObjectMacros.h"
# include "UObject/UObjectGlobals.h"
# include "UObject/Object.h"
2014-11-11 10:35:51 -05:00
# include "Math/RandomStream.h"
2022-05-17 15:47:34 -04:00
# include "Stats/Stats2.h"
2016-11-23 15:48:37 -05:00
# include "GameFramework/Actor.h"
# include "ProfilingDebugging/ExternalProfiler.h"
2017-09-30 03:42:01 -04:00
# include "Math/StatisticalFloat.h"
2014-03-14 14:13:41 -04:00
# include "FunctionalTest.generated.h"
2016-11-23 15:48:37 -05:00
class Error ;
2014-06-25 05:47:19 -04:00
class UBillboardComponent ;
2017-05-19 15:08:55 -04:00
class UTraceQueryTestResults ;
2017-07-19 09:49:59 -04:00
class UWorld ;
2014-06-25 05:47:19 -04:00
2022-05-17 15:47:34 -04:00
DECLARE_STATS_GROUP ( TEXT ( " FunctionalTest " ) , STATGROUP_FunctionalTest , STATCAT_Advanced ) ;
2018-05-23 21:04:31 -04:00
# if UE_EXTERNAL_PROFILING_ENABLED
2015-10-30 17:41:13 -04:00
//Experimental effort at automated cpu captures from the functional testing.
class FFunctionalTestExternalProfiler : public FScopedExternalProfilerBase
{
public :
void StartProfiler ( const bool bWantPause ) { StartScopedTimer ( bWantPause ) ; }
void StopProfiler ( ) { StopScopedTimer ( ) ; }
} ;
2018-05-23 21:04:31 -04:00
# endif // UE_EXTERNAL_PROFILING_ENABLED
2015-10-30 17:41:13 -04:00
struct FStatsData
2015-10-28 08:58:16 -04:00
{
2015-10-30 17:41:13 -04:00
FStatsData ( ) : NumFrames ( 0 ) , SumTimeSeconds ( 0.0f ) { }
2015-10-28 08:58:16 -04:00
uint32 NumFrames ;
2022-09-23 20:23:56 -04:00
float SumTimeSeconds ;
2015-10-28 08:58:16 -04:00
FStatisticalFloat FrameTimeTracker ;
FStatisticalFloat GameThreadTimeTracker ;
FStatisticalFloat RenderThreadTimeTracker ;
FStatisticalFloat GPUTimeTracker ;
} ;
2015-10-30 17:41:13 -04:00
/** A set of simple perf stats recorded over a period of frames. */
struct FUNCTIONALTESTING_API FPerfStatsRecord
{
FPerfStatsRecord ( FString InName ) ;
FString Name ;
/** Stats data for the period we're interested in timing. */
FStatsData Record ;
/** Stats data for the baseline. */
FStatsData Baseline ;
2015-11-12 12:38:50 -05:00
float GPUBudget ;
float RenderThreadBudget ;
float GameThreadBudget ;
2015-10-30 17:41:13 -04:00
2015-11-12 12:38:50 -05:00
void SetBudgets ( float InGPUBudget , float InRenderThreadBudget , float InGameThreadBudget ) ;
2015-10-30 17:41:13 -04:00
void Sample ( UWorld * Owner , float DeltaSeconds , bool bBaseline ) ;
FString GetReportString ( ) const ;
FString GetBaselineString ( ) const ;
FString GetRecordString ( ) const ;
2015-11-12 12:38:50 -05:00
FString GetOverBudgetString ( ) const ;
2015-10-30 17:41:13 -04:00
void GetGPUTimes ( double & OutMin , double & OutMax , double & OutAvg ) const ;
void GetGameThreadTimes ( double & OutMin , double & OutMax , double & OutAvg ) const ;
void GetRenderThreadTimes ( double & OutMin , double & OutMax , double & OutAvg ) const ;
2015-11-12 12:38:50 -05:00
bool IsWithinGPUBudget ( ) const ;
bool IsWithinGameThreadBudget ( ) const ;
bool IsWithinRenderThreadBudget ( ) const ;
2015-10-30 17:41:13 -04:00
} ;
2016-08-09 11:28:56 -04:00
UENUM ( BlueprintType )
enum class EComparisonMethod : uint8
{
Equal_To ,
Not_Equal_To ,
Greater_Than_Or_Equal_To ,
Less_Than_Or_Equal_To ,
Greater_Than ,
Less_Than
} ;
2015-10-30 17:41:13 -04:00
/**
* Class for use with functional tests which provides various performance measuring features.
* Recording of basic, unintrusive performance stats.
* Automatic captures using external CPU and GPU profilers.
* Triggering and ending of writing full stats to a file.
*/
2015-10-28 08:58:16 -04:00
UCLASS ( Blueprintable )
2015-10-30 17:41:13 -04:00
class FUNCTIONALTESTING_API UAutomationPerformaceHelper : public UObject
2015-10-28 08:58:16 -04:00
{
GENERATED_BODY ( )
TArray < FPerfStatsRecord > Records ;
2015-10-30 17:41:13 -04:00
bool bRecordingBasicStats ;
bool bRecordingBaselineBasicStats ;
bool bRecordingCPUCapture ;
bool bRecordingStatsFile ;
2016-01-14 08:11:47 -05:00
/** If true we check the GPU times vs GPU budget each tick and trigger a GPU trace if we fall below budget.*/
bool bGPUTraceIfBelowBudget ;
2015-10-28 08:58:16 -04:00
public :
2015-10-30 17:41:13 -04:00
UAutomationPerformaceHelper ( ) ;
2017-07-19 09:49:59 -04:00
// UObject interface
virtual UWorld * GetWorld ( ) const override ;
// End of UObject interface
2015-10-30 17:41:13 -04:00
//Begin basic stat recording
UFUNCTION ( BlueprintCallable , Category = Perf )
void Tick ( float DeltaSeconds ) ;
2015-10-28 08:58:16 -04:00
/** Adds a sample to the stats counters for the current performance stats record. */
UFUNCTION ( BlueprintCallable , Category = Perf )
2015-10-30 17:41:13 -04:00
void Sample ( float DeltaSeconds ) ;
/** Begins recording a new named performance stats record. We start by recording the baseline */
UFUNCTION ( BlueprintCallable , Category = Perf )
void BeginRecordingBaseline ( FString RecordName ) ;
/** Stops recording the baseline and moves to the main record. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void EndRecordingBaseline ( ) ;
/** Begins recording a new named performance stats record. We start by recording the baseline. */
2015-10-28 08:58:16 -04:00
UFUNCTION ( BlueprintCallable , Category = Perf )
2015-11-12 12:38:50 -05:00
void BeginRecording ( FString RecordName , float InGPUBudget , float InRenderThreadBudget , float InGameThreadBudget ) ;
2015-10-28 08:58:16 -04:00
/** Stops recording performance stats. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void EndRecording ( ) ;
/** Writes the current set of performance stats records to a csv file in the profiling directory. An additional directory and an extension override can also be used. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void WriteLogFile ( const FString & CaptureDir , const FString & CaptureExtension ) ;
/** Returns true if this stats tracker is currently recording performance stats. */
UFUNCTION ( BlueprintCallable , Category = Perf )
2016-10-05 13:23:01 -04:00
bool IsRecording ( ) const ;
2015-10-30 17:41:13 -04:00
/** Does any init work across all tests.. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void OnBeginTests ( ) ;
/** Does any final work needed as all tests are complete. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void OnAllTestsComplete ( ) ;
2015-10-28 08:58:16 -04:00
2016-10-05 13:23:01 -04:00
const FPerfStatsRecord * GetCurrentRecord ( ) const ;
2015-11-12 12:38:50 -05:00
FPerfStatsRecord * GetCurrentRecord ( ) ;
2015-10-30 17:41:13 -04:00
UFUNCTION ( BlueprintCallable , Category = Perf )
2016-10-05 13:23:01 -04:00
bool IsCurrentRecordWithinGPUBudget ( ) const ;
2015-10-30 17:41:13 -04:00
UFUNCTION ( BlueprintCallable , Category = Perf )
2016-10-05 13:23:01 -04:00
bool IsCurrentRecordWithinGameThreadBudget ( ) const ;
2015-10-30 17:41:13 -04:00
UFUNCTION ( BlueprintCallable , Category = Perf )
2016-10-05 13:23:01 -04:00
bool IsCurrentRecordWithinRenderThreadBudget ( ) const ;
2015-10-30 17:41:13 -04:00
//End basic stats recording.
// Automatic traces capturing
/** Communicates with external profiler to being a CPU capture. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void StartCPUProfiling ( ) ;
/** Communicates with external profiler to end a CPU capture. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void StopCPUProfiling ( ) ;
2016-01-14 08:11:47 -05:00
/** Will trigger a GPU trace next time the current test falls below GPU budget. */
2015-10-30 17:41:13 -04:00
UFUNCTION ( BlueprintCallable , Category = Perf )
2016-01-14 08:11:47 -05:00
void TriggerGPUTraceIfRecordFallsBelowBudget ( ) ;
2015-10-30 17:41:13 -04:00
/** Begins recording stats to a file. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void BeginStatsFile ( const FString & RecordName ) ;
/** Ends recording stats to a file. */
UFUNCTION ( BlueprintCallable , Category = Perf )
void EndStatsFile ( ) ;
2018-05-23 21:04:31 -04:00
# if UE_EXTERNAL_PROFILING_ENABLED
2015-10-30 17:41:13 -04:00
FFunctionalTestExternalProfiler ExternalProfiler ;
2018-05-23 21:04:31 -04:00
# endif
2015-10-30 17:41:13 -04:00
/** The path and base name for all output files. */
FString OutputFileBase ;
FString StartOfTestingTime ;
2015-10-28 08:58:16 -04:00
} ;
2016-10-05 13:23:01 -04:00
UENUM ( BlueprintType )
2016-08-09 11:28:56 -04:00
enum class EFunctionalTestResult : uint8
2014-03-14 14:13:41 -04:00
{
2016-08-09 11:28:56 -04:00
/**
* When finishing a test if you use Default, you're not explicitly stating if the test passed or failed.
2017-06-19 20:27:30 -04:00
* Instead you're instead allowing any tested assertions to have decided that for you. Even if you do
* explicitly log success, it can be overturned by errors that occurred during the test.
2016-08-09 11:28:56 -04:00
*/
Default ,
Invalid ,
Error ,
Running ,
Failed ,
Succeeded
} ;
2014-03-14 14:13:41 -04:00
2021-09-08 16:42:26 -04:00
/* Return a readable string of the provided EFunctionalTestResult enum */
FString FUNCTIONALTESTING_API LexToString ( const EFunctionalTestResult TestResult ) ;
2019-05-01 21:54:46 -04:00
UENUM ( BlueprintType )
enum class EFunctionalTestLogHandling : uint8
{
/**
* How do log categories affect rest results. ProjectDefault can be set in DefaultEngine.ini
* but individual tests can override that
*/
ProjectDefault ,
OutputIsError ,
OutputIgnored
} ;
2023-05-08 10:57:51 -04:00
class FConsoleVariableBPSetter
{
friend class FAutomationFunctionalTestEnvSetup ;
public :
FConsoleVariableBPSetter ( FString InConsoleVariableName ) ;
void Set ( const FString & Value ) ;
FString Get ( ) ;
void Restore ( ) ;
private :
bool bModified ;
FString ConsoleVariableName ;
FString OriginalValue ;
} ;
class FAutomationFunctionalTestEnvSetup
{
public :
FAutomationFunctionalTestEnvSetup ( ) = default ;
~ FAutomationFunctionalTestEnvSetup ( ) ;
void SetVariable ( const FString & VariableName , const FString & Value ) ;
FString GetVariable ( const FString & VariableName ) ;
/** Restore the old settings. */
void Restore ( ) ;
private :
TArray < FConsoleVariableBPSetter > Variables ;
} ;
2014-03-14 14:13:41 -04:00
DECLARE_DYNAMIC_MULTICAST_DELEGATE ( FFunctionalTestEventSignature ) ;
DECLARE_DELEGATE_OneParam ( FFunctionalTestDoneSignature , class AFunctionalTest * ) ;
2016-08-09 11:28:56 -04:00
UCLASS ( hidecategories = ( Actor , Input , Rendering ) , Blueprintable )
class FUNCTIONALTESTING_API AFunctionalTest : public AActor
2014-03-14 14:13:41 -04:00
{
2016-08-09 11:28:56 -04:00
GENERATED_BODY ( )
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
public :
2016-10-05 13:23:01 -04:00
AFunctionalTest ( const FObjectInitializer & ObjectInitializer = FObjectInitializer : : Get ( ) ) ;
2014-03-14 14:13:41 -04:00
2021-04-28 22:51:13 -04:00
UPROPERTY ( BlueprintReadOnly , Category = " Functional Testing " )
FString TestLabel ;
2022-06-27 10:14:57 -04:00
/**
2023-02-13 11:33:49 -05:00
* The owner is the group or person responsible for the test. Generally you should use a group name
* like 'Editor' or 'Rendering'. When a test fails it may not be obvious who should investigate
2022-06-27 10:14:57 -04:00
* so this provides a associate responsible groups with tests.
*/
2023-02-13 11:33:49 -05:00
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Functional Testing " , meta = ( MultiLine = " true " , DisplayName = " Owner " ) )
2022-06-27 10:14:57 -04:00
FString Author ;
/**
* A description of the test, like what is this test trying to determine.
*/
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Functional Testing " , meta = ( MultiLine = " true " ) )
FString Description ;
2017-06-15 12:43:54 -04:00
private :
2014-03-14 14:13:41 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UBillboardComponent > SpriteComponent ;
2016-08-09 11:28:56 -04:00
protected :
2017-04-03 13:59:25 -04:00
/**
* Allows a test to be disabled. If a test is disabled, it will not appear in the set of
* runnable tests (after saving the map).
*/
2018-05-09 10:24:50 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Functional Testing " , meta = ( ScriptName = " IsEnabledValue " ) )
2016-08-09 11:28:56 -04:00
uint32 bIsEnabled : 1 ;
2017-04-03 13:59:25 -04:00
/**
2019-05-01 21:54:46 -04:00
* Determines how LogErrors are handled during this test.
2017-04-03 13:59:25 -04:00
*/
2019-05-01 21:54:46 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Functional Testing " , meta = ( ScriptName = " LogErrorHandling " ) )
EFunctionalTestLogHandling LogErrorHandling ;
/**
* Determines how LogWarnings are handled during this test.
*/
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Functional Testing " , meta = ( ScriptName = " LogWarningHandling " ) )
EFunctionalTestLogHandling LogWarningHandling ;
2016-10-05 13:23:01 -04:00
2017-04-03 13:59:25 -04:00
/**
* Allows you to specify another actor to view the test from. Usually this is a camera you place
* in the map to observe the test. Not useful when running on a build farm, but provides a handy
* way to observe the test from a different location than you place the functional test actor.
*/
2016-08-09 11:28:56 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadWrite , Category = " Functional Testing " )
2021-01-27 17:40:25 -04:00
TObjectPtr < AActor > ObservationPoint ;
2016-08-09 11:28:56 -04:00
2017-04-03 13:59:25 -04:00
/**
* A random number stream that you can use during testing. This number stream will be consistent
* every time the test is run.
*/
2016-08-09 11:28:56 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadWrite , Category = " Functional Testing " , AdvancedDisplay )
FRandomStream RandomNumbersStream ;
2014-10-16 09:02:30 -04:00
public :
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
UPROPERTY ( BlueprintReadWrite , Category = " Functional Testing " )
EFunctionalTestResult Result ;
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
/** The Test's time limit for preparation, this is the time it has to return true when checking IsReady(). '0' means no limit. */
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Timeout " )
float PreparationTimeLimit ;
2014-03-14 14:13:41 -04:00
/** Test's time limit. '0' means no limit */
2016-08-09 11:28:56 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadOnly , Category = " Timeout " )
2014-03-14 14:13:41 -04:00
float TimeLimit ;
2016-08-09 11:28:56 -04:00
UPROPERTY ( EditAnywhere , BlueprintReadWrite , Category = " Timeout " , meta = ( MultiLine = " true " ) )
2014-03-14 14:13:41 -04:00
FText TimesUpMessage ;
2016-08-09 11:28:56 -04:00
/** If test is limited by time this is the result that will be returned when time runs out */
UPROPERTY ( EditAnywhere , Category = " Timeout " )
EFunctionalTestResult TimesUpResult ;
2016-10-19 15:01:48 -04:00
public :
//UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Rendering")
//FQualityLevels
2016-08-09 11:28:56 -04:00
public :
2014-06-09 11:13:04 -04:00
2017-06-27 10:18:29 -04:00
/** Called when the test is ready to prepare */
UPROPERTY ( BlueprintAssignable )
FFunctionalTestEventSignature OnTestPrepare ;
2014-03-14 14:13:41 -04:00
/** Called when the test is started */
UPROPERTY ( BlueprintAssignable )
FFunctionalTestEventSignature OnTestStart ;
/** Called when the test is finished. Use it to clean up */
UPROPERTY ( BlueprintAssignable )
FFunctionalTestEventSignature OnTestFinished ;
UPROPERTY ( Transient )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < AActor > > AutoDestroyActors ;
2014-06-09 11:13:04 -04:00
2014-04-23 19:29:53 -04:00
FString FailureMessage ;
2014-03-14 14:13:41 -04:00
# if WITH_EDITORONLY_DATA
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < class UFuncTestRenderingComponent > RenderComp ;
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < class UTextRenderComponent > TestName ;
2016-08-09 11:28:56 -04:00
# endif // WITH_EDITORONLY_DATA
2014-04-23 19:29:53 -04:00
2015-10-30 17:41:13 -04:00
/** List of causes we need a re-run. */
TArray < FName > RerunCauses ;
2016-08-09 11:28:56 -04:00
2015-10-30 17:41:13 -04:00
/** Cause of the current rerun if we're in a named rerun. */
FName CurrentRerunCause ;
2014-04-23 19:29:53 -04:00
public :
2016-08-09 11:28:56 -04:00
/**
* Assert that a boolean value is true.
* @param Message The message to display if the assert fails ("Assertion Failed: 'Message' for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertTrue ( bool Condition , const FString & Message , const UObject * ContextObject = nullptr ) ;
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
/**
* Assert that a boolean value is false.
* @param Message The message to display if the assert fails ("Assertion Failed: 'Message' for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertFalse ( bool Condition , const FString & Message , const UObject * ContextObject = nullptr ) ;
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
/**
* Assert that a UObject is valid
* @param Message The message to display if the object is invalid ("Invalid object: 'Message' for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertIsValid ( UObject * Object , const FString & Message , const UObject * ContextObject = nullptr ) ;
2014-03-14 14:13:41 -04:00
2016-08-09 11:28:56 -04:00
/**
* Assert on a relationship between two integers.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be <ShouldBe> {Expected} for context '')
*/
2018-03-27 14:27:07 -04:00
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Value (Integer) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertValue_Int ( int32 Actual , EComparisonMethod ShouldBe , int32 Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert on a relationship between two floats.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be <ShouldBe> {Expected} for context '')
*/
2018-03-27 14:27:07 -04:00
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Value (Float) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertValue_Float ( float Actual , EComparisonMethod ShouldBe , float Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
2020-06-15 16:46:00 -04:00
/**
* Assert on a relationship between two doubles.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be <ShouldBe> {Expected} for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Value (Double) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
bool AssertValue_Double ( double Actual , EComparisonMethod ShouldBe , double Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert on a relationship between two DateTimes.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be <ShouldBe> {Expected} for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Value (DateTime) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertValue_DateTime ( FDateTime Actual , EComparisonMethod ShouldBe , FDateTime Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two transforms are (components memberwise - translation, rotation, scale) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Transform) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Transform ( const FTransform & Actual , const FTransform & Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two floats are equal within tolerance between two floats.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} within Tolerance for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Float) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Float ( float Actual , float Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
2020-06-15 16:46:00 -04:00
/**
* Assert that two double are equal within tolerance between two doubles.
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} within Tolerance for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Double) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
bool AssertEqual_Double ( double Actual , double Expected , const FString & What , double Tolerance = 1.e-4 , const UObject * ContextObject = nullptr ) ;
2020-06-15 16:46:00 -04:00
2017-05-12 11:21:11 -04:00
/**
2017-05-19 15:08:55 -04:00
* Assert that two bools are equal
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Bool) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Bool ( bool Actual , bool Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2017-05-19 15:08:55 -04:00
/**
* Assert that two ints are equal
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} for context '')
2017-05-12 11:21:11 -04:00
*/
2018-03-27 14:27:07 -04:00
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Integer) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Int ( int Actual , int Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2017-05-19 15:08:55 -04:00
/**
* Assert that two FNames are equal
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (FName) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Name ( FName Actual , FName Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2017-05-12 11:21:11 -04:00
2020-08-11 01:36:57 -04:00
/**
* Assert that two Objects are equal
* @param What A name to use in the message if the assert fails (What: expected {Actual} to be Equal To {Expected} for context '')
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Object) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertEqual_Object ( UObject * Actual , UObject * Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2020-08-11 01:36:57 -04:00
2016-08-09 11:28:56 -04:00
/**
* Assert that two transforms are (components memberwise - translation, rotation, scale) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Transform) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertNotEqual_Transform ( const FTransform & Actual , const FTransform & NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that the component angles of two rotators are all equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Rotator) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Rotator ( FRotator Actual , FRotator Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that the component angles of two rotators are all not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Rotator) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertNotEqual_Rotator ( FRotator Actual , FRotator NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two vectors are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Vector) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_Vector ( FVector Actual , FVector Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two vectors are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Vector) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertNotEqual_Vector ( FVector Actual , FVector NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two two-component vectors are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Vector2D) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Vector2D ( FVector2D Actual , FVector2D Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two two-component vectors are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Vector2D) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Vector2D ( FVector2D Actual , FVector2D NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two two-component boxes are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Box2D) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Box2D ( FBox2D Actual , FBox2D Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two two-component boxes are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Box2D) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Box2D ( FBox2D Actual , FBox2D NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two four-component vectors are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Vector4) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Vector4 ( FVector4 Actual , FVector4 Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two four-component vectors are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Vector4) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Vector4 ( FVector4 Actual , FVector4 NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two planes are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Plane) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Plane ( FPlane Actual , FPlane Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two planes are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Plane) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Plane ( FPlane Actual , FPlane NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two quats are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Quat) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Quat ( FQuat Actual , FQuat Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two quats are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Quat) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Quat ( FQuat Actual , FQuat NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two 4x4 matrices are (memberwise) equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (Matrix) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertEqual_Matrix ( FMatrix Actual , FMatrix Expected , const FString & What , float Tolerance = 1.e-4 f , const UObject * ContextObject = nullptr ) ;
/**
* Assert that two 4x4 matrices are (memberwise) not equal within a small tolerance.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (Matrix) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
virtual bool AssertNotEqual_Matrix ( FMatrix Actual , FMatrix NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two Strings are equal.
* @param What A name to use in the message if the assert fails ("Expected 'What' to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (String) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertEqual_String ( FString Actual , FString Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
/**
* Assert that two Strings are not equal.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Not Equal (String) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2022-07-01 13:50:07 -04:00
virtual bool AssertNotEqual_String ( FString Actual , FString NotExpected , const FString & What , const UObject * ContextObject = nullptr ) ;
2017-05-19 15:08:55 -04:00
/**
* Assert that two TraceQueryResults are equal.
* @param What A name to use in the message if the assert fails ("Expected 'What' not to be {Expected} but it was {Actual} for context ''")
*/
UFUNCTION ( BlueprintCallable , Category = " Asserts " , DisplayName = " Assert Equal (TraceQuery) " , meta = ( HidePin = " ContextObject " , DefaultToSelf = " ContextObject " ) )
2020-09-24 00:43:27 -04:00
virtual bool AssertEqual_TraceQueryResults ( const UTraceQueryTestResults * Actual , const UTraceQueryTestResults * Expected , const FString & What , const UObject * ContextObject = nullptr ) ;
2016-08-09 11:28:56 -04:00
2016-10-05 13:23:01 -04:00
UFUNCTION ( BlueprintCallable , Category = " Reporting " )
2020-08-11 01:36:57 -04:00
void AddWarning ( const FString & Message ) ;
2016-10-05 13:23:01 -04:00
UFUNCTION ( BlueprintCallable , Category = " Reporting " )
2020-09-24 00:43:27 -04:00
virtual void AddError ( const FString & Message ) ;
2016-10-05 13:23:01 -04:00
2023-02-13 11:33:49 -05:00
UFUNCTION ( BlueprintCallable , Category = " Reporting " )
virtual void AddInfo ( const FString & Message ) ;
2017-05-19 15:08:55 -04:00
//protected:
/** TODO: break this out into a library */
2016-10-05 13:23:01 -04:00
void LogStep ( ELogVerbosity : : Type Verbosity , const FString & Message ) ;
2016-08-09 11:28:56 -04:00
public :
virtual bool RunTest ( const TArray < FString > & Params = TArray < FString > ( ) ) ;
public :
2016-10-05 13:23:01 -04:00
FString GetCurrentStepName ( ) const ;
void StartStep ( const FString & StepName ) ;
void FinishStep ( ) ;
bool IsInStep ( ) const ;
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
virtual void FinishTest ( EFunctionalTestResult TestResult , const FString & Message ) ;
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
2014-03-14 14:13:41 -04:00
virtual void LogMessage ( const FString & Message ) ;
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
virtual void SetTimeLimit ( float NewTimeLimit , EFunctionalTestResult ResultWhenTimeRunsOut ) ;
public :
2014-03-14 14:13:41 -04:00
2015-03-11 11:02:39 -04:00
/** Used by debug drawing to gather actors this test is using and point at them on the level to better understand test's setup */
2021-08-16 18:13:46 -04:00
UFUNCTION ( BlueprintImplementableEvent , CallInEditor , Category = " Functional Testing " )
2015-03-18 17:50:49 -04:00
TArray < AActor * > DebugGatherRelevantActors ( ) const ;
2015-03-11 11:02:39 -04:00
virtual void GatherRelevantActors ( TArray < AActor * > & OutActors ) const ;
2014-04-23 19:29:53 -04:00
/** retrieves information whether test wants to have another run just after finishing */
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintImplementableEvent , Category = " Functional Testing " )
2015-03-18 12:16:37 -04:00
bool OnWantsReRunCheck ( ) const ;
virtual bool WantsToRunAgain ( ) const { return false ; }
2014-04-23 19:29:53 -04:00
2015-10-30 17:41:13 -04:00
/** Causes the test to be rerun for a specific named reason. */
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
2015-10-30 17:41:13 -04:00
void AddRerun ( FName Reason ) ;
/** Returns the current re-run reason if we're in a named re-run. */
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
FName GetCurrentRerunReason ( ) const ;
2015-10-30 17:41:13 -04:00
2023-05-08 10:57:51 -04:00
/** Sets the CVar from the given input. Variable gets reset after the test. */
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
void SetConsoleVariable ( const FString & Name , const FString & InValue ) ;
/** Sets the CVar from the given input. Variable gets reset after the test. */
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
void SetConsoleVariableFromInteger ( const FString & Name , const int32 InValue ) ;
/** Sets the CVar from the given input. Variable gets reset after the test. */
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
void SetConsoleVariableFromFloat ( const FString & Name , const float InValue ) ;
/** Sets the CVar from the given input. Variable gets reset after the test. */
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
void SetConsoleVariableFromBoolean ( const FString & Name , const bool InValue ) ;
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintImplementableEvent , Category = " Functional Testing " )
FString OnAdditionalTestFinishedMessageRequest ( EFunctionalTestResult TestResult ) const ;
2015-03-18 12:16:37 -04:00
2016-08-09 11:28:56 -04:00
virtual FString GetAdditionalTestFinishedMessage ( EFunctionalTestResult TestResult ) const { return FString ( ) ; }
public :
2014-04-23 19:29:53 -04:00
2022-05-26 08:42:23 -04:00
/** Actors registered this way will be automatically destroyed (by limiting their lifespan)
2014-03-14 14:13:41 -04:00
* on test finish */
UFUNCTION ( BlueprintCallable , Category = " Development " , meta = ( Keywords = " Delete " ) )
virtual void RegisterAutoDestroyActor ( AActor * ActorToAutoDestroy ) ;
2014-04-23 19:29:53 -04:00
/** Called to clean up when tests is removed from the list of active tests after finishing execution.
* Note that FinishTest gets called after every "cycle" of a test (where further cycles are enabled by
* WantsToRunAgain calls). CleanUp gets called when all cycles are done. */
virtual void CleanUp ( ) ;
2014-06-17 08:31:02 -04:00
virtual FString GetReproString ( ) const { return GetFName ( ) . ToString ( ) ; }
2014-03-14 14:13:41 -04:00
# if WITH_EDITOR
2014-06-13 06:14:46 -04:00
void PostEditChangeProperty ( struct FPropertyChangedEvent & PropertyChangedEvent ) override ;
2022-05-26 08:42:23 -04:00
virtual void GetAssetRegistryTags ( TArray < FAssetRegistryTag > & OutTags ) const override ;
2015-03-11 11:02:39 -04:00
static void OnSelectObject ( UObject * NewSelection ) ;
2014-03-14 14:13:41 -04:00
# endif // WITH_EDITOR
// AActor interface begin
2016-08-09 11:28:56 -04:00
virtual void OnConstruction ( const FTransform & Transform ) override ;
2014-06-13 06:14:46 -04:00
virtual void Tick ( float DeltaSeconds ) override ;
2014-06-25 05:47:19 -04:00
virtual void EndPlay ( const EEndPlayReason : : Type EndPlayReason ) override ;
2022-05-26 08:42:23 -04:00
# if WITH_EDITOR
2023-02-03 08:30:39 -05:00
virtual bool CanChangeIsSpatiallyLoadedFlag ( ) const override { return false ; }
2023-06-08 15:54:51 -04:00
virtual bool IsDataLayerTypeSupported ( TSubclassOf < UDataLayerInstance > DataLayerType ) const override { return false ; }
2022-05-26 08:42:23 -04:00
# endif
2014-03-14 14:13:41 -04:00
// AActor interface end
2016-08-09 11:28:56 -04:00
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
bool IsRunning ( ) const ;
UFUNCTION ( BlueprintCallable , Category = " Functional Testing " )
bool IsEnabled ( ) const ;
2014-06-16 09:55:19 -04:00
2014-06-09 11:13:04 -04:00
protected :
2016-08-09 11:28:56 -04:00
/**
* Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called.
* So if there's some initial conditions or setup that you might need for your IsReady() check, you might want
* to do that here.
*/
virtual void PrepareTest ( ) ;
/**
* Prepare Test is fired once the test starts up, before the test IsReady() and thus before Start Test is called.
* So if there's some initial conditions or setup that you might need for your IsReady() check, you might want
* to do that here.
*/
UFUNCTION ( BlueprintImplementableEvent , meta = ( DisplayName = " Prepare Test " ) )
void ReceivePrepareTest ( ) ;
/**
* Called once the IsReady() check for the test returns true. After that happens the test has Officially started,
* and it will begin receiving Ticks in the blueprint.
*/
virtual void StartTest ( ) ;
/**
* Called once the IsReady() check for the test returns true. After that happens the test has Officially started,
* and it will begin receiving Ticks in the blueprint.
*/
UFUNCTION ( BlueprintImplementableEvent , meta = ( DisplayName = " Start Test " ) )
void ReceiveStartTest ( ) ;
/**
* IsReady() is called once per frame after a test is run, until it returns true. You should use this function to
* delay Start being called on the test until preconditions are met.
*/
UFUNCTION ( BlueprintNativeEvent , Category = " Functional Testing " )
bool IsReady ( ) ;
virtual bool IsReady_Implementation ( ) ;
2017-06-21 17:09:40 -04:00
virtual void OnTimeout ( ) ;
2016-08-09 11:28:56 -04:00
/**
* Goto an observation location.
*/
2014-06-09 11:13:04 -04:00
void GoToObservationPoint ( ) ;
public :
2014-03-14 14:13:41 -04:00
FFunctionalTestDoneSignature TestFinishedObserver ;
2016-11-20 21:35:35 -05:00
// AG TEMP - solving a compile issue in a temp way to unblock the bui.d
UPROPERTY ( Transient )
2015-10-06 15:59:09 -04:00
bool bIsRunning ;
2016-08-09 11:28:56 -04:00
2016-10-05 13:23:01 -04:00
TArray < FString > Steps ;
2015-10-06 15:59:09 -04:00
2018-05-23 21:04:31 -04:00
UPROPERTY ( BlueprintReadOnly , Category = " Functional Testing " )
2014-06-06 06:27:44 -04:00
float TotalTime ;
2014-10-16 09:02:30 -04:00
2016-09-21 10:07:18 -04:00
uint32 RunFrame ;
2017-06-27 10:18:29 -04:00
float RunTime ;
2017-04-03 13:59:25 -04:00
2016-09-21 10:07:18 -04:00
uint32 StartFrame ;
2017-04-03 13:59:25 -04:00
float StartTime ;
2016-09-21 10:07:18 -04:00
2016-08-09 11:28:56 -04:00
private :
bool bIsReady ;
2023-05-08 10:57:51 -04:00
FAutomationFunctionalTestEnvSetup EnvSetup ;
2016-08-09 11:28:56 -04:00
2014-10-16 09:02:30 -04:00
public :
/** Returns SpriteComponent subobject **/
2014-10-30 17:10:56 -04:00
UBillboardComponent * GetSpriteComponent ( ) ;
2014-10-16 09:02:30 -04:00
} ;