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
Syntax
public interface ITestAdaptor
Properties
Arguments
The array of arguments that the test method/fixture will be invoked with.
Declaration
object[] Arguments { get; }
Property Value
| Type | Description |
|---|---|
| Object[] |
AssemblyType
An enum flag that filters whether the assembly of the test is in an editor only assembly or if it is in an assembly that also supports one or more platforms.
Declaration
AssemblyType AssemblyType { get; }
Property Value
| Type | Description |
|---|---|
| AssemblyType |
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 |
|---|---|
| Int32 |
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 |
|---|---|
| Boolean |
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 |
|---|---|
| Boolean |
IsTestAssembly
Returns true if the node represents a test assembly, false otherwise.
Declaration
bool IsTestAssembly { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Method
The Nunit
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 |
RequiresPlayMode
If the test explicitly requires playmode.
Declaration
bool? RequiresPlayMode { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<Boolean> |
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 |
|---|---|
| Int32 |
TestCaseTimeout
The test case timeout in milliseconds. Note that this value is only available on TestFinished.
Declaration
int TestCaseTimeout { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
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
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 |