Documentation Index
Fetch the complete documentation index at: https://docs.hrtk.frotty27.com/llms.txt
Use this file to discover all available pages before exploring further.
HRTK stands for Hytale Runtime Testing Kit - a testing framework that runs inside the Hytale server, giving your tests access to real game state.
Why HRTK?
Traditional test frameworks like JUnit run outside the game. They can’t access Hytale’s entity system, world state, events, or commands. You end up faking everything, and your fakes drift from reality. HRTK is different. Your tests run inside the live server as a plugin. They interact with real entities, real events, and real commands. When you deal damage in a test, Hytale’s actual damage system runs. When you spawn an entity, it exists in a real world.26 Annotations
JUnit-familiar annotations like
@HytaleTest, @BeforeEach, @Tag, @Timeout - plus Hytale-specific ones like @EcsTest, @WorldTest, @FlowTest, @Benchmark28 Assert Classes
Domain-specific assertions:
EcsAssert, StatsAssert, CombatAssert, InventoryAssert, LootAssert, EffectAssert, EventAssert, CommandAssert, PhysicsAssert, NPCAssert, and more38 Example Tests
Comprehensive example mod with 38 test suites covering ECS, events, effects, combat, permissions, projectiles, game modes, and more
Who is this for?
Mod Developers
Write tests alongside your mod code. Verify components persist, codecs round-trip, commands work, damage calculates correctly. Tests ship in your JAR and run when HRTK is installed.
Server Operators
Install HRTK on your dev server. Run
/hrtk run to execute all mod tests. Verify mods work correctly before deploying to production.What can you test?
Everything a mod touches:| Surface | What you can verify |
|---|---|
| ECS | Components persist, archetypes match, entity queries return correctly |
| Stats | Health/stamina/mana values, stat modifiers, alive/dead state |
| Combat | Damage reduces health, lethal damage causes death, knockback applies |
| Events | Events fire with correct data, cancellation works, priority ordering |
| Commands | Commands execute, output is correct, permissions enforced |
| Codecs | Serialization round-trips, malformed data rejected |
| Inventory | Items added/removed, slots contain expected stacks |
| Loot | Drop lists contain expected items, drops spawn after kills |
| Effects | Effects apply/expire, overlap behavior, stat modifiers active, invulnerability |
| Permissions | Permission checks, user/group add/remove, built-in permission constants |
| Projectiles | Projectile module available, config assets, physics properties |
| Game Modes | GameMode enum, GameModeType asset lookup, mode change events |
| Death/Respawn | DeathComponent inspection, item loss config, damage pipeline |
| World | Entities spawn at positions, chunks load, worlds create/destroy |
| UI | Pages build correct commands, event bindings registered |
| Performance | Benchmark with warmup/iteration control via TimeRecorder |
Quick Example
Get started
Write your first test in 5 minutes