
Tests your developers will write.
Failures that explain themselves.
Specter drives your game from Playwright tests in TypeScript: abilities, AI, input, UI and multiplayer. Gameplay programmers write them next to the feature and rerun them without rebuilding the editor.
When one fails, QA and engineers get the same answer: what the game did, when, and why the check didn't pass.
or read the docs →Watch it run
Knight's charge, tested in the editor. Each line lights up as the game does it, and the checks wait for the game instead of a fixed timer.
import { test, expect, VectorUtils } from '@specter-automation/test';
test('Charge stuns, damages and knocks back what it hits', async ({ server, knightActor }) => {
const { heroes: { knight }, minion } = server;
const spots = [
{ x: -413, y: 441, z: 160 },
{ x: -413, y: 231, z: 160 },
{ x: -583, y: 301, z: 160 },
];
const enemies = await test.step('Spawn enemies', () =>
Promise.all(spots.map((location) => minion.spawn({
type: 'ranged',
spawnOptions: { location, properties: { InitialTeamId: 2 } },
}))),
);
const start = await knightActor.getLocation();
const forward = await knightActor.getForwardVector();
await knightActor.triggerAbilityWithTarget(knight.abilityCharge, VectorUtils.addOffset(start, forward, 50));
// No waits: every check retries until the game gets there
await test.step('Hit enemies are stunned, damaged and knocked back', () =>
Promise.all(enemies.flatMap((enemy, i) => [
expect(enemy).toHaveGameplayTag('Status.Stunned'),
expect(enemy).toHaveAttributeChange('HealthSet', 'Health', { delta: -100 }),
expect(enemy).toHaveMovedFurtherThan(spots[i], 100),
])),
);
await expect(knightActor).toHaveMovedFurtherThan(start, 1000);
});Your game, typed.
Describe a hero, an ability or a menu once, in a small TypeScript class: the Game Object Model. Tests then read like the design doc, and your editor autocompletes them.
import { WidgetLocator, SpecterWorld, SpawnOptions } from '@specter-automation/test';
import { HeroObject } from './hero-object';
// Written once. Every test then uses knight.abilityCharge, knight.spawn() ...
export class Knight extends HeroObject {
readonly abilityCharge = 'Ability.Slot.Q';
readonly abilityForceShield = 'Ability.Slot.W';
readonly abilityShieldRush = 'Ability.Slot.E';
readonly abilityShieldSmash = 'Ability.Slot.R';
readonly perkUnstoppableCharge: WidgetLocator;
constructor(readonly world: SpecterWorld) {
super(world, 'Hero.Knight');
this.perkUnstoppableCharge = world.widget('Button_Perk_UnstoppableCharge');
}
spawn(options: SpawnOptions = {}) {
return this.world.spawnActor('BP_Hero_Knight', { ...options, spawnController: true });
}
}You see why, not just that.
The charge hit, the damage landed, the stun effect applied, and the tag never came: its Blueprint errors out. The failure names the check, the actor and what it had, followed by what the game did before it and the engine's errors.
In the runner, the same failure opens on a timeline with pictures of the game at each moment, and every AI's decisions. Scrub through one →
✘ charge.spec.ts:25 › Hit enemies are stunned, damaged and knocked back Timed out after 5000ms waiting for Gameplay Tag on "BP_Minion_Ranged_C_1".Expected: to have tag Status.StunnedReceived: does not have tag 📜 GAS EVENT CAUSALITY TIMELINE • 🎯 [1.02s] Ability Activated: GA_Knight_Q_Charge | Instigator: BP_Hero_Knight_C_0 • ⚡ [1.18s] Effect Applied: GE_Charge_Damage -> Target: [BP_Minion_Ranged_C_1] • 📊 [1.18s] Attribute 'Health' on [BP_Minion_Ranged_C_1]: 450 -> 350 (Delta: -100.0) • ⚡ [1.18s] Effect Applied: GE_Charge_Stun -> Target: [BP_Minion_Ranged_C_1] ⚠️ Engine warnings and errors since the last test (most recent last): [1.2s] Error LogScript: Accessed None trying to read property StunTag in GE_Charge_Stun_C (×3)
The same test in C++
Unreal's Automation Spec can test this too, and on the rightbelowis what that takes: finding the world, loading and spawning by hand, building the ability's target data, reading attributes through each ability system; an editor rebuild for every change; and a fixed wait before looking once.
When a check fails there, you get its name in the log. Keep Gauntlet for launching builds on devices: Specter is where the tests are written and debugged.
BEGIN_DEFINE_SPEC(FChargeSpec, "Game.Combat.Charge",
EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter)
ACharacter* Knight = nullptr;
TArray<ACharacter*> Enemies;
TArray<FVector> Spots;
TArray<float> StartHealth;
FVector KnightStart;
END_DEFINE_SPEC(FChargeSpec)
void FChargeSpec::Define()
{
BeforeEach([this]()
{
// Find the play-in-editor world
UWorld* World = nullptr;
for (const FWorldContext& Context : GEngine->GetWorldContexts())
{
if (Context.WorldType == EWorldType::PIE) { World = Context.World(); }
}
// Load the Blueprints, spawn Knight and three enemies, and note their health
UClass* KnightClass = LoadClass<ACharacter>(nullptr,
TEXT("/Game/Heroes/Knight/BP_Hero_Knight.BP_Hero_Knight_C"));
UClass* MinionClass = LoadClass<ACharacter>(nullptr,
TEXT("/Game/Units/Minions/BP_Minion_Ranged.BP_Minion_Ranged_C"));
Knight = World->SpawnActor<ACharacter>(KnightClass, FVector(0, 0, 100), FRotator::ZeroRotator);
Spots = { FVector(-413, 441, 160), FVector(-413, 231, 160), FVector(-583, 301, 160) };
for (const FVector& Spot : Spots)
{
ACharacter* Enemy = World->SpawnActor<ACharacter>(MinionClass, Spot, FRotator(0, -90, 0));
CastChecked<AMinionCharacter>(Enemy)->InitialTeamId = 2;
Enemies.Add(Enemy);
StartHealth.Add(UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Enemy)
->GetNumericAttribute(UHealthSet::GetHealthAttribute()));
}
});
LatentIt("charge stuns, damages and knocks back what it hits", [this](const FDoneDelegate& Done)
{
// Aim 50 units ahead, as target data the ability reads
KnightStart = Knight->GetActorLocation();
FGameplayAbilityTargetingLocationInfo Target;
Target.LocationType = EGameplayAbilityTargetingLocationType::LiteralTransform;
Target.LiteralTransform = FTransform(KnightStart + Knight->GetActorForwardVector() * 50.f);
FGameplayEventData Event;
Event.TargetData = UAbilitySystemBlueprintLibrary::AbilityTargetDataFromLocations(
FGameplayAbilityTargetingLocationInfo(), Target);
UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Knight)
->HandleGameplayEvent(FGameplayTag::RequestGameplayTag("Ability.Slot.Q"), &Event);
// Nothing retries: wait long enough, then look once
FTSTicker::GetCoreTicker().AddTicker(FTickerDelegate::CreateLambda([this, Done](float)
{
const FGameplayTag Stunned = FGameplayTag::RequestGameplayTag("Status.Stunned");
for (int32 i = 0; i < Enemies.Num(); ++i)
{
UAbilitySystemComponent* ASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Enemies[i]);
TestTrue(TEXT("Stunned"), ASC->HasMatchingGameplayTag(Stunned));
TestEqual(TEXT("Damage"), StartHealth[i] - ASC->GetNumericAttribute(UHealthSet::GetHealthAttribute()), 100.f);
TestTrue(TEXT("Knocked back"), FVector::Dist(Spots[i], Enemies[i]->GetActorLocation()) > 100.f);
}
TestTrue(TEXT("Knight charged"), FVector::Dist(KnightStart, Knight->GetActorLocation()) > 1000.f);
Done.Execute();
return false;
}), 2.5f);
});
AfterEach([this]()
{
Knight->Destroy();
for (ACharacter* Enemy : Enemies) { Enemy->Destroy(); }
Enemies.Reset();
StartHealth.Reset();
});
}import { test, expect, VectorUtils } from '@specter-automation/test';
test('Charge stuns, damages and knocks back what it hits', async ({ server, knightActor }) => {
const { heroes: { knight }, minion } = server;
const spots = [
{ x: -413, y: 441, z: 160 },
{ x: -413, y: 231, z: 160 },
{ x: -583, y: 301, z: 160 },
];
const enemies = await test.step('Spawn enemies', () =>
Promise.all(spots.map((location) => minion.spawn({
type: 'ranged',
spawnOptions: { location, properties: { InitialTeamId: 2 } },
}))),
);
const start = await knightActor.getLocation();
const forward = await knightActor.getForwardVector();
await knightActor.triggerAbilityWithTarget(knight.abilityCharge, VectorUtils.addOffset(start, forward, 50));
// No waits: every check retries until the game gets there
await test.step('Hit enemies are stunned, damaged and knocked back', () =>
Promise.all(enemies.flatMap((enemy, i) => [
expect(enemy).toHaveGameplayTag('Status.Stunned'),
expect(enemy).toHaveAttributeChange('HealthSet', 'Health', { delta: -100 }),
expect(enemy).toHaveMovedFurtherThan(spots[i], 100),
])),
);
await expect(knightActor).toHaveMovedFurtherThan(start, 1000);
});The runner lives in Unreal.
Run, filter and rerun tests from a tab in the editor, and watch each step, check and engine event arrive as the game plays. The same tests run in CI from the command line.

See it on your game.
Multiplayer, performance budgets, AI debugging, coverage and the agent toolset are on the features page.