Skip to main content

Udon Test Kit

Udon Test Kit lets you write automated tests for a VRChat world with Unity Test Framework. Play Mode tests run your UdonSharp behaviours in a real ClientSim session, with real players.

Why test your world​

An automated test is a small piece of code that runs part of your world and checks the result, such as that a door opens only for the player who owns it. Unity runs these tests with its Unity Test Framework, either in the Editor (Edit Mode) or with the game running (Play Mode).

Once written, tests run again whenever you ask, all at once. A change that breaks something shows up right away, before you upload the world, and you can change your code without worrying about breaking something you aren't looking at. That matters most for what's hardest to check by playing on your own: several players, who owns what, and data that has to survive a rejoin. The Unity testing and quality assurance tips go into more depth.

What you can do with it​

  • Spawn and remove players, and choose who is the master.
  • Give any GameObject an owner, to test what a player who doesn't own it sees.
  • Keep saved data between sessions, like a player who leaves and rejoins.
  • Record the calls your code makes by name, such as with SendCustomEvent.
  • Run each test in a scene of its own, empty or your world's.
  • Create the test assemblies your world needs from one menu item.

The kit only compiles for tests, so nothing from it ends up in your world's build.

It also includes Invoke-UnityTests.ps1, a standalone PowerShell script that runs a project's tests in one command and prints only what failed. It works in any Unity project, with or without the kit.

Get started​

  1. Add Udon Test Kit to your project
  2. Write your first test

Common tasks​

Reference and background​