Table of Contents

Class RegressionInputs

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

The inputs of a targeted native regression: one owned client hosting one disposable world, one mod under test in two or more arms (conventionally parent and candidate), its runtime dependencies and an optional game-side probe. Where it runs is not here: the client's install, port, disposable copy, save folders and loader come from the environment inventory's client environment (selected by TargetedRegression in GameSessions), this machine when there is no file. The scenario source (the rounds and their assertions) stays free of both, so the same source can be shared. Read(string) resolves relative paths against the file's own directory and refuses unknown fields.

public sealed class RegressionInputs
Inheritance
object
RegressionInputs

Properties

Cli

public RegressionCli Cli { get; set; }

Property Value

RegressionCli

Client

public RegressionClient Client { get; set; }

Property Value

RegressionClient

Configs

Config files to place in BepInEx/config, by file name. Without valheimCLI.valheimCLI.cfg one is written with the client's port. A BepInEx.cfg here replaces the loader's default; the install's own is never used (#711).

public Dictionary<string, string> Configs { get; set; }

Property Value

Dictionary<string, string>

Fixture

public RegressionFixture Fixture { get; set; }

Property Value

RegressionFixture

GamePins

Optional: the game build and loader the client environment's install must have (InstallPins; its patchers value is not compared). With a loader package, the loader is the package's (Loader).

public InstallPins? GamePins { get; set; }

Property Value

InstallPins

LogScan

Reasoned expected log lines and patterns of the run's own for this native regression (LogClassification); unclassified BepInEx errors fail by default.

public Dictionary<string, LogClassification> LogScan { get; set; }

Property Value

Dictionary<string, LogClassification>

Mod

public RegressionMod Mod { get; set; }

Property Value

RegressionMod

Name

A short name for the run: letters, digits, - and _.

public string Name { get; set; }

Property Value

string

OptionalReferences

Assembly names a staged DLL references but only uses when present (a guarded soft integration); none by default.

public List<string> OptionalReferences { get; set; }

Property Value

List<string>

Patchers

BepInEx preloader patchers to place in BepInEx/patchers; none by default.

public List<RegressionFile> Patchers { get; set; }

Property Value

List<RegressionFile>

Plugins

Every other DLL the run loads: the mod's dependencies and any plugin the scenario needs. A library (no plugin) may be listed.

public List<RegressionFile> Plugins { get; set; }

Property Value

List<RegressionFile>

Probe

An optional game-side test probe: a plugin that serves the scenario's observations.

public RegressionFile? Probe { get; set; }

Property Value

RegressionFile

Methods

Read(string)

Reads and validates the inputs; relative paths are relative to the file's directory.

public static RegressionInputs Read(string path)

Parameters

path string

Returns

RegressionInputs

Validate()

Refuses inputs that cannot describe one clean run, naming the field and the fix. A field check: it reads no file (the regression reads cli.manifest).

public void Validate()

Write(string)

Writes the inputs as indented JSON.

public void Write(string path)

Parameters

path string