FAutomationTestFramework

Class representing the main framework for running automation tests

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/AutomationTest.h

Include

#include "Misc/AutomationTest.h"

Syntax

class FAutomationTestFramework

Remarks

Class representing the main framework for running automation tests

Variables

Name Description

Public variable

FOnCaptureFrame ...

 

OnCaptureFrameTrace

Called when a frame trace should be captured

Public variable

FOnPerformanceD ...

 

OnPerformanceDataRetrieved

Called when the performance data is retrieved.

Public variable

FOnTestScreensh ...

 

OnScreenshotCompared

Called when a screenshot comparison completes.

Public variable

FSimpleMulticas...

 

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).

Public variable

FOnTestDataRetr ...

 

OnTestDataRetrieved

Called when the test data is retrieved.

Public variable

FSimpleMulticas...

 

PostTestingEvent

Called after all unit tests have completed

Public variable

FSimpleMulticas...

 

PreTestingEvent

Called right before unit testing is about to begin

Constructors

No constructors are accessible with public or protected access.

Destructors

No destructors are accessible with public or protected access.

Functions

Name Description

Public function

void

 

AddAnalyticsItemToCurrentTest

(
    const FString & AnalyticsItem
)

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

Public function

void

 

BuildTestBlacklistFromConfig()

Load the test Blacklist from the config.

Public function Const

bool

 

ContainsTest

(
    const FString & InTestName
)

Checks if a provided test is contained within the framework.

Public function

void

 

DequeueAllCommands()

Dequeue all latent and network commands

Public function

void

 

EnqueueLatentCommand

Enqueues a latent command for execution on a subsequent frame

Public function

void

 

EnqueueNetworkCommand

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

Public function

bool

 

ExecuteLatentCommands()

Execute all latent functions that complete during update

Public function

bool

 

ExecuteNetworkCommands()

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

Public function Static

FAutomationT ...

 

Get()

Return the singleton instance of the framework.

Public function Const

bool

 

GetCaptureStack()

Public function Const

FAutomationT ...

 

GetCurrentTest()

Returns the actively executing test or null if there isn't one

Public function Static

FAutomationT ...

 

GetInstance()

Public function Const

FString

 

GetUserAutomationDirectory()

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

Public function Const

void

 

GetValidTestNames

(
    TArray < FAutomationTestInfo >& Tes...
)

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

Public function

void

 

LoadTestModules()

Load any modules that are not loaded by default and have test classes in them

Public function

void

 

NotifyPerformanceDataRetrieved

(
    bool bSuccess,
    const FString & ErrorMessage
)

Public function

void

 

NotifyScreenshotComparisonComplete

(
    const FAutomationScreenshotCompareR ...
)

Public function

void

 

NotifyScreenshotTakenAndCompared()

Public function

void

 

NotifyTestDataRetrieved

(
    bool bWasNew,
    const FString & JsonData
)

Public function

FOnTestScree ...

 

OnScreenshotAndTraceCaptured()

Accessor for delegate called when a png screenshot is captured and a frame trace

Public function

FOnTestScree ...

 

OnScreenshotCaptured()

Accessor for delegate called when a png screenshot is captured

Public function

bool

 

RegisterAutomationTest

(
    const FString & InTestNameToRegiste...,
    FAutomationTestBase * InTestToR...
)

Register a automation test into the framework.

Public function

void

 

ResetTests()

Reset status of worker (delete local files, etc)

Public function

bool

 

RunSmokeTests()

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

Public function

void

 

SetCaptureStack

(
    bool bCapture
)

Public function

void

 

SetDeveloperDirectoryIncluded

(
    const bool bInDeveloperDirectoryInc...
)

Sets whether we want to include content in developer directories in automation testing

Public function

void

 

SetForceSmokeTests

(
    const bool bInForceSmokeTests
)

Sets forcing smoke tests.

Public function

void

 

SetRequestedTestFilter

(
    const uint32 InRequestedTestFlags
)

Sets which set of tests to pull from.

Public function Const

bool

 

ShouldTestContent

(
    const FString & Path
)

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

Public function

void

 

StartTestByName

(
    const FString & InTestToRun,
    const int32 InRoleIndex
)

Attempt to start the specified test.

Public function

bool

 

StopTest

(
    FAutomationTestExecutionInfo & OutE...
)

Stop the current test and return the results of execution

Public function

bool

 

UnregisterAutomationTest

(
    const FString & InTestNameToUnregis...
)

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback