Valheim.Testing 0.3.0

dotnet add package Valheim.Testing --version 0.3.0
                    
NuGet\Install-Package Valheim.Testing -Version 0.3.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.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Valheim.Testing" Version="0.3.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.3.0
                    
#r "nuget: Valheim.Testing, 0.3.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.3.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.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Valheim.Testing&version=0.3.0
                    
Install as a Cake Tool

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.

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.3.0 62 10/24/2026
0.2.0 174 10/21/2026
0.1.0 453 10/14/2026
0.1.0-rc.1 99 10/14/2026
0.1.0-preview.14 1,518 10/10/2026
0.1.0-preview.13 2,637 10/6/2026
0.1.0-preview.12 1,847 10/4/2026
0.1.0-preview.7 8,124 9/30/2026
0.1.0-preview.6 1,438 9/29/2026
0.1.0-preview.5 66 9/28/2026