Valheim.Testing.Game 0.1.0-preview.62

This is a prerelease version of Valheim.Testing.Game.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Valheim.Testing.Game --version 0.1.0-preview.62
                    
NuGet\Install-Package Valheim.Testing.Game -Version 0.1.0-preview.62
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Valheim.Testing.Game" Version="0.1.0-preview.62" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Valheim.Testing.Game" Version="0.1.0-preview.62" />
                    
Directory.Packages.props
<PackageReference Include="Valheim.Testing.Game" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Valheim.Testing.Game --version 0.1.0-preview.62
                    
#r "nuget: Valheim.Testing.Game, 0.1.0-preview.62"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Valheim.Testing.Game@0.1.0-preview.62
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Valheim.Testing.Game&version=0.1.0-preview.62&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Valheim.Testing.Game&version=0.1.0-preview.62&prerelease
                    
Install as a Cake Tool

ValheimTesting

Reusable test inputs, fixtures and assertions for Valheim mods. Most tests run without Valheim, Unity, Steam or a dedicated server; native checks drive disposable game sessions through ValheimCLI on supported Windows, macOS and Linux hosts.

Unofficial community tooling; not affiliated with or endorsed by Iron Gate or Coffee Stain. Valheim is a trademark of Iron Gate AB.

First test in three steps

  1. Install the .NET 10 SDK (Visual Studio 2026 brings it) on the PC where you build your mod.
  2. Copy ModWithTests beside your mod: a test project that links your mod's real source files and references Valheim.Testing.Doubles from NuGet.org.
  3. Run dotnet test MyMod.Tests/MyMod.Tests.csproj. No game, Steam or ValheimCLI is needed.

Then Bring your mod helps choose the layer for each behaviour, Get started has the package versions and IDE setup, and the examples go up to native checks with owned game processes. Supported hosts and limits are in platforms. New to BepInEx and Harmony? The community wiki's overview explains the concepts; check its older samples against 1.0 (wiki caveats). A plugin that will not load, or two mods that conflict: debugging guide.

To make the test workflow discoverable to your coding agent, copy the ValheimTesting skill into your mod repository.

For a disposable in-game load check, build your mod and run the tool from the directory containing its single .csproj:

dotnet build -c Release
valheim-test env preflight
valheim-test server-load

server-load selects the newest built [BepInPlugin] DLL, prints the choice, and records it in the run. start uses the same default for a client mod; server-load-ab requires explicit mod paths to keep both arms fixed. The tool refuses a missing, stale or ambiguous build instead of guessing. It writes run output under this machine's ValheimTesting data folder, outside your mod project. See the one-shot guide for setup and explicit options.

Packages

Each package's page is its reference: what it is for, the types a test calls, how it fails and its limits.

Package (source and reference) Purpose Runtime
Valheim.Testing (reference) Composable terrain, exact recorded-input replay, pinned grid dumps, terrain rendering with contours, parity checks and StaticOverride (scoped static and environment overrides for any test); no ValheimCLI dependency netstandard2.0
Valheim.Testing.Game (reference) One game process from outside: typed observations, fixtures, owned server and client sessions, comparisons and JSON/JUnit reports net10.0
Valheim.Testing.GameSessions (reference) Game sessions: a dedicated server, clients and hosted worlds as one run (GameSession, PinnedServerRun), on this PC or on other machines over SSH or a container, with host locks, Steam-account leases and recovery of what a run left; built on Valheim.Testing.Game net10.0
Valheim.Testing.Cli (reference) ValheimCLI's client transport and YAML runner, packaged unchanged from pinned ValheimCLI source (MIT, warp) net10.0
Valheim.Testing.Adapter (reference) Source compiled into a mod's game-side test adapter plugin: registration with ValheimCLI, the owned-session identity the runners check, and read-only observations source (net48, C# 10)
Valheim.Testing.Doubles (reference) Source-only doubles of the Unity, Valheim, BepInEx and Jotunn types a mod's pure-logic sources use, compiled into your test project; every type is partial; ValheimWorldScope puts back every static they keep (a mod scopes its own with StaticOverride) source (C# 10); member index
Valheim.Testing.Bindings (reference) Offline check that a built mod's references into the game assemblies still bind (Mono.Cecil); missing members fail, access changes are reported separately netstandard2.0
Valheim.Testing.Bindings.Tool (reference) The same check as the valheim-bindings .NET tool, for a mod's CI before any native run net10.0
Valheim.Testing.NativeSmoke (reference) valheim-test: one-command disposable mod-load checks, A/B mod isolation, an editable NuGet-only consumer project, and the environment commands (env, session check) .NET 10 tool

The dependency goes ValheimTesting → ValheimCLI, never the reverse: the game-side extension API stays in ValheimCLI, and a mod keeps its own adapter and scenarios. No test package belongs in a production mod or a player's plugin folder. Valheim.Testing.Cli is ValheimCLI's transport packaged by this repository from the fork commit cli-dependency.json pins, not an official ValheimCLI release. Preview APIs may change; the candidate API reference inventories them for the stable-contract review.

Test layers

  1. Unit: real mod decisions against small declared inputs and the doubles. Broad and fast.
  2. Integration: scenario drivers, adapters and fixtures against scripted replies and fake processes.
  3. Bounded game checks: a few zones on a disposable server and client; save, restart and replication when those boundaries change.
  4. Human judgement: a short look or walk when appearance or usability matters.

Synthetic inputs are not Valheim's generator, a replay of a capture is not independent evidence of the game, and an incomplete observation fails rather than reading as zero.

Contribute

Mod developers and coding agents are welcome. CONTRIBUTING.md has repository ownership, a worked fixture example, local checks (sh scripts/validate.sh on macOS/Linux; the bootstrap entrypoint then dotnet run scripts/validate.cs on Windows; no game) and PR expectations. Agents start with AGENTS.md and the agent workflow. Before a native run, read the runtime hygiene checklist.

License

MIT, copyright © 2026 Tys von Gaza. See LICENSE. Attribution for imported and adapted code is retained in THIRD-PARTY-NOTICES.md and PROVENANCE.md; both license files are included in the library packages.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Valheim.Testing.Game:

Package Downloads
Valheim.Testing.GameSessions

Game sessions for Valheim mod tests: one or more real game processes in roles (dedicated server, clients, a hosting client) on this machine or on others reached over SSH or a container, with an environment inventory, host locks, Steam-account leases, a run journal and recovery. Built on Valheim.Testing.Game. Unofficial community tooling; not affiliated with or endorsed by Iron Gate or Coffee Stain. Valheim is a trademark of Iron Gate AB.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 48 10/14/2026
0.1.0-rc.1 41 10/14/2026
0.1.0-preview.62 54 10/12/2026
0.1.0-preview.59 60 10/12/2026
0.1.0-preview.57 60 10/11/2026
0.1.0-preview.55 65 10/10/2026
0.1.0-preview.52 997 10/8/2026
0.1.0-preview.51 154 10/8/2026
0.1.0-preview.45 416 10/8/2026
0.1.0-preview.44 254 10/7/2026
0.1.0-preview.43 198 10/6/2026
0.1.0-preview.42 282 10/6/2026
0.1.0-preview.41 1,811 10/4/2026
0.1.0-preview.20 263 10/2/2026
0.1.0-preview.19 80 10/2/2026
0.1.0-preview.18 54 10/1/2026
0.1.0-preview.17 1,508 10/1/2026
0.1.0-preview.16 4,977 10/1/2026
0.1.0-preview.15 59 10/1/2026
0.1.0-preview.14 63 9/30/2026
Loading failed