Table of Contents

Property SkipWhen

Namespace
Xunit.v3
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 avoid issues during refactoring, it is recommended to use the nameof operator to reference the property, e.g., SkipWhen = nameof(IsTestSkipped).