UE4 Automation Tool
1 minute read.
Unreal Engine Automation Tool is your assistant for running tests and controlling all automation, e.g. on continuous integration, automated builds or just for your local testing.
Location
Find the Unreal Automation Tool in Engine\Build\BatchFiles\RunUAT.bat
or Engine\Build\BatchFiles\RunUAT.sh
.
Overview
To get an overview use -list
while invoking RunUAT.bat
. Make sure to use this on the automation
subcommand:
RunUAT -game -buildmachine -stdout -fullstdoutlogoutput -forcelogflush -unattended -nopause -nullrhi -nosplash \ -ExecCmds="automation -list; quit"
This prints a list of all found automation commands, which in my case is the following for example:
Running AutomationTool... Parsing command line: -list Available commands: AnalyzeThirdPartyLibs BlameKeyword BuildCommonTools ZipProjectUp BuildCookRun BuildDerivedDataCache BuildPhysX BuildPlugin BuildThirdPartyLibs CheckCsprojDotNetVersion CodeSurgery CopySharedCookedBuild CopyUAT ExtractPaks FixupRedirects GenerateDSYM ListThirdPartySoftware RecordPerformance ReplaceAssetsUsingManifest IPhonePackager Localize Localise MegaXGE SubmitUtilizationReportToEC TestP4_Info GitPullRequest TestFail TestSuccess TestMessage TestRecursion TestRecursionAuto TestMacZip TestP4_CreateChangelist TestP4_StrandCheckout TestP4_LabelDescription TestP4_ClientOps CleanDDC TestTestFarm TestArguments TestCombinePaths TestFileUtility TestLog TestChangeFileType TestGamePerf TestUATBuildProducts TestOSSCommands UBT SyncSource GenerateAutomationProject DumpBranch DebugSleep TestMcpConfigs TestBlame TestChanges TestKillAll TestCleanFormalBuilds TestStopProcess LookForOverlappingBuildProducts TestThreadedCopyFiles UpdateLocalVersion ZipUtils RebuildHLOD RebuildLightMaps ResavePackages ListMobileDevices StashTarget UnstashTarget BuildForUGS CheckBalancedMacros CheckForHacks CheckRestrictedFolders CheckTargetExists CheckXcodeVersion CleanAutomationReports CleanFormalBuilds CryptoKeys RebasePublicIncludePaths FinalizeInstalledBuild ResavePluginDescriptors ResaveProjectDescriptors RunP4Reconcile SyncDDC SyncDepotPath UE4BuildUtilDummyBuildCommand BuildGraph Build TempStorageTests CleanTempStorage TestGauntlet RunUnreal CleanDevices RunEngineTests RunEditorTests AutomationTool exiting with ExitCode=0 (Success)
Get Help
To find out more about a command, use -help
, e.g.:
RunUAT -game -buildmachine -stdout -fullstdoutlogoutput -forcelogflush -unattended -nopause -nullrhi -nosplash \ -ExecCmds="automation -help TestFileUtility; quit"
Run Tests
For running tests, use the RunTests
subcommand. Here demonstrated by running Automation
through the editor rather than the RunUAT scripts:
UE4Editor.exe YourProject.uproject ^ -Game -NullRHI -NoSound ^ -ExecCmds="Automation RunTests MyCategory" ^ -TestExit="Automation Test Queue Empty" -Log
ExecCmds
again specifies the command to run, i.e. Automation RunTests <Group|Test|"All">
which can run
tests in a given group, specific tests or all of them. You can run multiple tests with a whitespace separated
list: Automation RunTests Test1 Test2 Group1
.
TestExit
specifies the condition when to exit the automation tool, in this case when the queue is empty.
ue4cli
A super useful tool that I found while investigating docker images with UE4 installations is “ue4cli”. This slim python tool allows way more straight forward invocation of RunUAT like this:
ue4 uat -help TestFileUtility
Isn’t that beautiful. Go check it out the ue4cli GitHub repository or install it via pip:
pip install ue4cli