Class AbstractSessionBuilder

java.lang.Object
com.install4j.api.test.session.AbstractSessionBuilder
Direct Known Subclasses:
InstallationDirectorySessionBuilder, InstallerSessionBuilder

public abstract class AbstractSessionBuilder extends Object
Abstract base for all session builders. Leaf builders override each setter and start() with a covariant return so fluent chains stay typed.
  • Method Details

    • debug

      @NotNull public AbstractSessionBuilder debug(boolean debug)
      Switch the session to in-process debug mode. By default the test API spawns the produced installer media as a real subprocess (with its bundled JRE, native launcher, and the full extraction code path) and drives it over IPC. In debug mode it runs the installer in the test JVM directly, which is faster but requires an install4jc -g debug build to exist alongside the media file. Use debug mode locally during development; leave it off for CI runs that should exercise the real installer.
    • timeout

      @NotNull public AbstractSessionBuilder timeout(@NotNull Duration d)
      Default timeout applied to every wait operation. The default is 3 minutes. Override per session for longer installations.
    • arg

      @NotNull public AbstractSessionBuilder arg(@NotNull String... args)
      Additional command-line arguments passed to the installer application.
    • systemProperty

      @NotNull public AbstractSessionBuilder systemProperty(@NotNull String key, @NotNull String value)
      Set a system property on the test JVM before the installer starts.
    • workingDirectory

      @NotNull public AbstractSessionBuilder workingDirectory(@NotNull File dir)
      Working directory for the running installer application.
    • logFile

      @NotNull public AbstractSessionBuilder logFile(@NotNull File logFile)
      Redirect install4j's runtime logger output to the given file.
    • start

      @NotNull public abstract Session start()
      Start the installer application and return the typed session handle.