Table of Contents

Method ShouldTestRun

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

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 return true. This is typically used to implement the ability to exclude specific tests unless they've been explicitly asked to be run.

protected virtual bool ShouldTestRun(TContext ctxt)

Parameters

ctxt TContext

The context that describes the current test

Returns

bool

Remarks

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