How do I start a Functional Test from RunUAT on a finished build?

I’ve created a few blueprint-based Functional Tests in my game and I can properly see and run them from within the Session Frontend window when launched from the editor. I would like to run these same tests on a finished build through the command line.

The RunUAT script only seems to support starting a C++ test node via the 'RunUnreal' or 'RunUnrealTests' command, passing in the name of the C++ test node into the -test={test_name} argument. Passing in the name of a functional test isn’t going to work since it’s looking for a C++ class that derives from UnrealTestNode. Running Gauntlet Tests in Unreal Engine | Unreal Engine 5.1 Documentation

How can I get Gauntlet to start a Functional Test instead? This seems to be possible using the UnrealEditor.exe by passing in -ExecCmds="Automation RunTests {functional_test_name_or_map}" but obviously this only performs the tests within an editor instance, not a finished build.

Is there not a similar command for RunUAT? Or do finished builds not support blueprint-based functional tests?

3 Likes

Any luck?

I solved this by reading the documentation in comments from Gauntlet runner implementation inside AutomationTool code

I have this command to run the functional tests you create on blueprint:

set skipArgs=-skipcook -skipstage -skippackage
set projectArgs=-project=%projectPath%%projectName%.uproject -platform=%platform% -configuration=%configuration%
set modeArgs=-unattended -nosound -nullrhi
set testArgs=-build=%workspace%%targetDirectory% -Packaged -test=UE.EditorAutomation -RunTest="Project"

:: Run Unreal Functional Tests
set testCommand=%runUAT% RunUnreal -noP4 %projectArgs% %skipArgs% %modeArgs% %testArgs%
echo Running: %testCommand%
call %testCommand%

-build points to your build location. Since I am using the -Packaged argument then I am pointing to the same folder to where I asked to archive my packaged build, You can also point to your stage folder and avoid packaging.

On -RunTest I just added Project to execute all tests under that, but you can be more specific by writing -RunTest=“Project.Functional Tests.YourMap.TestVanilla”

I hope I helped :slight_smile: