Getting started¶
This path takes a GTNH-style Forge mod from no test framework to one passing Horizon-QA test. Tests are plain Java methods discovered at server startup, so there is no registration file or separate test launcher to maintain.
Before you begin¶
You need:
- A GTNH Gradle convention project whose
runClientandrunServertasks already work. - Horizon-QA on the development and CI classpath.
- Mod code that targets Java 8 bytecode. Your development toolchain may use the modern Java setup supported by the GTNH build conventions.
The shortest path¶
-
Add the dependency
Put the Horizon-QA dev artifact on the compile and runtime classpath without publishing it with your mod.
-
Write one test
Create a holder class, add a public static
@GameTestmethod, and finish with one success path. -
Run locally
Start the server in the default interactive mode and launch the test with
/horizonqa run. -
Automate
Use CI mode to select tests, write JUnit XML and status JSON, and return a stable exit code.
At the end, you will have a server-run test that can be launched interactively and through -Dhorizonqa.mode=ci.
Use the examples as a reference¶
The repository includes an examples/ Gradle subproject that runs against Horizon-QA and GT5-Unofficial:
examples/src/main/java/.../tests/
examples/src/main/resources/assets/horizonqaexamples/horizonqastructures/
Run it from the repository root:
The examples are framework demonstrations, not a package layout to copy into a consumer mod. See Examples mod for the class-by-class map.
Common next steps¶
| Goal | Read |
|---|---|
| Understand discovery, batches, ticks, and reporting | Learn Horizon-QA |
| Export a multiblock fixture | Structure templates |
| Drive a GregTech controller | GTNH multiblock API |
| Assert that a bad state never occurs | Negative assertions |
| Publish reports in automation | CI and JUnit reports |
| Fix missing commands, tests, templates, or reports | Setup troubleshooting |
| Diagnose a failure | Debugging failed tests |