- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| docs | ||
| examples | ||
| gradle | ||
| src | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .java-version | ||
| AGENTS.md | ||
| build.gradle.kts | ||
| CODEOWNERS | ||
| dependencies.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| jitpack.yml | ||
| LICENSE | ||
| mkdocs.yml | ||
| PRINCIPLES.md | ||
| README.md | ||
| repositories.gradle | ||
| requirements.in | ||
| requirements.txt | ||
| settings.gradle.kts | ||
Horizon QA
Horizon QA is an end-to-end testing framework for GTNH. It implements the modern Minecraft GameTest API on 1.7.10, providing a specialized environment to validate multiblocks, machine logic, and logistics.
📖 Documentation: https://www.gtnewhorizons.com/Horizon-QA/ with getting started, guides, the full command/property reference, and Javadoc. This README is a summary; the website is the canonical documentation.
Quick Example: Testing Negative Cases
A key strength of Horizon QA is verifying that machines don't behave incorrectly. The snippet below checks that an Electric Blast Furnace fails to form when its coils are missing, exactly the kind of regression a unit test can't catch:
@GameTest(template = "ebf_no_coils", timeoutTicks = 60)
public static void doesNotFormWithoutCoils(GameTestHelper helper) {
Multiblock ebf = helper.gtnh().multiblock(helper.pos("controller"));
helper.onEachTick("EBF remains unformed", () ->
helper.assertFalse(ebf.isFormed(), "EBF formed without coils"));
helper.succeedAtTimeout();
}
onEachTick re-runs the named assertion every tick for the full 60-tick window, so any transient formation is caught immediately and reports identify the failing invariant. succeedAtTimeout marks the test passed only if it reaches the end without triggering the assertion.
Features
- Java API: Define tests using standard
@GameTestannotations and the GameTestHelper class for assertions. - GTNH Integration: Built-in support for handling EU, maintenance states, and time-warping for machine processing.
- Structure Support: Tools to export, place, and verify multiblock structures via JSON or NBT.
- Visual Feedback: In-game overlays, beacons, and ghost blocks to identify test failures visually.
- CI/CD Integration: Generates JUnit-compatible XML reports for automated build pipelines.
- Horizon Wand: An in-game editor with a free-camera viewport, cursor-aligned move and resize gizmos, and visual label creation, renaming, movement, and inspection for authoring test structures.
Usage
- Build your test structure in-game (guide).
- Select the area with the Horizon Wand, press L to label important coordinates, and use
/qa export <name>to create a template. - Write a Java test class using
@GameTestto define the logic and assertions (first test). - Run tests using the
/qa runallcommand and view results in-game or in the build logs. For report files from a manually-started batch, pass-Dhorizonqa.mode=ci -Dhorizonqa.autoRun=false; for headless autoruns, pass-Dhorizonqa.mode=cito the server JVM. Override specific behavior with flags such as-Dhorizonqa.world=normal,-Dhorizonqa.stopServer=false, or-Dhorizonqa.gridOrigin=0,128,0(CI guide).
Legal Disclaimer & Clean-Room Implementation
Horizon-QA is an independent, clean-room implementation of a testing framework for Minecraft 1.7.10. While the API structure, class names, and annotations are heavily inspired by modern Minecraft's GameTest framework to ensure developer familiarity and ease of use, the underlying codebase is entirely original.
- No Proprietary Code: This project was developed entirely from scratch by observing public documentation, videos, and the external behavior of modern testing tools. It contains zero decompiled or proprietary source code from Mojang/Microsoft.
- Transformative Work: The framework safely translates modern API concepts into the fundamentally different 1.7.10 architecture and includes custom, transformative extensions built specifically for GregTech New Horizons (GTNH).
- Licensing: Because the implementation logic is 100% original, this project is legally and safely distributed under the MIT License.
Notice to Contributors
To protect the legal integrity of this project, please do not reference, decompile, or copy any source code from modern Minecraft versions when submitting Pull Requests. Any PR found to contain proprietary Mojang code will be immediately rejected.