Horizon-QA¶
Horizon-QA is an end-to-end testing framework for GTNH. It exposes a GameTest-style API on Minecraft 1.7.10: real server, real blocks, real GregTech machines. Recipe and machine logic are never mocked.
At a glance
- Forge 1.7.10, Java 8 bytecode, interactive by default with explicit
ciandoffmodes. - Tests are plain
@GameTeststatic methods on@GameTestHolderclasses, discovered by ASM at server start. - Each test runs in an isolated cell on a deterministic grid; CI defaults to a dedicated void world, and failures stay placed for in-game triage.
- Output is a single
TEST-horizonqa.xmlsuitable for any JUnit-aware CI.
What it is for¶
Most GTNH regressions are not arithmetic bugs in a pure function. They are machines forming when they should not, recipes running under broken maintenance, outputs routed to the wrong bus, or two mods quietly disagreeing about a tile entity. Horizon-QA exercises those scenarios against the real server and reports them with enough context to act on the XML alone.
Quick example: negative test¶
A common idiom is asserting every tick that something bad does not happen:
@GameTest(template = "ebf_no_coils", timeoutTicks = 60) // (1)!
public static void doesNotFormWithoutCoils(GameTestHelper helper) {
Multiblock ebf = helper.gtnh().multiblock(at(1, 0, 0));
helper.onEachTick(() -> // (2)!
helper.assertFalse(ebf.isFormed(), "EBF formed without coils"));
helper.succeedAtTimeout(); // (3)!
}
templateresolves to<holder>:ebf_no_coils, a structure deliberately missing its heating coils.onEachTickre-runs the closure every test tick; a transienttruefails immediately, on that tick.succeedAtTimeoutpasses only if the full window elapses without any assertion firing.
See Negative assertions for the rest of the pattern.
Capabilities¶
-
Functional E2E
Boots a real dedicated server and drives real tile entities. GT logic is never mocked.
-
Structure templates
Export multiblocks in-game with the wand; load
namespace:pathJSON + NBT from your mod jar. -
GTNH helpers
EU supply, maintenance, time-warp, role-based hatch addressing, scoped synthetic recipes.
-
Typed event log
Ordered, tick-stamped events in JUnit
<system-out>. Diagnose CI failures without relaunching the game. -
Visual debugging
Beacons, ghost-block diffs, overlay text, and wand-based selection in the dev client.
-
CI-ready
Single
TEST-horizonqa.xmlwith failures, warnings, and optional event traces per case.
Where to go next¶
Getting started walks new authors from "I just cloned the mod" to "my first passing test." Guides cover task-oriented topics: structures, sequences, the GTNH multiblock façade, CI wiring, and failure triage. Reference collects the annotations, commands, JVM flags, and event catalog you will look up most often.
Legal note
Horizon-QA is a clean-room implementation inspired by modern GameTest ergonomics, not a port of Mojang source. Do not submit decompiled modern Minecraft code in pull requests; see Clean-room policy.