You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area/mtpMicrosoft.Testing.Platform core library.state/needs-approvalAwaiting maintainer approval of the proposal/design before work proceeds.type/discussionOpen discussion / brainstorming.
There are many configuration options in runsettings/other files. It would be nice to not have to specify them in commandline, or in VS in UI.
Background and Motivation
It is hard to recommend people to configure their test base in some non-default way when they don't have an easy way to consume such settings. For example running on commandline with settings requires to always specify them:
dotnet test --settings mysettings.runsettings
and in VS they need to be set in UI by every developer.
Proposed Feature
Lookup settings / configuration file by recursing directories, similarly to Directory.Build.props, nuget.config or .editorconfig, to allow using settings by default without having to specify them on commandline or in UI.
Offload the lookup to MSBuild when building the test project, and copy the settings next to the test project so we keep the bin folder self-contained and portable.
For example I would like my tests to run with output that shows passed tests, and never uses ansi. I would like to be able to set those settings in my repo, and version them and have them automatically picked up for any test run.
I find it useful indeed but I think I would prefer this behavior to not be part of the core platform so it remains 100% deterministic.
I am wondering if this could be an added feature of VS and dotnet test (could be some kind of shared library or an extension) that does the lookup and force the --settings path to the call. This means we would have a different UX when calling the exe directly but I think it's fine.
It does not have to be runsettings specifically, I would much rather have it built in for some configuration that the platform is able to consume. I don't think runsettings should be used in the future as the way to configure test runs.
Partially, this ticket is about how to find the configuration file (similarly to #3562). Yours is asking about the support of command line options in the config file.
area/mtpMicrosoft.Testing.Platform core library.state/needs-approvalAwaiting maintainer approval of the proposal/design before work proceeds.type/discussionOpen discussion / brainstorming.
Activity
nohwnd commentedon Aug 15, 2024
When is this useful?
For example I would like my tests to run with output that shows passed tests, and never uses ansi. I would like to be able to set those settings in my repo, and version them and have them automatically picked up for any test run.
Evangelink commentedon Aug 15, 2024
Thanks Jakub Jareš (@nohwnd)!
I find it useful indeed but I think I would prefer this behavior to not be part of the core platform so it remains 100% deterministic.
I am wondering if this could be an added feature of VS and dotnet test (could be some kind of shared library or an extension) that does the lookup and force the
--settings pathto the call. This means we would have a different UX when calling the exe directly but I think it's fine.Evangelink commentedon Aug 15, 2024
Actually as runsettings are coming from the bridge, it's probably find to say the lookup feature is provided by the bridge.
nohwnd commentedon Aug 15, 2024
It does not have to be runsettings specifically, I would much rather have it built in for some configuration that the platform is able to consume. I don't think runsettings should be used in the future as the way to configure test runs.
Evangelink commentedon Aug 15, 2024
See related ticket.
thomhurst commentedon Aug 15, 2024
Is this the same as #3499 ?
Evangelink commentedon Aug 15, 2024
Partially, this ticket is about how to find the configuration file (similarly to #3562). Yours is asking about the support of command line options in the config file.
BTW you could already have a look at https://github.com/microsoft/testfx/blob/main/docs/testingplatform/configuration.md to start adding your settings in this file. We will be releasing 1.4 preview today (please use this version if you want to do so).
Evangelink commentedon Apr 20, 2026
Closing as won't fix for now