docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ITestAdaptor

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

    Namespace: UnityEditor.TestTools.TestRunner.Api
    Assembly: UnityEditor.TestRunner.dll
    Syntax
    public interface ITestAdaptor

    Properties

    Categories

    An array of the categories applied to the test or fixture.

    Declaration
    string[] Categories { get; }
    Property Value
    Type Description
    string[]

    ChildIndex

    The child index of the node in its parent.

    Declaration
    int ChildIndex { get; }
    Property Value
    Type Description
    int

    Children

    The child nodes.

    Declaration
    IEnumerable<ITestAdaptor> Children { get; }
    Property Value
    Type Description
    IEnumerable<ITestAdaptor>

    Description

    The description of the test.

    Declaration
    string Description { get; }
    Property Value
    Type Description
    string

    FullName

    The full name of the test. E.g., MyNamespace.MyTestClass.MyTest.

    Declaration
    string FullName { get; }
    Property Value
    Type Description
    string

    HasChildren

    Whether the node has any children.

    Declaration
    bool HasChildren { get; }
    Property Value
    Type Description
    bool

    Id

    The ID of the test tree node. The ID can change if you add new tests to the suite. Use UniqueName, if you want to have a more permanent point of reference.

    Declaration
    string Id { get; }
    Property Value
    Type Description
    string

    IsSuite

    True if the node is a test suite/fixture, false otherwise.

    Declaration
    bool IsSuite { get; }
    Property Value
    Type Description
    bool

    IsTestAssembly

    Returns true if the node represents a test assembly, false otherwise.

    Declaration
    bool IsTestAssembly { get; }
    Property Value
    Type Description
    bool

    Method

    The Nunit NUnit.Framework.Interfaces.IMethodInfo of the test method. If the node is not a test method, then the value is null.

    Declaration
    IMethodInfo Method { get; }
    Property Value
    Type Description
    IMethodInfo

    Name

    The name of the test. E.g.,MyTest.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string

    Parent

    The parent node, if any.

    Declaration
    ITestAdaptor Parent { get; }
    Property Value
    Type Description
    ITestAdaptor

    ParentFullName

    The full name of the parent node.

    Declaration
    string ParentFullName { get; }
    Property Value
    Type Description
    string

    ParentId

    The ID of the parent node.

    Declaration
    string ParentId { get; }
    Property Value
    Type Description
    string

    ParentUniqueName

    A unique name of the parent node. E.g., Tests.dll/MyNamespace/[Tests][MyNamespace.MyTestClass][suite].

    Declaration
    string ParentUniqueName { get; }
    Property Value
    Type Description
    string

    RunState

    The run state of the test node. Either NotRunnable, Runnable, Explicit, Skipped, or Ignored.

    Declaration
    RunState RunState { get; }
    Property Value
    Type Description
    RunState

    SkipReason

    The skip reason. E.g., if ignoring the test.

    Declaration
    string SkipReason { get; }
    Property Value
    Type Description
    string

    TestCaseCount

    The total number of test cases in the node and all sub-nodes.

    Declaration
    int TestCaseCount { get; }
    Property Value
    Type Description
    int

    TestCaseTimeout

    The test case timeout in milliseconds. Note that this value is only available on TestFinished.

    Declaration
    int TestCaseTimeout { get; }
    Property Value
    Type Description
    int

    TestMode

    The mode of the test. Either Edit Mode or Play Mode.

    Declaration
    TestMode TestMode { get; }
    Property Value
    Type Description
    TestMode

    TypeInfo

    The type of test class as an NUnit NUnit.Framework.Interfaces.ITypeInfo. If the node is not a test class, then the value is null.

    Declaration
    ITypeInfo TypeInfo { get; }
    Property Value
    Type Description
    ITypeInfo

    UniqueName

    A unique generated name for the test node. E.g., Tests.dll/MyNamespace/MyTestClass/[Tests][MyNamespace.MyTestClass.MyTest].

    Declaration
    string UniqueName { get; }
    Property Value
    Type Description
    string
    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)