Table of Contents

Interface ITestListener

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

The ITestListener interface is used internally to receive notifications of significant events while a test is being run. The events are propagated to clients by means of an AsyncCallback. NUnit extensions may also monitor these events.

public interface ITestListener

Methods

SendMessage(TestMessage)

Called when a test produces a message to be sent to listeners

void SendMessage(TestMessage message)

Parameters

message TestMessage

A TestMessage object containing the text to send

TestFinished(ITestResult)

Called when a test has finished

void TestFinished(ITestResult result)

Parameters

result ITestResult

The result of the test

TestOutput(TestOutput)

Called when a test produces output for immediate display

void TestOutput(TestOutput output)

Parameters

output TestOutput

A TestOutput object containing the text to display

TestStarted(ITest)

Called when a test has just started

void TestStarted(ITest test)

Parameters

test ITest

The test that is starting