Table of Contents

Method OnTestClassFinished

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

OnTestClassFinished(TContext, RunSummary)

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

protected override ValueTask<bool> OnTestClassFinished(TContext ctxt, RunSummary summary)

Parameters

ctxt TContext

The context that describes the current test class

summary

The execution summary for the test class

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, RunTestMethods(TContext, Exception?), or RunTestMethod(TContext, TTestMethod?, IReadOnlyCollection<TTestCase>, object?[])) will invoke OnTestClassCleanupFailure(TContext, Exception).