Sunday, May 3, 2020

vstest.console.exe commandline options for test automation, help dump



Microsoft (R) Test Execution Command Line Tool Version 16.4.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Usage: vstest.console.exe [Arguments] [Options] [[--] <RunSettings arguments>...]]

Description: Runs tests from the specified files.

Arguments:

[TestFileNames]
      Run tests from the specified files or wild card pattern. Separate multiple test file names or pattern
      by spaces. Set console logger verbosity to detailed to view matched test files.
      Examples: mytestproject.dll
                mytestproject.dll myothertestproject.exe
                testproject*.dll my*project.dll

Options:

--Tests|/Tests:<Test Names>
      Run tests with names that match the provided values. To provide multiple
      values, separate them by commas.
      Examples: /Tests:TestMethod1
                /Tests:TestMethod1,testMethod2

--TestCaseFilter|/TestCaseFilter:<Expression>
      Run tests that match the given expression.
      <Expression> is of the format <property>Operator<value>[|&<Expression>]
         where Operator is one of =, != or ~  (Operator ~ has 'contains'
         semantics and is applicable for string properties like DisplayName).
         Parenthesis () can be used to group sub-expressions.
      Examples: /TestCaseFilter:"Priority=1"
                /TestCaseFilter:"(FullyQualifiedName~Nightly
                                  |Name=MyTestMethod)"

--Framework|/Framework:<Framework Version>
      Target .Net Framework version to be used for test execution.
      Valid values are ".NETFramework,Version=v4.5.1", ".NETCoreApp,Version=v1.0" etc.
      Other supported values are Framework40, Framework45, FrameworkCore10 and FrameworkUap10.

--Platform|/Platform:<Platform type>
      Target platform architecture to be used for test execution.
      Valid values are x86, x64 and ARM.

--Settings|/Settings:<Settings File>
      Settings to use when running tests.

RunSettings arguments:
      Arguments to pass runsettings configurations through commandline. Arguments may be specified as name-value pair of the form [name]=[value] after "-- ". Note the space after --.
      Use a space to separate multiple [name]=[value].
      More info on RunSettings arguments support: https://aka.ms/vstest-runsettings-arguments

-lt|--ListTests|/lt|/ListTests:<File Name>
      Lists all discovered tests from the given test container.

--Parallel|/Parallel
      Specifies that the tests be executed in parallel. By default up
      to all available cores on the machine may be used.
      The number of cores to use may be configured using a settings file.

--TestAdapterPath|/TestAdapterPath
      This makes vstest.console.exe process use custom test adapters
      from a given path (if any) in the test run.
      Example  /TestAdapterPath:<pathToCustomAdapters>

--Blame|/Blame:[CollectDump];[CollectAlways]=[Value];[DumpType]=[Value]
      Runs the test in blame mode. This option is helpful in isolating the problematic test causing test host crash.
      It creates an output file in the current directory as "Sequence.xml",
      that captures the order of execution of test before the crash.
      You may optionally choose to collect process dump for the test host.
      When you choose to collect dump, by default, a mini dump will be collected on a crash.
      You may also choose to override this default behaviour by some optional parameters:
      CollectAlways - To collect dump on exit even if there is no crash (true/false)
      DumpType - To specify dump type (mini/full).
      Example: /Blame
               /Blame:CollectDump
               /Blame:CollectDump;CollectAlways=true;DumpType=full

--Diag|/Diag:<Path to log file>
      Enable logs for test platform.
      Logs are written to the provided file.

      Change the trace level for logs as shown below
      Example: /Diag:<Path to log file>;tracelevel=<Defaults to "verbose">
      Allowed values for tracelevel: off, error, warning, info and verbose.

--logger|/logger:<Logger Uri/FriendlyName>
      Specify a logger for test results. For example, to log results into a
      Visual Studio Test Results File (TRX) use /logger:trx[;LogFileName=<Defaults to unique file name>]
      Creates file in TestResults directory with given LogFileName.

      Change the verbosity level in log messages for console logger as shown below
      Example: /logger:console;verbosity=<Defaults to "normal">
      Allowed values for verbosity: quiet, minimal, normal and detailed.

      Change the diagnostic level prefix for console logger as shown below
      Example: /logger:console;prefix=<Defaults to "false">
      More info on Console Logger here : https://aka.ms/console-logger

--ResultsDirectory|/ResultsDirectory
      Test results directory will be created in specified path if not exists.
      Example  /ResultsDirectory:<pathToResultsDirectory>

--ParentProcessId|/ParentProcessId:<ParentProcessId>
      Process Id of the Parent Process responsible for launching current process.

--Port|/Port:<Port>
      The Port for socket connection and receiving the event messages.

-?|--Help|/?|/Help
      Display this usage message.

--Collect|/Collect:<DataCollector FriendlyName>
      Enables data collector for the test run. More info here : https://aka.ms/vstest-collect

--InIsolation|/InIsolation
      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
      may run slower.

@<file>
      Read response file for more options.

  To run tests:
    >vstest.console.exe tests.dll
  To run tests with additional settings such as  data collectors:
    >vstest.console.exe  tests.dll /Settings:Local.RunSettings


3 comments:

  1. I really liked reading your post! Very high quality content and useful information similar to my post on places to visit to With such a valuable website I believe you deserve to be ranking even higher in the search engines.

    click Here

    ReplyDelete
  2. Great site! I really love the way it is simple on my eyes. I am thinking about how I may be told at whatever point another post has been made.
    Click it

    ReplyDelete
  3. A Programmer'S Day: Vstest.Console.Exe Commandline Options For Test Automation, Help Dump >>>>> Download Now

    >>>>> Download Full

    A Programmer'S Day: Vstest.Console.Exe Commandline Options For Test Automation, Help Dump >>>>> Download LINK

    >>>>> Download Now

    A Programmer'S Day: Vstest.Console.Exe Commandline Options For Test Automation, Help Dump >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete

Feel free to talk back...