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
Arguments
The array of arguments that the test method/fixture will be invoked with.
Declaration
object[] Arguments { get; }
Property Value
Type | Description |
---|---|
object[] |
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<ITest |
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.
Declaration
IMethodInfo Method { get; }
Property Value
Type | Description |
---|---|
IMethod |
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 |
---|---|
ITest |
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 |
---|---|
Run |
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 |
---|---|
Test |
TypeInfo
The type of test class as an NUnit
NUnit.
Declaration
ITypeInfo TypeInfo { get; }
Property Value
Type | Description |
---|---|
IType |
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 |