{!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 run a Play Mode test in player | Test Framework | 1.1.33
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Workflow: How to run a Play Mode test in player

    If you run a Play Mode test in the same way as an Editor test, it runs inside the Unity Editor. You can also run Play Mode tests on specific platforms. Click Run all in the player to build and run your tests on the currently active target platform.

    Run PlayMode test in player

    Note: Your current platform displays in brackets on the button. For example, in the image above, the button reads Run all in player (StandaloneWindows), because the current platform is Windows. The target platform is always the current Platform selected in Build Settings (menu: File > Build Settings).

    The test result displays in the build once the test completes:

    Results of PlayMode in player test run

    The application running on the platform reports back the test results to the Editor UI then displays the executed tests and shuts down. To make sure you receive the test results from the Player on your target platform back into the Editor that’s running the test, both should be on the same network.

    Note: Some platforms do not support shutting down the application with Application.Quit, so it will continue running after reporting the test results.

    If Unity cannot instantiate the connection, you can see the tests succeed in the running application. Running tests on platforms with arguments, in this state, does not provide XML test results.

    For more information, see Edit Mode vs Play Mode tests.

    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)