@HytaleSuite. It groups related test methods under a shared name and configuration. While @HytaleSuite is technically optional (any class containing @HytaleTest methods will be discovered), using it gives you control over naming, isolation, and tagging.
Basic Suite Declaration
value, the suite name defaults to the class’s simple name (e.g., CraftingTests).
Naming Conventions
Choose suite names that are descriptive and group-oriented. They appear in test output and JSON exports.| Pattern | Example |
|---|---|
| Feature-based | "Crafting System Tests" |
| Component-based | "HealthComponent Tests" |
| Layer-based | "Command Integration Tests" |
Isolation Strategies
Theisolation parameter on @HytaleSuite controls how the suite’s tests interact with live server state. This is critical for tests that mutate the ECS store or world.
NONE
Tests run against live server state. Best for read-only and pure logic tests. Default.
SNAPSHOT
ECS state is captured before the suite and restored after. Best for component mutation tests.
DEDICATED_WORLD
A temporary void world is created for the suite and destroyed after. Best for block and spawn tests.
Suite-Level Tags
Apply@Tag at the class level to tag every test in the suite. These tags combine with any method-level tags.
Suite-Level @Disabled
Disable an entire suite by annotating the class with@Disabled. All methods will be reported as SKIPPED with the provided reason.
One Suite Per Class
Each class is one suite. HRTK instantiates the class using its no-argument constructor before running any tests. Instance fields are shared across all tests in the suite (within a single run), but each suite gets a fresh instance.Next Steps
- Lifecycle Hooks — set up and tear down shared state
- Filtering & Tags — run subsets of your tests
- Isolation Overview — deep dive into isolation strategies