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
Assembly: UnityEditor.TestRunner.dll
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 |
---|---|
int |
Children
Gets the the collection of child results.
Declaration
IEnumerable<ITestResultAdaptor> Children { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ITest |
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 |
---|---|
Date |
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 |
---|---|
int |
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 |
---|---|
bool | 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 |
---|---|
int |
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 |
---|---|
int |
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 |
---|---|
int |
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 |
---|---|
Date |
A DataTime object. |
Test
The test details of the test result tree node as a Test
Declaration
ITestAdaptor Test { get; }
Property Value
Type | Description |
---|---|
ITest |
TestStatus
Gets the status of the test as an enum.
Declaration
TestStatus TestStatus { get; }
Property Value
Type | Description |
---|---|
Test |
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 |