Class SelfTest

java.lang.Object
net.neoforged.neoforge.common.util.SelfTest

@Internal public final class SelfTest extends Object
We use a "self-test" to launch a client and dedicated server from within our CI and exit. This allows us to do an "end-to-end" test that actually uses the installer we produce to install a clientinvalid input: '&server' and test it. The self-test writes a file so that the build script can detect that the game actually loaded up enough to start ticking the game loop.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • SelfTest

      private SelfTest()
  • Method Details

    • initCommon

      public static void initCommon()
    • writeSelfTestReport

      public static void writeSelfTestReport(String path)
      This is used by our GitHub Actions pipeline to run an E2E test for PRs. It writes a small self-test report to the file indicated by the system property and exits.