{!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} Namespace UnityEditor.TestTools.TestRunner.Api | Test Framework | 2.0.1-exp.2
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Namespace UnityEditor.TestTools.TestRunner.Api

    Classes

    CustomRunnerBase

    ExecutionSettings

    A set of execution settings defining how to run tests, using the TestRunnerApi.

    Filter

    The filter class provides the TestRunnerApi with a specification of what tests to run when running tests programmatically.

    RunnerNotFoundException

    Exception for if a runner with a given guid could not be found.

    TestRunnerApi

    The TestRunnerApi retrieves and runs tests programmatically from code inside the project, or inside other packages. TestRunnerApi is a ScriptableObject. You can initialize the API like this:

    var testRunnerApi = ScriptableObject.CreateInstance<TestRunnerApi>();

    You can subscribe and receive test results in one instance of the API, even if the run starts from another instance. The TestRunnerApi supports the following workflows:

    • Running tests programmatically
    • Gettting test results
    • Retrieving the list of tests

    Note: Non-static methods in this class will become obsolete in future versions so you should use the static methods (e.g. RegisterTestCallback, ExecuteTestRun) rather than their non-static equivalents (e.g. RegisterCallbacks, Execute).

    Interfaces

    ICallbacks

    Callbacks in the TestRunnerApi for the test stages when running tests.

    IErrorCallbacks

    An extended version of the ICallbacks, which get invoked if the test run fails due to a build error or if any IPrebuildSetup has a failure.

    ITestAdaptor

    ITestAdaptor is a representation of a node in the test tree implemented as a wrapper around the NUnit ITest interface.

    ITestResultAdaptor

    The ITestResultAdaptor�is the representation of the test results for a node in the test tree implemented as a wrapper around the NUnit ITest interface.

    ITestRunSettings

    ITestRunSettings lets you set any of the global settings right before building a Player for a test run and then reverts the settings afterward. ITestRunSettings implements IDisposable, and runs after building the Player with tests.

    Enums

    AssemblyType

    Enum flags indicating if an assembly is editor only or if the assembly supports both editor and platforms.

    RunState

    The RunState enum indicates whether a test can be executed.

    TestMode

    A flag indicating whether to run Edit Mode or Play Mode tests.

    TestStatus

    The TestStatus enum indicates the test result status.

    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)