3

Resolved

Support settings via VS .runsettings file

description

What we would really like to be able to do is use production xUnit dll's in our builds that support the ability to read a property like "/noShadowCopy" from a .runsettings file (http://msdn.microsoft.com/en-us/library/jj635153.aspx) that other testing frameworks appear to be supporting such as Chutzpah (http://chutzpah.codeplex.com/SourceControl/latest#VS2012.TestAdapter/ChutzpahAdapterSettings.cs)

So in the .runsettings file used by the build there would be an <xUnit> section with a property <ShadowCopy>False</ShadowCopy> ...or something along those lines which would be picked up automatically and used in TFS builds.

Is there any plan to support such functionality?

-Jeff

comments

Kevin_H wrote Dec 26, 2013 at 5:52 PM

FWIW, I'd be interested in something similar. I currently have an xml file that my common testcase base class reads to obtain environment specific settings (for example, if I want to force my tests to always run with CurrentUICulture set to ja-JP on a certain machine). If such a .runsettings file was available and supported custom sections, I would use that.

-KEvin

BradWilson wrote Mar 22, 2014 at 6:16 PM

Resolved in change set 0ca932b.

After creating an empty .runsettings XML file, replace its contents with a file like this:
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
  <XunitTestRunSettings>
    <NameDisplay>Full</NameDisplay>
  </XunitTestRunSettings>
</RunSettings>
The following settings are valid in the RunSettings file:
  • MaxParallelThreads - integer
  • MessageDisplay - None, Minimal, Diagnostic
  • NameDisplay - Short, Full
  • ParallelizeAssemblies - True, False
  • ParallelizeTestCollections - True, False
  • ShutdownAfterRun - True, False
Any settings placed in the file will take precedence over settings made inside of Tools > Options > xUnit.net.