Logo: Ue Automation And Testing

Ue Automation And Testing

Communautéit
kevinpbuckley
ue-automation-and-testing

Write and run automated tests for Unreal Engine projects — simple/complex automation tests (IMPLEMENT_SIMPLE_AUTOMATION_TEST, IMPLEMENT_COMPLEX_AUTOMATION_TEST), BDD-style Spec tests (DEFINE_SPEC, BEGIN_DEFINE_SPEC, Describe/It/BeforeEach/AfterEach), functional in-level tests (AFunctionalTest), low-level tests (Catch2-based LLTs), latent/async commands, EAutomationTestFlags, FAutomationTestBase assertion API (TestTrue/TestEqual/TestNotNull/AddError), and running tests from the editor, CLI, or CI. Use when writing unit or integration tests for gameplay logic or systems, setting up headless CI test runs, verifying data/content, or catching regressions.

Iwwersiicht

Editeurkevinpbuckley
Repositoryunreal-engine-skills
Skill-Nummue-automation-and-testing
Stären
89
Forks
9
Matgeliwwert Dateien
4
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    kevinpbuckley huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ue Automation And Testing an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-automation-and-testing
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/unreal-engine-skills.git /tmp/unreal-engine-skills
mkdir -p .claude/skills
cp -r /tmp/unreal-engine-skills/skills/core/ue-automation-and-testing .claude/skills/ue-automation-and-testing
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ue Automation And Testing an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ue Automation And Testing automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ue Automation And Testing net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Automation & testing

Unreal has a layered test ecosystem. Each layer trades world setup cost against richness:

LayerRunsBest for
Low-level tests (LLT)thin process, no editor/gamepure C++ module logic, fastest CI
Simple automation testeditor or commandletunit/feature tests, no world required
Complex automation testeditor or commandletsame code over many inputs (content stress)
Spec (DEFINE_SPEC)editor or commandletBDD-style behavior docs, latent/async scenarios
Functional test (AFunctionalTest)full world in a test levelgameplay integration, AI, abilities
Gauntletfull device sessionslarge-scale, perf, device/platform testing

When to use this skill

  • Writing C++ unit or integration tests for game systems (damage, inventory, save data).
  • Expressing multi-case behavior specs that should read like documentation.
  • Testing gameplay mechanics that require actors, physics, or a running world.
  • Running tests headless in CI on every commit.
  • Reaching devices or larger sessions via Gauntlet.

Mental model

Tests live outside UObject reflection — they are not Blueprints-visible. The FAutomationTestBase base class provides the assertion API (TestTrue, TestEqual, …) and is instantiated once as a global at startup. RunTest must return true; use the assertion methods rather than check/ensure so failures record cleanly instead of crashing.

EAutomationTestFlags controls two orthogonal dimensions: context (where the test can run: EditorContext, ClientContext, ServerContext, CommandletContext, ProgramContext) and filter (which CI bucket: SmokeFilter, EngineFilter, ProductFilter, PerfFilter, StressFilter). Every test must specify at least one context and one filter.

Simple automation test

cpp
// Private/Tests/DamageTest.cpp
#include "Misc/AutomationTest.h"

IMPLEMENT_SIMPLE_AUTOMATION_TEST(FDamageMathTest, "MyGame.Combat.DamageMath",
    EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter)

bool FDamageMathTest::RunTest(const FString& Parameters)
{
    const float Result = ComputeDamage(100.f, 0.5f);
    TestEqual(TEXT("Half damage"), Result, 50.f);
    TestTrue(TEXT("Non-negative"), Result >= 0.f);
    return true;   // returning false also marks the test failed
}

Key rules:

  • Place tests in Private/Tests/ of the relevant module; name the file <ClassFilename>Test.cpp.
  • The dotted path string ("MyGame.Combat.DamageMath") is what the browser and command-line filter use.
  • Always combine a context flag and a filter flag with |.
  • Add "AutomationController" and "AutomationUtils" to PrivateDependencyModuleNames in your Build.cs if you need automation utilities.

Complex automation test

Complex tests run the same RunTest body over a set of inputs provided by GetTests. Use them for content stress (load all maps, compile all Blueprints):

cpp
IMPLEMENT_COMPLEX_AUTOMATION_TEST(FLoadAllMapsTest, "MyGame.Maps.LoadAll",
    EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter)

void FLoadAllMapsTest::GetTests(TArray<FString>& OutBeautifiedNames,
                                TArray<FString>& OutTestCommands) const
{
    // populate OutBeautifiedNames and OutTestCommands in parallel
}

bool FLoadAllMapsTest::RunTest(const FString& Parameters)
{
    // Parameters is one entry from OutTestCommands
    return true;
}

Spec style (BDD)

Specs express behavior in Describe/It blocks with scoped BeforeEach/AfterEach setup. Each It becomes an independently runnable test. Use BEGIN_DEFINE_SPEC to add member variables; DEFINE_SPEC when the class body can stay empty.

cpp
BEGIN_DEFINE_SPEC(FInventorySpec, "MyGame.Inventory",
    EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter)
    TSharedPtr<FInventorySystem> Inv;
END_DEFINE_SPEC(FInventorySpec)

void FInventorySpec::Define()
{
    BeforeEach([this]()
    {
        Inv = MakeShared<FInventorySystem>();
    });

    Describe("AddItem", [this]()
    {
        It("should increase count by one", [this]()
        {
            Inv->AddItem(TEXT("Sword"), 1);
            TestEqual(TEXT("Count"), Inv->GetCount(TEXT("Sword")), 1);
        });

        It("should reject a stack over the limit", [this]()
        {
            TestFalse(TEXT("Over limit"),
                Inv->AddItem(TEXT("Arrows"), 9999));
        });
    });

    AfterEach([this]() { Inv.Reset(); });
}
  • Name spec files <FeatureName>.spec.cpp — not *Test.cpp.
  • xDescribe / xIt disable a block without deleting it.
  • Use LatentIt / LatentBeforeEach when a test step spans multiple frames (passes a FDoneDelegate).
  • Pass EAsyncExecution::TaskGraph / ::ThreadPool to It / BeforeEach to control which thread each block runs on.

See references/spec-and-latent-commands.md for BeforeEach scoping, parameterized tests, async/latent patterns, and Redefine.

Functional tests (in a level)

AFunctionalTest is a UCLASS actor placed in a dedicated test map. The automation runner discovers it through the Functional Testing Editor plugin, starts each actor, and collects results.

Override the key virtual functions in a C++ child class:

cpp
// MyFunctionalTest.h
UCLASS()
class MYGAME_API AMyFunctionalTest : public AFunctionalTest
{
    GENERATED_BODY()
protected:
    virtual void PrepareTest() override;      // start async setup (streaming, server)
    virtual bool IsReady_Implementation();    // return false while still loading
    virtual void StartTest();                 // main test body
};
cpp
// MyFunctionalTest.cpp — inside StartTest:
void AMyFunctionalTest::StartTest()
{
    AMyActor* Target = Cast<AMyActor>(FindActorByTag(TEXT("Target")));
    AssertIsValid(Target, TEXT("Target actor found"));
    AssertTrue(Target->Health > 0.f, TEXT("Target is alive"));
    FinishTest(EFunctionalTestResult::Succeeded, TEXT("OK"));
}

Important:

  • FinishTest must be called or the test times out. Set TimeLimit in the actor's details to bound CI runs.
  • Use AssertTrue / AssertIsValid / AssertEqual_Float (the functional-test assert family from AFunctionalTest) rather than the FAutomationTestBase macros.
  • Register spawned actors with AddActorToDestroyOnTestEnd so cleanup is automatic.

See references/functional-tests.md for PrepareTest and IsReady patterns, Ground Truth Data, and Blueprint functional test setup.

Low-level tests (Catch2 / LLT)

LLTs compile a separate thin executable per module using Catch2 — no editor, no game framework — giving the fastest possible CI iteration for module-internal logic. They live in a Tests/ directory alongside the module and require a dedicated <Module>Tests.Target.cs build target. See the official doc and Developer/LowLevelTestsRunner/ for the runner harness.

cpp
#include "TestHarness.h"   // Developer/LowLevelTestsRunner/Public/TestHarness.h

TEST_CASE("MyModule / FormatFString / basic substitution", "[smoke]")
{
    FString Out = FString::Printf(TEXT("v=%d"), 42);
    CHECK(Out == TEXT("v=42"));
}

LLTs are the right choice when your logic has no UObject or world dependency and you want sub-second CI feedback. See references/low-level-tests.md for target setup and build invocation.

Assertion reference

FAutomationTestBase assertions (all record failures without stopping execution unless you return false or call UE_RETURN_ON_ERROR):

AssertionNotes
TestTrue(What, Expr)fails if Expr is false
TestFalse(What, Expr)fails if Expr is true
TestEqual(What, Actual, Expected)float/double overloads accept a Tolerance
TestNotNull(What, Ptr)fails if pointer is null
TestNull(What, Ptr)fails if pointer is non-null
TestValid(What, Value)TWeakObjectPtr / TOptional validity
AddError(Message)unconditional failure record
AddWarning(Message)non-failing annotation
UE_RETURN_ON_ERROR(Cond, Msg)record error and return false if condition fails

Running tests

Editor: Tools → Test Automation → Automation tab → select tests → Start Tests.

Command line / CI (headless):

UnrealEditor-Cmd.exe MyProject.uproject
  -ExecCmds="Automation RunTest MyGame.Combat;Quit"
  -unattended -nopause -nullrhi
  -ReportExportPath="TestResults/"

Flags:

  • -ExecCmds="Automation RunTest <filter>" — dotted prefix runs all tests under it.
  • -ExecCmds="Automation RunTest Group:MyGroup;Quit" — named test group (configured via AutomationTestGroup in DefaultEngine.ini).
  • -ReportExportPath — writes JSON + HTML for a report server.
  • -ResumeRunTest — resume an interrupted run from a saved JSON report.

Parse the exit code and log for pass/fail in your CI pipeline. A non-zero exit code indicates test failures when -unattended is set.

Gotchas

  • Missing both a context and a filter flag → the test never appears in the browser.
  • Using check/ensure instead of TestTrue/AddError → crashes the whole run instead of recording a failure.
  • Functional test with no timeout → CI hangs indefinitely.
  • Non-deterministic tests (frame timing, RNG, network) → flaky; seed or mock inputs.
  • Spec variable capture inside Describe — local variables captured by lambda go out of scope before the It runs; capture this and use member variables.
  • Test module depends on the editor — tests that need WITH_EDITOR types must be placed in an Editor-category module; don't put them in Runtime.
  • AddErrorS / AddWarningS — deprecated since 5.4; use AddError / AddWarning.
  • TestEqualInsensitive — deprecated since 5.5; use TestEqual (strings are case-insensitive by default now).

Version notes

  • EAutomationTestFlags_ApplicationContextMask is a convenience constant combining all context flags; commonly used in specs: EAutomationTestFlags::ProductFilter | EAutomationTestFlags_ApplicationContextMask.
  • Priority flags (CriticalPriority, HighPriority, etc.) were added in UE5; they are optional but useful for CI triage.
  • Low-level tests (Catch2-based LLTs) are the recommended direction for new pure-logic tests added since UE 5.0. The FAutomationTestBase stack remains the right choice for tests that need the engine or editor context.

References & source material

Engine source (UE 5.8):

  • Runtime/Core/Public/Misc/AutomationTest.h — EAutomationTestFlags:88, FAutomationTestBase:1594, RunTest:2653, TestEqual:1985, TestFalse:2367, TestNull:2530, TestTrue:2603, FAutomationSpecBase:2899, Describe:2757, BeforeEach:2821, It:2789, IAutomationLatentCommand:525, DEFINE_LATENT_AUTOMATION_COMMAND:3796, ADD_LATENT_AUTOMATION_COMMAND:4087, IMPLEMENT_SIMPLE_AUTOMATION_TEST:4297, DEFINE_SPEC:4339, BEGIN_DEFINE_SPEC:4346.
  • Developer/FunctionalTesting/Classes/FunctionalTest.h — AFunctionalTest:249, FinishTest:678, PrepareTest:777, IsReady_Implementation:814, AddError:659.
  • Developer/LowLevelTestsRunner/Public/TestHarness.h — Catch2 bridge/harness header.
  • Developer/CQTest/ — CQTest module (TEST, TEST_CLASS, ASSERT_THAT macros).

Official docs (UE 5.8):

Deep-dive references in this skill:

Related skills: ue-logging-and-assertions, ue-debugging-techniques.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Ue Automation And Testing?

Write and run automated tests for Unreal Engine projects — simple/complex automation tests (IMPLEMENT_SIMPLE_AUTOMATION_TEST, IMPLEMENT_COMPLEX_AUTOMATION_TEST), BDD-style Spec tests (DEFINE_SPEC, BEGIN_DEFINE_SPEC, Describe/It/BeforeEach/AfterEach), functional in-level tests (AFunctionalTest), low-level tests (Catch2-based LLTs), latent/async commands, EAutomationTestFlags, FAutomationTestBase assertion API (TestTrue/TestEqual/TestNotNull/AddError), and running tests from the editor, CLI, or CI. Use when writing unit or integration tests for gameplay logic or systems, setting up headless C...

Firwat Ue Automation And Testing op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ue Automation And Testing besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ue Automation And Testing an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-automation-and-testing an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ue Automation And Testing benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ue Automation And Testing benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ue Automation And Testing domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ue Automation And Testing gratis?

kevinpbuckley huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇