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

/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.

Flags

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