Table of Contents

Interface ITestResult

Namespace
NUnit.Framework.Interfaces
Assembly
nunit.framework.dll

The ITestResult interface represents the result of a test.

public interface ITestResult : IXmlNodeBuilder
Inherited Members

Properties

AssertCount

Gets the number of asserts executed when running the test and all its children.

int AssertCount { get; }

Property Value

int

Children

Gets the the collection of child results.

IList<ITestResult> Children { get; }

Property Value

IList<ITestResult>

Duration

Gets the elapsed time for running the test

TimeSpan Duration { get; }

Property Value

TimeSpan

EndTime

Gets or sets the time the test finished running.

DateTime EndTime { get; }

Property Value

DateTime

FailCount

Gets the number of test cases that failed when running the test and all its children.

int FailCount { get; }

Property Value

int

FullName

Gets the full name of the test result

string FullName { get; }

Property Value

string

HasChildren

Indicates whether this result has any child results. Accessing HasChildren should not force creation of the Children collection in classes implementing this interface.

bool HasChildren { get; }

Property Value

bool

InconclusiveCount

Gets the number of test cases that were inconclusive when running the test and all its children.

int InconclusiveCount { get; }

Property Value

int

Message

Gets the message associated with a test failure or with not running the test

string Message { get; }

Property Value

string

Name

Gets the name of the test result

string Name { get; }

Property Value

string

Output

Gets any text output written to this result.

string Output { get; }

Property Value

string

PassCount

Gets the number of test cases that passed when running the test and all its children.

int PassCount { get; }

Property Value

int

ResultState

Gets the ResultState of the test result, which indicates the success or failure of the test.

ResultState ResultState { get; }

Property Value

ResultState

SkipCount

Gets the number of test cases that were skipped when running the test and all its children.

int SkipCount { get; }

Property Value

int

StackTrace

Gets any stacktrace associated with an error or failure. Not available in the Compact Framework 1.0.

string StackTrace { get; }

Property Value

string

StartTime

Gets or sets the time the test started running.

DateTime StartTime { get; }

Property Value

DateTime

Test

Gets the Test to which this result applies.

ITest Test { get; }

Property Value

ITest