Valheim.Testing.Doubles 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Valheim.Testing.Doubles --version 0.2.0
                    
NuGet\Install-Package Valheim.Testing.Doubles -Version 0.2.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.Doubles" Version="0.2.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Valheim.Testing.Doubles" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Valheim.Testing.Doubles">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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.Doubles --version 0.2.0
                    
#r "nuget: Valheim.Testing.Doubles, 0.2.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.Doubles@0.2.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.Doubles&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Valheim.Testing.Doubles&version=0.2.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.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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 99 10/24/2026
0.2.0 131 10/21/2026
0.1.0 392 10/14/2026
0.1.0-rc.1 85 10/14/2026
0.1.0-preview.15 1,460 10/10/2026
0.1.0-preview.14 1,343 10/8/2026
0.1.0-preview.13 162 10/7/2026
0.1.0-preview.12 184 10/6/2026
0.1.0-preview.11 912 10/4/2026
0.1.0-preview.8 143 10/2/2026
0.1.0-preview.7 1,414 10/1/2026
0.1.0-preview.6 270 9/30/2026
0.1.0-preview.5 226 9/30/2026
0.1.0-preview.4 1,440 9/29/2026