{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Workflow: How to create a new test assembly | Test Framework | 1.0.18
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Workflow: How to create a new test assembly

    Unity Test Framework looks for a test inside any assembly that references NUnit. We refer to such assemblies as TestAssemblies. The Test Runner UI can help you set up TestAssemblies. Play Mode and Edit Mode tests need to be in separate assemblies.

    In the Test Runner window, you will see an EditMode tab enabled by default, as well as a Create EditMode Test Assembly Folder button.

    Test Runner window EditMode tab

    Click the button to create a Tests folder with a respective .asmdef file by default. Change the name of the new Assembly Definition, if necessary, and press Enter to accept it.

    New Test folder and assembly file

    In the Inspector window, it should have references to nunit.framework.dll*,* UnityEngine.TestRunner, and UnityEditor.TestRunner assemblies, as well as Editor preselected as a target platform.

    Note: The UnityEditor.TestRunner reference is only available for Edit Mode tests.

    Assembly definition import settings

    In This Article
    Back to top
    Copyright © 2023 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)