How to specify custom parameters, using xunit.runner.console
IIRC I asked and self-answered this very question as a feature request in xunit's forums in the codeplex era, pre-2010 but can't locate it atm (perhaps I was asking in the context of CodeRush's test runner). Either way, the above was the answer at that time, and it still makes sense as it's test-runner and CI tool neutral.
This is commonly addressed by environment variables, i.e. use GetEnvironmentVariable.
One thing to consider is that people who want to use runners such as Visual Studio will then need to adjust accordingly. .NET Core has intrinsic support for having an environment selector of this nature, which may also be a useful approach as it's likely to be exposed in editors and other tooling over time.
Finally, the lowest level hack may be to be sticking it into .config
settings, i.e., the <DllName>.dll.config
and doing the necessary to pass it through there.