engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 所有成员列表
FAutomationTestFramework类 参考

Class representing the main framework for running automation tests 更多...

#include <AutomationTest.h>

Public 成员函数

void AddAnalyticsItemToCurrentTest (const FString &AnalyticsItem)
 Adds a analytics string to the current test to be parsed later. 更多...
 
void BuildTestBlacklistFromConfig ()
 Load the test Blacklist from the config.
 
bool ContainsTest (const FString &InTestName) const
 Checks if a provided test is contained within the framework. 更多...
 
void DequeueAllCommands ()
 Dequeue all latent and network commands
 
void EnqueueLatentCommand (TSharedPtr< IAutomationLatentCommand > NewCommand)
 Enqueues a latent command for execution on a subsequent frame 更多...
 
void EnqueueNetworkCommand (TSharedPtr< IAutomationNetworkCommand > NewCommand)
 Enqueues a network command for execution in accordance with this workers role 更多...
 
bool ExecuteLatentCommands ()
 Execute all latent functions that complete during update 更多...
 
bool ExecuteNetworkCommands ()
 Execute the next network command if you match the role, otherwise just dequeue 更多...
 
FAutomationTestBase * GetCurrentTest () const
 Returns the actively executing test or null if there isn't one
 
FString GetUserAutomationDirectory () const
 Gets a scratch space location outside of the project and saved directories. 更多...
 
void GetValidTestNames (TArray< FAutomationTestInfo > &TestInfo) const
 Populates the provided array with the names of all tests in the framework that are valid to run for the current application settings. 更多...
 
void LoadTestModules ()
 Load any modules that are not loaded by default and have test classes in them
 
FOnTestScreenshotAndTraceCaptured & OnScreenshotAndTraceCaptured ()
 Accessor for delegate called when a png screenshot is captured and a frame trace
 
FOnTestScreenshotCaptured & OnScreenshotCaptured ()
 Accessor for delegate called when a png screenshot is captured
 
bool RegisterAutomationTest (const FString &InTestNameToRegister, class FAutomationTestBase *InTestToRegister)
 Register a automation test into the framework. 更多...
 
void ResetTests ()
 Reset status of worker (delete local files, etc)
 
bool RunSmokeTests ()
 Attempt to run all fast smoke tests that are valid for the current application configuration. 更多...
 
void SetDeveloperDirectoryIncluded (const bool bInDeveloperDirectoryIncluded)
 Sets whether we want to include content in developer directories in automation testing
 
void SetForceSmokeTests (const bool bInForceSmokeTests)
 Sets forcing smoke tests.
 
void SetRequestedTestFilter (const uint32 InRequestedTestFlags)
 Sets which set of tests to pull from.
 
bool ShouldTestContent (const FString &Path) const
 Whether the testing framework should allow content to be tested or not. 更多...
 
void StartTestByName (const FString &InTestToRun, const int32 InRoleIndex)
 Attempt to start the specified test. 更多...
 
bool StopTest (FAutomationTestExecutionInfo &OutExecutionInfo)
 Stop the current test and return the results of execution 更多...
 
bool UnregisterAutomationTest (const FString &InTestNameToUnregister)
 Unregister a automation test with the provided name from the framework. 更多...
 

静态 Public 成员函数

static FAutomationTestFramework & Get ()
 Return the singleton instance of the framework. 更多...
 

Public 属性

FOnCaptureFrameTrace OnCaptureFrameTrace
 Called when a frame trace should be captured
 
FOnPerformanceDataRetrieved OnPerformanceDataRetrieved
 Called when the performance data is retrieved.
 
FOnTestScreenshotComparisonComplete OnScreenshotCompared
 Called when a screenshot comparison completes.
 
FSimpleMulticastDelegate OnScreenshotTakenAndCompared
 The final call related to screenshots, after they've been taken, and after they've been compared (or not if automation isn't running).
 
FOnTestDataRetrieved OnTestDataRetrieved
 Called when the test data is retrieved.
 
FSimpleMulticastDelegate PostTestingEvent
 Called after all unit tests have completed
 
FSimpleMulticastDelegate PreTestingEvent
 Called right before unit testing is about to begin
 

详细描述

Class representing the main framework for running automation tests

成员函数说明

◆ AddAnalyticsItemToCurrentTest()

void FAutomationTestFramework::AddAnalyticsItemToCurrentTest ( const FString &  AnalyticsItem)

Adds a analytics string to the current test to be parsed later.

Must be called only when an automation test is in progress

参数
AnalyticsItemLog item to add to the current test

◆ ContainsTest()

bool FAutomationTestFramework::ContainsTest ( const FString &  InTestName) const

Checks if a provided test is contained within the framework.

参数
InTestNameName of the test to check
返回
true if the provided test is within the framework; false otherwise

◆ EnqueueLatentCommand()

void FAutomationTestFramework::EnqueueLatentCommand ( TSharedPtr< IAutomationLatentCommand >  NewCommand)

Enqueues a latent command for execution on a subsequent frame

参数
NewCommand- The new command to enqueue for deferred execution

◆ EnqueueNetworkCommand()

void FAutomationTestFramework::EnqueueNetworkCommand ( TSharedPtr< IAutomationNetworkCommand >  NewCommand)

Enqueues a network command for execution in accordance with this workers role

参数
NewCommand- The new command to enqueue for network execution

◆ ExecuteLatentCommands()

bool FAutomationTestFramework::ExecuteLatentCommands ( )

Execute all latent functions that complete during update

返回
- true if the latent command queue is now empty and the test is complete

◆ ExecuteNetworkCommands()

bool FAutomationTestFramework::ExecuteNetworkCommands ( )

Execute the next network command if you match the role, otherwise just dequeue

返回
- true if any network commands were in the queue to give subsequent latent commands a chance to execute next frame

◆ Get()

static FAutomationTestFramework & FAutomationTestFramework::Get ( )
static

Return the singleton instance of the framework.

返回
The singleton instance of the framework.

◆ GetUserAutomationDirectory()

FString FAutomationTestFramework::GetUserAutomationDirectory ( ) const

Gets a scratch space location outside of the project and saved directories.

When an automation test needs to do something like generate project files, or create new projects it should use this directory, rather than pollute other areas of the machine.

◆ GetValidTestNames()

void FAutomationTestFramework::GetValidTestNames ( TArray< FAutomationTestInfo > &  TestInfo) const

Populates the provided array with the names of all tests in the framework that are valid to run for the current application settings.

参数
TestInfoArray to populate with the test information

◆ RegisterAutomationTest()

bool FAutomationTestFramework::RegisterAutomationTest ( const FString &  InTestNameToRegister,
class FAutomationTestBase *  InTestToRegister 
)

Register a automation test into the framework.

The automation test may or may not be necessarily valid for the particular application configuration, but that will be determined when tests are attempted to be run.

参数
InTestNameToRegisterName of the test being registered
InTestToRegisterActual test to register
返回
true if the test was successfully registered; false if a test was already registered under the same name as before

◆ RunSmokeTests()

bool FAutomationTestFramework::RunSmokeTests ( )

Attempt to run all fast smoke tests that are valid for the current application configuration.

返回
true if all smoke tests run were successful, false if any failed

◆ ShouldTestContent()

bool FAutomationTestFramework::ShouldTestContent ( const FString &  Path) const

Whether the testing framework should allow content to be tested or not.

Intended to block developer directories.

参数
Path- Full path to the content in question
返回
- Whether this content should have tests performed on it

◆ StartTestByName()

void FAutomationTestFramework::StartTestByName ( const FString &  InTestToRun,
const int32  InRoleIndex 
)

Attempt to start the specified test.

参数
InTestToRunName of the test that should be run
InRoleIndexIdentifier for which worker in this group that should execute a command

◆ StopTest()

bool FAutomationTestFramework::StopTest ( FAutomationTestExecutionInfo &  OutExecutionInfo)

Stop the current test and return the results of execution

返回
true if the test ran successfully, false if it did not (or the test could not be found/was invalid)

◆ UnregisterAutomationTest()

bool FAutomationTestFramework::UnregisterAutomationTest ( const FString &  InTestNameToUnregister)

Unregister a automation test with the provided name from the framework.

返回
true if the test was successfully unregistered; false if a test with that name was not found in the framework.

该类的文档由以下文件生成: