TestFilterAction Enum

Definition

Indicates how the MSTest adapter should treat a test for which an ITestFilter returned a particular TestFilterResult.

public enum TestFilterAction
[System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")]
public enum TestFilterAction
type TestFilterAction = 
[<System.Diagnostics.CodeAnalysis.Experimental("MSTESTEXP", UrlFormat="https://aka.ms/mstest/diagnostics#{0}")>]
type TestFilterAction = 
Public Enum TestFilterAction
Inheritance
TestFilterAction
Attributes

Fields

Name Value Description
Run 0

Run the test normally. This is the default action so that default(TestFilterResult) is the safe choice when an implementation forgets to set a result explicitly.

Drop 1

Silently drop the test. No Microsoft.VisualStudio.TestTools.UnitTesting.TestResult is emitted, the test does not appear in the test count, and the declaring class's [ClassInitialize] is not invoked unless another (non-dropped) test in the same class still has to run. This matches the semantics of the platform --filter command-line option.

Skip 2

Report the test as Skipped, with the reason supplied to Skip(String). The test appears in the test count, the TRX/console output, and IDE test explorers.

Applies to