Your move
Write the test first and watch it fail
The failing run on today's build is your BEFORE. A test that never failed proves nothing.
Run the new check on the build that still has the problem. Save the failure that matches the acceptance line before you ask your agent for a fix.
The situation
Start where the choice gets difficult.
You ask your agent for a test of the checkpoint prompt in your Unreal game. The agent says it passes. You open yesterday's build and choose Cancel at the problem checkpoint. Travel starts anyway. Both observations are real: the game still has the problem and the new test reports success. You read the test name and discover that it checks whether a checkpoint can open its prompt. The unwanted travel happens later, after the player makes a choice the test never exercises.
You ask for that choice to be added. The next report is red, this time because the test never found the checkpoint used in the setup. If you accept this result as the BEFORE, a change to the setup alone might turn it green. You need the test to reach the same moment the tester reached, see the unwanted behavior, and explain the result. Keep the gameplay change out of this first run so you can investigate the check against a version where you can still reproduce the report.
What changes the decision
Read the evidence before you add more work.
Freeze the expected behavior before you run. In the checkpoint example, Cancel should leave travel idle. If the current code starts travel, the assertion should report that exact mismatch. If the prompt never opened or the choice was never exercised, record a failed attempt to gather evidence. Repair the setup and run again. A missing result on a required acceptance line blocks the story even if the report has no failed tests.
Once the check fails on the right behavior, save that result. Make the smallest behavior change that lets the same check pass. With both receipts saved, you can tidy the implementation and rerun the check to see whether the cleanup preserved the working behavior. Engineers call this red-green-refactor. Red shows the check detects the defect. Green shows the fix satisfied the check. The final pass protects the behavior while you improve how the code is organized.
Epic's Unreal Engine 5.9 documentation describes C++ tests in the Automation Test Framework. The Automation Spec gives you a place to express the expected behavior with a named It. Use one It per acceptance line. For an outcome you need to observe in a level, Epic describes Functional Testing with a Functional Test actor in the level or a C++ subclass of AFunctionalTest for complex or reusable tests. Use the setup that reaches the reported event.
Do this now
Three moves, in order.
- Choose one failing acceptance line and name the observed outcome that the assertion will read.
- Run the check against the unchanged behavior. Save the test name, build identity, and assertion result if it fails for the reported reason.
- Record the status of every required line. Investigate anything skipped or blocked before treating the failing run as proof.
Working session
Build it from the evidence in front of you.
- Ask for the check without the fix
Give your agent the acceptance line and starting state. Ask it to point to the choice and the assertion. Record the baseline source identity and the test added to it.
- Start from a known route
Open the checkpoint prompt at the expected starting state. Confirm that the scenario reached the Cancel action before interpreting an idle result. Decide when to observe travel based on the ticket. An observation made before the action can take effect gives you a quiet result in both a broken build and a fixed one.
- Keep the report beside the run
In the editor use the Session Frontend's Automation tab or the Test Automation window. For a command-line run, pass -ExecCmds="Automation RunTest <TestName>;Quit" and -ReportExportPath="<folder>" to the editor or game executable. Replace the placeholders with your test name and a destination for this run. Save the selected result and log.
- Check the reason for red
If the report says travel started after Cancel and the test expected it to stay idle, you have the BEFORE for that line. If it says the checkpoint was missing, record the setup failure and repair it first. If a companion check for Confirm already passes on the baseline, save that result too. It gives you an existing behavior to carry into the next run.
Inspect the finished shape
Automation Spec skeleton for the Cancel line
BEGIN_DEFINE_SPEC(YourCheckpointSpec, "YourGame.Checkpoint", EAutomationTestFlags::ProductFilter | EAutomationTestFlags::ApplicationContextMask)
TSharedPtr<FYourScenario> YourScenario; // your own scenario helper, set up before each It
END_DEFINE_SPEC(YourCheckpointSpec)
void YourCheckpointSpec::Define()
{
Describe("Checkpoint prompt", [this]()
{
It("should keep travel idle after Cancel", [this]()
{
// Replace the placeholder with your scenario that chooses Cancel and reads the result.
TestFalse("Travel started after Cancel", YourScenario->TravelStartedAfterCancel());
});
});
}
Build the artifact
One automation test and its BEFORE result
Copy these fields into a note, document, or sheet you already use.
Give AI the bounded job
Prompt from your artifact—not from vibes.
Write one Automation Spec check for this acceptance line. Do not change gameplay behavior. Start the It description with “should.” Run the check on the baseline and report the build, executed action, assertion result, and report location. Flag skips and setup failures.
Before you use it
The work leaves your hands only when:
- The test was added without changing the behavior you want to verify.
- The failing assertion describes the behavior named in the ticket, with evidence that the action ran.
- The report names the selected test. Every missing or skipped check remains a blocking item.
Failure patterns
Watch for the move that looks useful but is not.
The check reads the opening state
- The tell
- The test asks whether the prompt opens and passes while Cancel still starts travel.
- The fix
- Read the outcome after the disputed action and assert the ticket's expected state.
Failure before the action
- The tell
- The name sounds right but the run stops while looking for the checkpoint.
- The fix
- Record a setup failure. Get the scenario to the action and rerun before recording a BEFORE verdict.
An empty pass
- The tell
- A success summary appears and the required test is absent from the results.
- The fix
- Match the expected test name to an executed result and verify the action ran. Keep the acceptance line open until that result exists.
Use the boundary
When this rule does not fit.
If the requested line describes behavior that already works, preserve the passing baseline for that line and find an agreed line that reproduces the defect. You can use the existing pass to guard that behavior during the fix. If the original conditions or build are unavailable, mark the BEFORE as missing, record the closest reproduction you can verify, and give the reviewer that limitation with the result.
