All HRTK operations use theDocumentation 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 command. You can run these from the server console or in-game if you have the hrtk.admin permission.
Command Overview
| Command | Description |
|---|---|
/hrtk | Show available commands and which plugins have tests |
/hrtk run | Run tests and generate a report |
/hrtk list | Show all discovered tests |
/hrtk bench | Run benchmarks only |
/hrtk results | Show results from the last test run |
/hrtk scan | Re-discover tests from all loaded plugins |
/hrtk watch | Auto-rerun tests when a plugin reloads |
/hrtk export | Save last results to JSON + HTML files |
/hrtk
Shows available commands and lists which plugins have tests. Works both from the console and in-game./hrtk run
Runs your tests and shows the results. You can filter by plugin, tag, or specific test. Tests run in the background so the server stays responsive.Only one test run can be active at a time. If you run
/hrtk run while tests are already running, HRTK will tell you to wait for the current run to finish.Syntax
Target formats
The plugin name is theGroup:Name from your mod’s manifest.json. Run /hrtk to see available plugin names.
| Format | Example | What it runs |
|---|---|---|
| (none) | /hrtk run | All tests from all plugins |
| Plugin name | /hrtk run Frotty27:MyMod | All tests from one plugin |
| Plugin.Suite | /hrtk run Frotty27:MyMod.CombatTests | One suite from a plugin |
| Plugin.Suite#method | /hrtk run Frotty27:MyMod.CombatTests#testDamage | One specific test |
Flags
| Flag | Description |
|---|---|
--tag tag1,tag2 | Only run tests with at least one of these tags |
--fail-fast | Stop as soon as one test fails |
--verbose | Show each test result as it completes |
Examples
Output
/hrtk list
Shows all discovered tests, grouped by plugin and suite.Disabled suites and methods are shown with
[DISABLED] markers. Benchmark methods are shown with [BENCH]./hrtk bench
Runs only@Benchmark methods, skipping regular tests. Like /hrtk run, tests run in the background.
/hrtk results
Shows the pass/fail details from the most recent test run./hrtk scan
Re-scans all loaded plugins for test classes. Run this after hot-reloading a plugin to pick up new or changed tests./hrtk watch
Toggles automatic test re-runs when a plugin reloads. When a watched plugin is reloaded, HRTK automatically re-scans and runs its tests. Run the same command again to stop watching./hrtk export
Saves the last run’s results as JSON and HTML files. The HTML report is a self-contained page with color-coded results, filtering, and light/dark mode support.Permission
All commands require thehrtk.admin permission. Grant it to operators or specific players as needed.
Next Steps
- Console Output - understand the output format
- File Export - JSON and HTML export format
- Filtering & Tags - filter syntax details