-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RunSettingsFilePath from project file when using dotnet test #2272
Use RunSettingsFilePath from project file when using dotnet test #2272
Conversation
@ViktorHofer You might want to take a look at this one. |
test/Microsoft.TestPlatform.TestUtilities/IntegrationTestBase.cs
Outdated
Show resolved
Hide resolved
My understand was that we can point to any runsettings file anywhere on disk. Your description indicates that we can only point to a project level or solution level runsettings file. Is that correct? |
You can point to a file anywhere on the disk. The given examples use paths relative to a project or solution file, because I assumed that is what people will want to do most often. But you are not limited to do just that. You can use absolute path as well. |
Great, just wanted to make sure of that. Thanks. |
Uses the RunSettingsFilePath from project file when specified and falls back to the one specified in console, or the default setting if none are provided. The path to the settings file can be specified in multiple ways, for example as a path relative to the project file. This enables `dotnet test` to be invoked against the project file directly. ```xml <RunSettingsFilePath>$(ProjectDir)..\example.runsettings</RunSettingsFilePath> ``` Alternatively path can also be specified relatively to solution file, but that will only work when running dotnet test against the solution. On the other hand the setting will be the same in all projects. ```xml <RunSettingsFilePath>$(SolutionDir)\example.runsettings</RunSettingsFilePath> ``` Fixes microsoft#2265
0f7e2d3
to
9b6a5f7
Compare
Description
Uses the RunSettingsFilePath from project file when specified and falls
back to the one specified in console, or the default setting if none are
provided.
The path to the settings file can be specified in multiple ways,
for example as a path relative to the project file. This enables
dotnet test
to be invoked against the project file directly.Alternatively path can also be specified relatively to solution file, but that will
only work when running dotnet test against the solution. On the other hand the
setting will be the same in all projects.
The setting file can be overridden by specifying
--settings
from the command lineto give flexibility in providing alternative runsettings.
Related issue
Fixes #2265