Table of Contents

Method OnTestCaseFinished

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

OnTestCaseFinished(TContext, RunSummary)

This method will be called when the test case has finished running. By default, this sends TestCaseFinished. Override this to enable any extensibility related to test case finish.

protected virtual ValueTask<bool> OnTestCaseFinished(TContext ctxt, RunSummary summary)

Parameters

ctxt TContext

The context that describes the current test case

summary

The execution summary for the test case.

Returns

ValueTask<bool>

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

Remarks

This method runs during CleaningUp and any exceptions thrown will be reported as top-level exceptions. Any exceptions that are present in the aggregator (presumably from derived implementations of this method or RunTestCase(TContext, Exception?)) will invoke OnTestCaseCleanupFailure(TContext, Exception).