Skip to content
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@Faizan2304 @dp7g09
49 lines (33 sloc) 1.94 KB

Passing runsettings arguments through commandline

You are here because you are looking for syntax and details to pass runsettings configurations to either vstest.console.exe or dotnet test through commandline.

RunSettings arguments are used to add/update specific runsettings configurations. The updated runsettings configurations will be available to TestPlatform and test extensions (E.g. test adapter, etc.) through runsettings.


  • RunSettings arguments are specified as name-value pair of the form [name]=[value] after -- . Note the space after --.
  • Use a space to separate multiple [name]=[value].
  • All the arguments after -- will be treated as RunSettings arguments, means RunSettings arguments should be at the end of the command line.


Passing argument -- MSTest.MapInconclusiveToFailed=True in (1) below is equivalent to passing argument --settings additionalargs.runsettings in (2) below.

1) dotnet test  -- MSTest.MapInconclusiveToFailed=True MSTest.DeploymentEnabled=False
2) dotnet test --settings additionalargs.runsettings

where additionalargs.runsettings is:

<?xml version="1.0" encoding="utf-8"?>  
  <!-- MSTest adapter -->  

The syntax in (1) is another way of passing runsettings configuration and you need not author a runsetting file while using Runsettings arguments. More details about runsettings can be found here.

Runsettings arguments takes precedence over runsettings.

For example, in below command the final value for MapInconclusiveToFailed will be False and value for DeploymentEnabled will be unchanged, that is False.

dotnet test --settings additionalargs.runsettings -- MSTest.MapInconclusiveToFailed=False
You can’t perform that action at this time.