# AbstractSessionBuilder

Import: `import com.install4j.api.test.session.AbstractSessionBuilder;`

```java
public abstract class AbstractSessionBuilder
```

Abstract base for all session builders. Leaf builders override each setter and
[`AbstractSessionBuilder.start`](AbstractSessionBuilder.md#start) with a covariant return so fluent chains stay typed.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`debug(boolean)`](#debug-boolean) | `AbstractSessionBuilder` | Switch the session to in-process debug mode. |
| [`timeout(Duration)`](#timeout-duration) | `AbstractSessionBuilder` | Default timeout applied to every wait operation. |
| [`arg(String[])`](#arg-string) | `AbstractSessionBuilder` | Additional command-line arguments passed to the installer application. |
| [`systemProperty(String, String)`](#systemproperty-string-string) | `AbstractSessionBuilder` | Set a system property on the test JVM before the installer starts. |
| [`workingDirectory(File)`](#workingdirectory-file) | `AbstractSessionBuilder` | Working directory for the running installer application. |
| [`logFile(File)`](#logfile-file) | `AbstractSessionBuilder` | Redirect install4j's runtime logger output to the given file. |
| [`start()`](#start) | `Session` | Start the installer application and return the typed session handle. |

### debug(boolean)

```java
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(Duration)

```java
public AbstractSessionBuilder timeout(Duration d)
```

Default timeout applied to every wait operation. The default is 3 minutes. Override per
session for longer installations.

### arg(String[])

```java
public AbstractSessionBuilder arg(String... args)
```

Additional command-line arguments passed to the installer application.

### systemProperty(String, String)

```java
public AbstractSessionBuilder systemProperty(String key, String value)
```

Set a system property on the test JVM before the installer starts.

### workingDirectory(File)

```java
public AbstractSessionBuilder workingDirectory(File dir)
```

Working directory for the running installer application.

### logFile(File)

```java
public AbstractSessionBuilder logFile(File logFile)
```

Redirect install4j's runtime logger output to the given file.

### start()

```java
public abstract Session start()
```

Start the installer application and return the typed session handle.

