Class XunitTestRunnerBase<TContext, TTest>
- Namespace
- Xunit.v3
- Assembly
- xunit.v3.core.dll
The base test runner for xUnit.net v3 tests (with overridable context).
public class XunitTestRunnerBase<TContext, TTest> : TestRunner<TContext, TTest> where TContext : XunitTestRunnerBaseContext<TTest> where TTest : class, IXunitTest
Type Parameters
TContextTTest
- Inheritance
-
TestRunnerBase<TContext, TTest>TestRunner<TContext, TTest>XunitTestRunnerBase<TContext, TTest>
- Derived
- Inherited Members
-
TestRunner<TContext, TTest>.CreateTestClassInstance(TContext)TestRunner<TContext, TTest>.DisposeTestClassInstance(TContext, object)TestRunner<TContext, TTest>.InvokeTest(TContext, object)TestRunner<TContext, TTest>.IsTestClassCreatable(TContext)TestRunner<TContext, TTest>.IsTestClassDisposable(TContext, object)TestRunner<TContext, TTest>.OnTestClassConstructionFinished(TContext)TestRunner<TContext, TTest>.OnTestClassConstructionStarting(TContext)TestRunner<TContext, TTest>.OnTestClassDisposeFinished(TContext)TestRunner<TContext, TTest>.OnTestClassDisposeStarting(TContext)TestRunner<TContext, TTest>.PostInvoke(TContext)TestRunner<TContext, TTest>.PreInvoke(TContext)TestRunner<TContext, TTest>.RunTest(TContext)TestRunnerBase<TContext, TTest>.GetTestOutput(TContext)TestRunnerBase<TContext, TTest>.GetWarnings(TContext)TestRunnerBase<TContext, TTest>.OnTestCleanupFailure(TContext, Exception)TestRunnerBase<TContext, TTest>.OnTestFailed(TContext, Exception, decimal, string, string[])TestRunnerBase<TContext, TTest>.OnTestFinished(TContext, decimal, string, string[])TestRunnerBase<TContext, TTest>.OnTestNotRun(TContext, string, string[])TestRunnerBase<TContext, TTest>.OnTestPassed(TContext, decimal, string, string[])TestRunnerBase<TContext, TTest>.OnTestSkipped(TContext, string, decimal, string, string[])TestRunnerBase<TContext, TTest>.OnTestStarting(TContext)TestRunnerBase<TContext, TTest>.OnTestStarting(TContext, bool, int)TestRunnerBase<TContext, TTest>.Run(TContext)TestRunnerBase<TContext, TTest>.RunTest(TContext)TestRunnerBase<TContext, TTest>.SetTestContext(TContext, TestEngineStatus, TestResultState, object)TestRunnerBase<TContext, TTest>.ShouldTestRun(TContext)TestRunnerBase<TContext, TTest>.UpdateTestContext(object, TestResultState)
Methods
- CreateTestClassInstance(TContext)
Override to creates and initialize the instance of the test class.
- GetTestOutput(TContext)
Gets any output collected from the test after execution is complete. If the test framework did not collect any output, or does not support collecting output, then it should return Empty.
- GetWarnings(TContext)
Gets the warnings that will be reported during test results. By default, returns
null, indicating that there were no warnings
- InvokeTest(TContext, object?)
Invokes the test method and returns the amount of time spent executing.
- IsTestClassCreatable(TContext)
Override to determine whether a test class should be created.
- OnTestStarting(TContext)
This method is called just before the test is run. By default, this sends TestStarting. Override this to enable any extensibility related to test start.
- PostInvoke(TContext)
Override this method to call code just after the test invocation has completed, but before the test class instance has been disposed.
- PreInvoke(TContext)
Override this method to call code just after the test class instance has been created, but before the test has been invoked.
- RunTest(TContext)
Override this method to run the test.
- ShouldTestRun(TContext)
Override this to determine whether a test should be run or not (meaning, if you return
false, it will be reported with a status of NotRun). By default, this method will returntrue. This is typically used to implement the ability to exclude specific tests unless they've been explicitly asked to be run.