Conditional unit tests
How to run xunit tests conditionally depending on the environment that is running the tests
[SkipOnCI]
[ConditionalFact]
public async Task SomeTest()public static bool OnCI() =>
(bool.TryParse(Environment.GetEnvironmentVariable("CI"), out var ci) && ci) ||
OnHelix() || OnAzdo();Last updated