Table of Contents

Method InvokeTest

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

InvokeTest(TContext, object?)

Invokes the test method and returns the amount of time spent executing.

protected virtual ValueTask<TimeSpan> InvokeTest(TContext ctxt, object? testClassInstance)

Parameters

ctxt TContext

The context that describes the current test

testClassInstance object

The instance of the test class (may be null when running a static test method)

Returns

ValueTask<TimeSpan>

Returns the execution time (in seconds) spent running the test method.

Remarks

This method runs during Running and any exceptions thrown will contribute to test failure.