Writing graphics tests
Create graphics tests and shader tests to validate rendering output in your Unity project.
| Topic | Description |
|---|---|
| Write a scene test | Write a graphics test that compares a scene to a reference image. |
| Write a rendering code test | Write a graphics test where you render into a texture, then compare the texture to a reference image. |
| Write a Unity Editor window test | To test UI rendering and custom Unity Editor windows, write a test that captures the Unity Editor interface. |
| Write a shader test | To test shaders without rendering a full scene, create tests that check ShaderLab and HLSL. |
| Run a test for the first time | Before you can use a test in your test suite, run it once to generate a reference image that future tests compare against. |
| Run a test and check the results | After you run a test for the first time to create a reference image, run the test again when you want to check for changes. |