Valheim.Testing.Game
0.1.0-preview.43
See the version list below for details.
dotnet add package Valheim.Testing.Game --version 0.1.0-preview.43
NuGet\Install-Package Valheim.Testing.Game -Version 0.1.0-preview.43
<PackageReference Include="Valheim.Testing.Game" Version="0.1.0-preview.43" />
<PackageVersion Include="Valheim.Testing.Game" Version="0.1.0-preview.43" />
<PackageReference Include="Valheim.Testing.Game" />
paket add Valheim.Testing.Game --version 0.1.0-preview.43
#r "nuget: Valheim.Testing.Game, 0.1.0-preview.43"
#:package Valheim.Testing.Game@0.1.0-preview.43
#addin nuget:?package=Valheim.Testing.Game&version=0.1.0-preview.43&prerelease
#tool nuget:?package=Valheim.Testing.Game&version=0.1.0-preview.43&prerelease
ValheimTesting
Reusable test inputs, fixtures and assertions for Valheim mods. Most tests run without Valheim, Unity, Steam or a dedicated server; the few that need the game drive it through ValheimCLI, on the same Windows PC where you play.
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 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 an owned server and client on one Windows PC. Other hosts 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.
Packages
Each package's page is its reference: what it is for, the types a test calls, how it fails and its limits.
| Package (reference page) | Purpose | Runtime |
|---|---|---|
Valheim.Testing |
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 |
One game process from outside: typed observations, fixtures, owned server and client sessions, comparisons and JSON/JUnit reports | net10.0 |
Valheim.Testing.GameSessions |
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 |
ValheimCLI's client transport and YAML runner, packaged unchanged from pinned ValheimCLI source (MIT, warp) | net10.0 |
Valheim.Testing.Adapter |
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 |
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 |
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 |
The same check as the valheim-bindings .NET tool, for a mod's CI before any native run |
net10.0 |
Valheim.Testing.NativeSmoke |
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: real mod decisions against small declared inputs and the doubles. Broad and fast.
- Integration: scenario drivers, adapters and fixtures against scripted replies and fake processes.
- Bounded game checks: a few zones on a disposable server and client; save, restart and replication when those boundaries change.
- 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 (dotnet run scripts/bootstrap-cli.cs, then dotnet run scripts/validate.cs; 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 | Versions 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. |
-
net10.0
- Valheim.Testing (>= 0.1.0-preview.13)
- Valheim.Testing.Cli (= 0.1.0-preview.8)
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 | 59 | 10/14/2026 |
| 0.1.0-rc.1 | 45 | 10/14/2026 |
| 0.1.0-preview.62 | 57 | 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 | 265 | 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 | 5,022 | 10/1/2026 |
| 0.1.0-preview.15 | 59 | 10/1/2026 |
| 0.1.0-preview.14 | 63 | 9/30/2026 |