Table of Contents

Method OnTestCaseStarting

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

OnTestCaseStarting(TContext)

This method will be called before the test case has started running. TBy default, this sends TestCaseStarting. Override this to enable any extensibility related to test case start.

protected virtual ValueTask<bool> OnTestCaseStarting(TContext ctxt)

Parameters

ctxt TContext

The context that describes the current test case

Returns

ValueTask<bool>

Return true if test execution should continue; false if it should be shut down.

Remarks

This method runs during Initializing and any exceptions thrown will contribute to test case failure (and will prevent the test case from running). Even if this method records exceptions, OnTestCaseFinished(TContext, RunSummary) will be called.