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.
Namespace: UnityEditor.TestTools.TestRunner.Api
Syntax
public interface ITestResultAdaptor
Properties
AssertCount
The number of asserts executed when running the test and all its children.
Declaration
int AssertCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Children
Gets the the collection of child results.
Declaration
IEnumerable<ITestResultAdaptor> Children { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ITestResultAdaptor> |
Duration
Gets the elapsed time for running the test in seconds
Declaration
double Duration { get; }
Property Value
| Type | Description |
|---|---|
| Double | Time in seconds. |
EndTime
Gets or sets the time the test finished running.
Declaration
DateTime EndTime { get; }
Property Value
| Type | Description |
|---|---|
| DateTime | A DataTime object. |
FailCount
The number of test cases that failed when running the test and all its children.
Declaration
int FailCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
FullName
Gets the full name of the test result
Declaration
string FullName { get; }
Property Value
| Type | Description |
|---|---|
| String | The name of the test result. |
HasChildren
Accessing HasChildren should not force creation of the Children collection in classes implementing this interface.
Declaration
bool HasChildren { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | True if this result has any child results. |
InconclusiveCount
The number of test cases that were inconclusive when running the test and all its children.
Declaration
int InconclusiveCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Message
The message associated with a test failure or with not running the test
Declaration
string Message { get; }
Property Value
| Type | Description |
|---|---|
| String |
Name
The name of the test node.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Output
Gets any text output written to this result.
Declaration
string Output { get; }
Property Value
| Type | Description |
|---|---|
| String |
PassCount
The number of test cases that passed when running the test and all its children.
Declaration
int PassCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
ResultState
Gets the state of the result as a string.
Declaration
string ResultState { get; }
Property Value
| Type | Description |
|---|---|
| String | It returns one of these values: |
SkipCount
The number of test cases that were skipped when running the test and all its children.
Declaration
int SkipCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
StackTrace
Any stacktrace associated with an error or failure. Not available in the Compact Framework 1.0.
Declaration
string StackTrace { get; }
Property Value
| Type | Description |
|---|---|
| String |
StartTime
Gets or sets the time the test started running.
Declaration
DateTime StartTime { get; }
Property Value
| Type | Description |
|---|---|
| DateTime | A DataTime object. |
Test
The test details of the test result tree node as a UnityEditor.TestTools.TestRunner.Api.TestAdaptor
Declaration
ITestAdaptor Test { get; }
Property Value
| Type | Description |
|---|---|
| ITestAdaptor |
TestStatus
Gets the status of the test as an enum.
Declaration
TestStatus TestStatus { get; }
Property Value
| Type | Description |
|---|---|
| TestStatus | It returns one of these values: |
Methods
ToXml()
Use this to save the results to an XML file
Declaration
TNode ToXml()
Returns
| Type | Description |
|---|---|
| TNode | The test results as an |