Testing
Testing: Prove a change works in the running game. Unreal Engine 5 command reference with parameters and examples.
Testing: Prove a change works in the running game. Unreal Engine 5 command reference with parameters and examples.
3 commands. Each shows its parameters and an example, and has a copyable deep link, so you (or an AI agent) can jump straight to one.
run_playtestPlay-test a running play session: press keys, wait, check live actors, get one verdict
| Parameter | Type | Required | Description |
|---|---|---|---|
| steps | json | Yes | JSON array of up to 64 steps: {"keys":[...],"seconds":N}, {"wait":N}, {"expect":[checks]}, {"wait_until":[checks],"timeout":N,"keys":[...]}. Each wait is at most 60 s, the whole playtest 300 s |
| always | json | No | JSON array of checks that must hold on every frame of the playtest |
| world | string | No | Play world whose local player presses the keys and whose actors are checked: server, client1... (default: the first world with a local player) |
| stop_on_fail | bool | No | Stop at the first failed step and release every key (false = run every step and report each) |
| wait | bool | No | Wait until it finishes and return the result (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning a still-running playtest (default 100; 50 over MCP) |
| restart | bool | No | Stop the playtest already running in that world and start this one |
cfa run_playtest --steps '[{"keys":["W"],"seconds":2},{"expect":[{"actor":"player","measure":"moved","at_least":300}]}]'
cfa run_playtest --steps '[{"wait_until":[{"actor":"BP_Door_C_1","property":"bIsOpen","equals":true}],"keys":["W"],"timeout":4}]' --always '[{"actor":"player","measure":"z","at_least":-500}]'
cfa run_playtest --steps '[{"keys":["E"],"seconds":0.2},{"wait":0.5},{"expect":[{"actor":"BP_Chest_C_1","exists":false}]}]'list_automation_testsList the project's automation and functional tests, filtered by path or tag
Lists the automation tests the editor knows (C++ IMPLEMENT_SIMPLE_AUTOMATION_TEST and spec tests, functional test maps, Python and Blueprint tests) from the editor's own local automation worker, the one Tools > Session Frontend > Automation shows. The first call asks the worker for its list, which can take a few seconds; the CLI waits. Each row is the full test path (what run_automation_tests takes) followed by its tags. --filter matches part of the path (Project., System.Core., Project.Functional Tests.), --tag one tag; total and truncated stay exact. --rediscover asks again after tests were added in this session.
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | string | No | Only tests whose full path contains this text |
| tag | string | No | Only tests with this tag, e.g. [Smoke] |
| max_results | int | No | Most tests to list (1-1000) |
| rediscover | bool | No | Ask the worker for the test list again |
| wait | bool | No | Wait for the test list (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning while the list is still coming (default 100; 50 over MCP) |
| restart | bool | No | Start over when an earlier listing is still running |
cfa list_automation_tests --filter Project.
cfa list_automation_tests --tag [Smoke] --max-results 100run_automation_testsRun automation tests by path or filter and get a verdict with each failure's errors
Runs tests in the editor through the same automation controller the Session Frontend uses, and waits for them (the game thread keeps running). Name them with --tests (full paths from list_automation_tests) or --filter: StartsWith:Project.Functional, ^Prefix, Suffix$, Group:Name (a group in Automation Controller settings) or a bare substring, several joined with +. The reply has a verdict (fail when a test failed, nothing ran or the run timed out; pass_with_warnings for skipped, not-run or warning-only results), passed, failed, skipped and not_run counts, and for each failed test its first errors with file(line). A run refuses while any level or asset is unsaved and lists them, because a test that opens its own map makes the editor drop unsaved level changes (the Session Frontend asks to save first): run save_all, or pass --save-first to save them now. --timeout-seconds stops a run that hangs.
| Parameter | Type | Required | Description |
|---|---|---|---|
| tests | stringlist | No | Full test paths to run |
| filter | string | No | Run every test this matches instead: StartsWith:X, ^X, X$, Group:Name or a substring, joined by + |
| save_first | bool | No | Save every unsaved level and asset before the run (without it the run refuses while anything is unsaved) |
| timeout_seconds | int | No | Most seconds the run may take before it is stopped (5-7200) |
| max_results | int | No | Most failed tests to list with their errors (counts stay exact) |
| wait | bool | No | Wait until the run finishes and return the result (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning a still-running run (default 100; 50 over MCP) |
| restart | bool | No | Stop the run already started by this command and start this one |
cfa run_automation_tests --tests System.Core.Math.Vector
cfa run_automation_tests --filter StartsWith:Project.Functional --timeout-seconds 900