Packages

Release 0.1.0 from source 2204f554da12. The versions below are the ones recorded at this source revision; this release's packages are on NuGet.org.

Every ValheimTesting package, its newest released version and its use. toolkit-versions.json records the versions. Every snippet in these docs pins exactly these versions.

Pin

Package Version Use
Valheim.Testing.Doubles 0.1.0-rc.1 Unity, Valheim, BepInEx and Jotunn doubles as source for a unit-test project (page)
Valheim.Testing 0.1.0-rc.1 Declared terrain, zone state, recorded-input replay and StaticOverride; no game (page)
Valheim.Testing.Game 0.1.0-rc.1 One game process from outside: observations, owned sessions, reports (page)
Valheim.Testing.GameSessions 0.1.0-rc.1 A dedicated server, clients and hosted worlds as one run (page)
Valheim.Testing.Adapter 0.1.0-rc.1 Source for a mod's game-side test adapter plugin (page)
Valheim.Testing.Bindings 0.1.0-rc.1 Offline check that a built mod still binds to the game assemblies (page)
Valheim.Testing.Bindings.Tool 0.1.0-rc.1 The same check as the valheim-bindings .NET tool (page)
Valheim.Testing.Cli 0.1.0-rc.1 ValheimCLI's client transport; the Game package depends on it (page)
Valheim.Testing.NativeSmoke 0.1.0-rc.1 valheim-test: one-command native load checks (page)

For a unit-test project that links your mod's sources:

<PackageReference Include="Valheim.Testing.Doubles" Version="[0.1.0-rc.1]" PrivateAssets="all" />

For a unit-test project whose code is already free of Unity types:

<PackageReference Include="Valheim.Testing" Version="[0.1.0-rc.1]" />

For a separate system-test project that drives the real game. Add the second line for a game session, which is a server and clients as one run:

<PackageReference Include="Valheim.Testing.Game" Version="[0.1.0-rc.1]" />
<PackageReference Include="Valheim.Testing.GameSessions" Version="[0.1.0-rc.1]" />

For a game-side test adapter plugin, which compiles the adapter source:

<PackageReference Include="Valheim.Testing.Adapter" Version="[0.1.0-rc.1]" PrivateAssets="all" />

For a test that checks a built mod DLL against the game's assemblies in code:

<PackageReference Include="Valheim.Testing.Bindings" Version="[0.1.0-rc.1]" />

For the two tools:

dotnet tool install Valheim.Testing.Bindings.Tool --version 0.1.0-rc.1 --tool-path .tools
dotnet tool install Valheim.Testing.NativeSmoke --version 0.1.0-rc.1 --global

The first command installs valheim-bindings into .tools for your mod's CI job. The second installs valheim-test globally for native checks.

Brackets mean an exact NuGet version, so a new release cannot change a passing build. Move a pin on purpose, in its own change.

Limits

  • Test packages belong in test projects. Never ship them in a production mod or a player's plugins folder.
  • Pure helpers target netstandard2.0. External game tools and examples target net10.0.
  • To test against an unpublished build, see Try an unpublished build in a mod.