The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

VSTest Runner plugin

vsTest: Run unit tests with VSTest.console

  • cmdLineArgs (optional)
    • Type: String
  • enablecodecoverage (optional)

    Enables data diagnostic adapter CodeCoverage in the test run.
    Default settings are used if not specified using settings file.

    Command Line Argument: /Enablecodecoverage

    • Type: boolean
  • failBuild (optional)
    • Type: boolean
  • framework (optional)

    Target .NET Framework version to be used for test execution.
    Valid values are Framework35, Framework40 and Framework45.

    Command Line Argument: /Framework: [ framework version ]

    • Type: String
  • inIsolation (optional)

    Runs the tests in an isolated process.
    This makes vstest.console.exe process less likely to be stopped on an error in the tests, but tests might run slower.

    • Type: boolean
  • logger (optional)

    Specify a logger for test results. For example, to log results into a Visual Studio Test Results File (TRX) use /Logger:trx.

    Command Line Argument: /Logger:[ uri/friendlyname ]

    • Type: String
  • platform (optional)

    Target platform architecture to be used for test execution.
    Valid values are x86, x64 and ARM.

    • Type: String
  • settings (optional)

    Run tests with additional settings such as data collectors.
    Example: Local.RunSettings

    Command Line Argument: /Settings:[ file name ]

    • Type: String
  • testCaseFilter (optional)

    Run tests that match the given expression.
    <Expression> is of the format <property>=<value>[||<Expression>].
    Example: TestCategory=Nightly||Name=Namespace.ClassName.MethodName

    The TestCaseFilter command line option cannot be used with the Tests command line option.

    Command Line Argument: /TestCaseFilter:[ expression ]

    • Type: String
  • testFiles (optional)

    Specify the path to your VSTest compiled assemblies.
    You can specify multiple test assemblies by separating them with new-line or space.

    • Type: String
  • tests (optional)

    Run tests with names that match the provided values.
    To provide multiple values, separate them by commas.
    Example: TestMethod1,testMethod2

    The /Tests command line option cannot be used with the /TestCaseFilter command line option.

    Command Line Argument: /Tests:[ test name ]

    • Type: String
  • useVs2017Plus (optional)

    This makes adjustments to the arguments for the sake of compatibility with Visual Studio 2017+.

    Command Line Argument: /UseVs2017Plus:true

    • Type: boolean
  • useVsixExtensions (optional)

    This makes vstest.console.exe process use or skip the VSIX extensions installed (if any) in the test run.

    Command Line Argument: /UseVsixExtensions:true

    • Type: boolean
  • vsTestName (optional)
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.