Table of Contents

Property SkipWhen

Namespace
Xunit
Assembly
xunit.v3.core.dll

SkipWhen

Gets the name of a public static property on the test class which returns bool to indicate whether the test should be skipped (true) or not (false).

string? SkipWhen { get; }

Property Value

string

Remarks

This property cannot be set if SkipUnless is set. Setting both will result in a failed test.

To ensure compile-time safety and easier refactoring, use the nameof operator, e.g., SkipWhen = nameof(IsConditionMet).