Valheim.Testing.Adapter
0.3.0
dotnet add package Valheim.Testing.Adapter --version 0.3.0
NuGet\Install-Package Valheim.Testing.Adapter -Version 0.3.0
<PackageReference Include="Valheim.Testing.Adapter" Version="0.3.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Valheim.Testing.Adapter" Version="0.3.0" />
<PackageReference Include="Valheim.Testing.Adapter"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Valheim.Testing.Adapter --version 0.3.0
#r "nuget: Valheim.Testing.Adapter, 0.3.0"
#:package Valheim.Testing.Adapter@0.3.0
#addin nuget:?package=Valheim.Testing.Adapter&version=0.3.0
#tool nuget:?package=Valheim.Testing.Adapter&version=0.3.0
ValheimTesting
Test what your Valheim mod does in the game. Start with a small action and an independent assertion, then reuse that scenario to protect a fix.
The marker example asks the mod to place a pole, then counts its saved objects. Selected action and assertion lines from Scenario.cs:
var reply = host.Execute("examplemod_mark " + At());
round.Step("exactly one marker stands there in the host's saved objects", () => RequireMarkers(host, x, z, ExpectedMarkers));
ExpectedMarkers is 1. A captured run records "first: exactly one marker stands there in the host's saved objects" with Passed: true. The unchanged assertion also catches a command that reports success without creating a pole.
Run your first gameplay assertion: the complete source, files to edit, tested command and failure result.
Choose your task
| You want to | Start here |
|---|---|
| Test your mod's gameplay in Valheim | Your first gameplay assertion |
| Test a decision quickly, without the game | Get started |
| Keep a fixed bug from returning | Run an A/B regression |
A load check proves that plugins start and enter a world. Gameplay checks need their own action and assertion.
First test in three steps
Follow Get started for the offline example and its copy map. You need no toolkit clone or bootstrap.
Native runs need a supported host: game clients on Windows and macOS, dedicated servers on Windows, macOS and Linux (platforms); the gameplay tutorial is written for Windows. New to BepInEx and Harmony? Read the community wiki's overview. A plugin that will not load, or two mods that conflict: the debugging guide.
Packages
Package versions lists every package, exact pin and reference link. Keep test packages in test projects, outside a player's plugin folder. The dependency goes ValheimTesting → ValheimCLI, never the reverse: a mod keeps its own adapter and scenarios. Preview APIs may change; see compatibility.
Test layers
Choose a test layer explains what unit tests, scripted integration, native checks and human review each prove. The example index shows the marker at those layers.
Contribute
Read CONTRIBUTING.md to change the toolkit; coding agents changing it start with AGENTS.md. To have your coding agent test your mod, give it the workflow.
Unofficial community tooling; not affiliated with or endorsed by Iron Gate or Coffee Stain. Valheim is a trademark of Iron Gate AB.
Credits
ValheimTesting is built on ValheimCLI, created by Warpalicious (Thunderstore) and licensed MIT. Every native check talks to the game through ValheimCLI: its in-game plugin runs the commands, and its client transport, which ships as Valheim.Testing.Cli, sends them. This project uses a pinned fork, tvongaza/valheimCLI, which adds the commands and packs the toolkit needs. Thank you, Warpalicious, for building and sharing it.
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.3.0 | 45 | 10/24/2026 |
| 0.2.0 | 87 | 10/21/2026 |
| 0.1.0 | 100 | 10/14/2026 |
| 0.1.0-rc.1 | 56 | 10/14/2026 |
| 0.1.0-preview.9 | 73 | 10/11/2026 |
| 0.1.0-preview.8 | 73 | 10/10/2026 |
| 0.1.0-preview.7 | 88 | 10/8/2026 |
| 0.1.0-preview.6 | 89 | 10/6/2026 |
| 0.1.0-preview.5 | 75 | 10/4/2026 |
| 0.1.0-preview.3 | 97 | 10/1/2026 |
| 0.1.0-preview.2 | 90 | 9/30/2026 |
| 0.1.0-preview.1 | 88 | 9/29/2026 |