docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ITestRunCallback

    Interface for getting callsbacks on test progress directly from NUnit. This is available both in the editor and directly in the runtime. It is registered by using TestRunCallbackAttribute.

    Namespace: UnityEngine.TestRunner
    Assembly: UnityEngine.TestRunner.dll
    Syntax
    public interface ITestRunCallback

    Methods

    RunFinished(ITestResult)

    A callback invoked when a test run is finished.

    Declaration
    void RunFinished(ITestResult testResults)
    Parameters
    Type Name Description
    ITestResult testResults

    The result of the test run.

    RunStarted(ITest)

    A callback invoked when a test run is started.

    Declaration
    void RunStarted(ITest testsToRun)
    Parameters
    Type Name Description
    ITest testsToRun

    The full loaded test tree.

    TestFinished(ITestResult)

    A callback invoked when each individual node of the test tree has finished executing.

    Declaration
    void TestFinished(ITestResult result)
    Parameters
    Type Name Description
    ITestResult result

    The result of the test tree node after it had been executed.

    TestStarted(ITest)

    A callback invoked when each individual node of the test tree has started executing.

    Declaration
    void TestStarted(ITest test)
    Parameters
    Type Name Description
    ITest test

    The test node currently executed.

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