Valheim.Testing.Adapter
0.1.0
dotnet add package Valheim.Testing.Adapter --version 0.1.0
NuGet\Install-Package Valheim.Testing.Adapter -Version 0.1.0
<PackageReference Include="Valheim.Testing.Adapter" Version="0.1.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Valheim.Testing.Adapter" Version="0.1.0" />
<PackageReference Include="Valheim.Testing.Adapter"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Valheim.Testing.Adapter --version 0.1.0
#r "nuget: Valheim.Testing.Adapter, 0.1.0"
#:package Valheim.Testing.Adapter@0.1.0
#addin nuget:?package=Valheim.Testing.Adapter&version=0.1.0
#tool nuget:?package=Valheim.Testing.Adapter&version=0.1.0
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
- Install the .NET 10 SDK (Visual Studio 2026 brings it) on the PC where you build your mod.
- Copy ModWithTests beside your mod: a test project that links your mod's real source files and references
Valheim.Testing.Doublesfrom NuGet.org. - 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.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 59 | 10/14/2026 |
| 0.1.0-rc.1 | 39 | 10/14/2026 |
| 0.1.0-preview.9 | 59 | 10/11/2026 |
| 0.1.0-preview.8 | 56 | 10/10/2026 |
| 0.1.0-preview.7 | 75 | 10/8/2026 |
| 0.1.0-preview.6 | 75 | 10/6/2026 |
| 0.1.0-preview.5 | 62 | 10/4/2026 |
| 0.1.0-preview.3 | 85 | 10/1/2026 |
| 0.1.0-preview.2 | 79 | 9/30/2026 |
| 0.1.0-preview.1 | 78 | 9/29/2026 |