Skip to content

Learn Horizon-QA

Horizon-QA turns a Forge development server into an end-to-end test environment. Test code stays in the mod being tested. The framework discovers that code, prepares a world fixture, runs the test on the server thread, cleans up, and exposes the result for local inspection or CI.

The mental model

  • Discover


    Find and validate annotated test methods.

  • Select


    Choose tests through commands or CI selectors.

  • Prepare


    Allocate a cell and place its fixture.

  • Run


    Execute the test body, callbacks, and sequences.

  • Clean


    Run registered cleanup on every outcome.

  • Report


    Keep visual evidence or write CI reports.

The same lifecycle serves local investigation and automated reporting; the path only branches when Horizon-QA exposes the outcome.

flowchart LR
    accTitle: End-to-end test lifecycle
    accDescr: Flow from discovery through shared execution to interactive overlays or reported artifacts.
    Discover["Discover and validate"] --> Select["Select tests"]
    Select --> Prepare["Prepare fixtures"]
    Prepare --> Run["Run on the server thread"]
    Run --> Clean["Clean owned state"]
    Clean --> Classify["Classify the result"]
    Classify --> Outcome{"Expose the outcome"}
    Outcome --> Interactive["Interactive cells and overlays"]
    Outcome --> Reported["JUnit XML and status JSON"]

The execution path is shared through cleanup and classification, whether the result is inspected in-game or consumed by CI.

Three boundaries explain most framework behavior:

  • Lifecycle: every test moves through discovery, preparation, execution, cleanup, and a final result.
  • Execution: normal interactive commands launch tests directly, while automatic and manually reported runs use ordered batches.
  • Fixture boundary: cells provide spatial separation, but world rules, registries, recipe maps, and other global state remain shared.

Read in order

Runtime lifecycle
Follow a test from Forge discovery through cleanup, failure classification, and reporting.
Execution model
Understand interactive and reported execution, batches, concurrency, server tick phases, and GregTech time-warp.
Fixtures, coordinates, and isolation
See what the framework controls, what remains real, how coordinate spaces work, and where isolation stops.

Keep these rules in mind

  1. Most helper methods expect test-local coordinates. Convert to world coordinates only for APIs that explicitly need them.
  2. Controlled setup may supply a state, but GregTech and Minecraft still perform the behavior being validated.
  3. Cleanup is part of the test contract because grid cells cannot isolate global state.
  4. The event trace explains history; final-state assertions explain the outcome. Useful tests usually need both.

Failure and cleanup

Cleanup timing belongs to the runtime lifecycle. The resources and states that require cleanup depend on the framework's isolation boundaries.

Choose your next step