docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Graphics Test Framework sample projects

    Learn the structure of a project that uses the Graphics Test Framework.

    Prerequisites

    To use the sample projects, install the Graphics Test Framework package in your project.

    Initial setup

    1. From the main menu, select Window > Package Manager to open the Package Manager window.
    2. Select All Packages then Graphics Test Framework.
    3. Select the Samples tab.
    4. Select Import next to a sample.

    Unity installs samples in the Assets/Samples/Graphics Test Framework/<version>/ folder in the Project window.

    Write a basic test

    Open the scripts in the Basic Graphics Tests folder for simple examples of [GraphicsTest] and [SceneGraphicsTest] tests. For more information, refer to Write a scene test and Write a rendering code test.

    Write a parameterized test

    Open the scripts in the Parameterized Tests folder for examples of parameterized tests with [GraphicsTestParam] and [GraphicsTestParamSource] attributes. For more information, refer to Write a scene test.

    Customize image comparison

    Open the scripts in the Image Comparison Examples folder for examples of using ImageComparisonSettings to configure different comparison algorithms and thresholds. For more information, refer to Customize tests.

    Filter tests by platform

    Open the scripts in the Platform Filtering Examples folder for examples of ignoring tests using [IgnoreGraphicsTest], [TestNotSupportedOn], and [TestOnlySupportedOn] attributes. For more information, refer to Test specific platforms.

    Capture a Unity Editor window

    Open the scripts in the Editor Window Capture folder for examples of using EditorWindowCapture to capture Editor windows and the Scene view. For more information, refer to Write a Unity Editor window test.

    Advanced use cases

    Open the scripts in the Advanced Patterns folder for examples of advanced use cases, such as custom test case sources, custom pre-build setup attributes, GlobalContext, custom IPlatformNode implementations, and the GraphicsTestLogger. For more information, refer to Run code before a test and Customize tests.

    Additional resources

    • Write a scene test
    • Write a shader test
    • Graphics Tests window reference
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)