Valheim.Testing 0.1.0

dotnet add package Valheim.Testing --version 0.1.0
                    
NuGet\Install-Package Valheim.Testing -Version 0.1.0
                    
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" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Valheim.Testing" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Valheim.Testing" />
                    
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 --version 0.1.0
                    
#r "nuget: Valheim.Testing, 0.1.0"
                    
#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@0.1.0
                    
#: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&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Valheim.Testing&version=0.1.0
                    
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 and macOS hosts (game clients) and Windows, macOS and Linux hosts (dedicated servers).

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 Choose a test layer picks the layer for each behaviour, Get started runs your first test, package versions lists every package and pin, 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

Unit, integration, bounded game checks and human judgement: Choose a test layer matches each behaviour to a layer and says what that layer cannot prove.

Contribute

Mod developers and coding agents are welcome. CONTRIBUTING.md has repository ownership, a worked fixture example, local checks (dotnet run scripts/bootstrap-cli.cs, then dotnet run scripts/validate.cs, on every OS; no game) and PR expectations. Agents start with AGENTS.md and the agent workflow. Before a native run, read the native-run 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 net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

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

Package Downloads
Valheim.Testing.Game

Fixtures and typed assertions for Valheim integration tests using the shared CLI transport. Unofficial community tooling; not affiliated with or endorsed by Iron Gate or Coffee Stain. Valheim is a trademark of Iron Gate AB.

Valheim.Testing.Doubles

Source-only doubles of the Unity, Valheim, BepInEx and Jotunn types a mod's pure-logic sources use, so those sources compile and run in an ordinary test project without the game. Every type is partial; mods add the members they need. 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 280 10/14/2026
0.1.0-rc.1 77 10/14/2026
0.1.0-preview.14 1,499 10/10/2026
0.1.0-preview.13 2,607 10/6/2026
0.1.0-preview.12 1,841 10/4/2026
0.1.0-preview.7 7,971 9/30/2026
0.1.0-preview.6 1,435 9/29/2026
0.1.0-preview.5 63 9/28/2026