Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify .runsettings file in MSTest commandline?

Tags:

.net

mstest

I am following guidelines from MSDN - Configure unit tests by using a .runsettings file.

I have created Default.runsettings in my solution, since I use a script to run my tests, I need to specify the settings file in MSTest.exe commandline.

However, according to MSDN Doc, I have option /testsettings, but this is to specify a .testsettings file which is the old way as described in the first page I linked.

How to specify a .runsettings file for MSTest command line? Thanks

like image 983
Andry Avatar asked Nov 20 '25 11:11

Andry


1 Answers

Mstest.exe is the old way to run tests from the command line. You should be using vstest.console.exe.

VSTest.Console.Exe takes a /Settings:[ file name ] command line argument which should be a .runsettings file.

like image 68
John Koerner Avatar answered Nov 23 '25 02:11

John Koerner