RunSettings for "real" developers who write unit testsA set of runsettings item templates for Visual Studio 2022, 2019 and 2017. [For earlier versions see the links below] The runsettings file is used by all developers who love unit tests. This template automates the creation of the default runsettings under solution items. Never do this manually again! The runsettings contains separate sections for the adapters. The settings for the NUnit Adapter is described here and MSTest adapter is described here. How to useRight click the solution. Choose Add | New Item and choose one of the Runsettings under General. Observe that the runsettings file was added as a Solution Item. DetailsThe runsettings file is used by all developers who love unit tests. This template automates the creation of the default runsettings under solution items. Never do this manually again! Also used to change the code coverage analysis settings for a test run. Set which files should be included and excluded from analysis, and also set symbol search paths. Also set Runconfigurations and testrunparameters, and specific settings for NUnit and MSTest. Learn how to configure and customize runsettings:
Enjoy! Parallel executionIt can also enable parallel run of unit tests. More information on MSTest parallel execution and more details here More information on NUnit parallel execution TemplatesThere are 3 templates included, one complete which includes code coverage and parallel run, one with only code coverage, and one with only parallel run. The latter can also be used as the most simple runsettings template. If you want it to run automatically in Visual Studio, rename the one you use to '.runsettings'. For more information see this blog post: How to exclude code from code coverage in Visual Studio Why are there no settings for XUnit includedXUnit does not support the use of a runsettings file, but use environment variables instead. See the answer in this SO post and this github issue Older Visual Studio versions:CreditsThanks to Adam Cogan for your help! |