Skip to main content
All HRTK operations use the /hrtk command. You can run these from the server console or in-game if you have the hrtk.admin permission.

Command Overview

CommandDescription
/hrtkShow available commands and which plugins have tests
/hrtk runRun tests and generate a report
/hrtk listShow all discovered tests
/hrtk benchRun benchmarks only
/hrtk resultsShow results from the last test run
/hrtk scanRe-discover tests from all loaded plugins
/hrtk watchAuto-rerun tests when a plugin reloads
/hrtk exportSave 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 the Group:Name from your mod’s manifest.json. Run /hrtk to see available plugin names.
FormatExampleWhat it runs
(none)/hrtk runAll tests from all plugins
Plugin name/hrtk run Frotty27:MyModAll tests from one plugin
Plugin.Suite/hrtk run Frotty27:MyMod.CombatTestsOne suite from a plugin
Plugin.Suite#method/hrtk run Frotty27:MyMod.CombatTests#testDamageOne specific test

Flags

FlagDescription
--tag tag1,tag2Only run tests with at least one of these tags
--fail-fastStop as soon as one test fails
--verboseShow 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.
Output includes performance statistics:

/hrtk results

Shows the pass/fail details from the most recent test run.
If no tests have been run yet:

/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.
See File Export for format details.

Permission

All commands require the hrtk.admin permission. Grant it to operators or specific players as needed.

Next Steps