Table of Contents

Method RunTestMethod

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

RunTestMethod(TContext, TTestMethod?, IReadOnlyCollection<TTestCase>, object?[])

Override this method to run the tests in an individual test method.

protected abstract ValueTask<RunSummary> RunTestMethod(TContext ctxt, TTestMethod? testMethod, IReadOnlyCollection<TTestCase> testCases, object?[] constructorArguments)

Parameters

ctxt TContext

The context that describes the current test class

testMethod TTestMethod

The test method that contains the test cases. May be null for test cases that do not support classes and methods.

testCases IReadOnlyCollection<TTestCase>

The test cases to be run.

constructorArguments object[]

The constructor arguments that will be used to create the test class.

Returns

ValueTask<RunSummary>

Returns summary information about the tests that were run.

Remarks

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