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.
Automation Testing?
If you are looking for a guide on how to write Automation Tests using Unreal Engine’s framework, check out this blog post.
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:
This prints a list of all found automation commands, which in my case is the following for example:
Get Help
To find out more about a command, use -help, e.g.:
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