-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
MSTest: document testconfig.json #43743
base: main
Are you sure you want to change the base?
Conversation
|
||
## testconfig.json | ||
|
||
When running your tests with MSTest, you can use a `testconfig.json` file to configure the behavior of the test runner. The `testconfig.json` file is a JSON file that contains the configuration settings for the test runner. The file is used to configure the test runner and the test execution environment. For more information, refer to [Microsoft.Testing.Platform testconfig.json documentation](unit-testing-platform-config.md#testconfigjson). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the file name should be <AssemblyName>.testconfig.json
. However, we have an MSBuild target in Microsoft.Testing.Platform.MSBuild that copies testconfig.json to <AssemblyName>.testconfig.json
, right?
Do we want to document that? Are there valid supported scenarios where Microsoft.Testing.Platform.MSBuild won't be referenced and the user will have to precisely name the file as <AssemblyName>.testconfig.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the file name should be .testconfig.json. However, we have an MSBuild target in Microsoft.Testing.Platform.MSBuild that copies testconfig.json to .testconfig.json, right?
Both points are correct. You can have only a .testconfig.json
file and it will be copied and renamed correctly by the MSBuild extension. You can also do it manually following the <AssemblyName>.testconfig.json
pattern.
Do we want to document that?
If that's not already documented on platform side then yes platform side doc should be updated to mention that. Could you file a ticket on our repo to fix that?
Are there valid supported scenarios where Microsoft.Testing.Platform.MSBuild won't be referenced and the user will have to precisely name the file as .testconfig.json?
This is user/framework author choice. If for some reason you don't want to use it you can avoid to rely on our MSBuild feature.
|
||
When running your tests with MSTest, you can use a `testconfig.json` file to configure the behavior of the test runner. The `testconfig.json` file is a JSON file that contains the configuration settings for the test runner. The file is used to configure the test runner and the test execution environment. For more information, refer to [Microsoft.Testing.Platform testconfig.json documentation](unit-testing-platform-config.md#testconfigjson). | ||
|
||
Starting with MSTest 3.7, you can also configure MSTest runs in the same configuration file. The sections below describe the settings that you can use in the `testconfig.json` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about microsoft/testfx#3872 right?
In unit-testing-platform-config.md, maybe the new --config-file
should be documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about microsoft/testfx#3872 right?
Yes
In unit-testing-platform-config.md, maybe the new --config-file should be documented?
Yes, please do a ticket for it.
Summary
Relates to microsoft/testfx#3872
Internal previews