-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Proposal for running dotnet test with Microsoft.Testing.Platform #45471
Comments
Triage: Other options would include adding configuration to the sln file but that has some drawbacks as well as explore other file options like repo.json or user.json (but with global.json already being in use, those are probably not good). I think we probably need to first determine if we're ok expanding global.json for this class, outline some requirements for adding to this, and making sure there is a central library for exposing the data to other consumers. @richlander for his opinion |
This is to replace the current What happens for test projects which support VSTest but not MTP? For example, consider the scenario where a team is migrating from xUnit.net v2 to v3, and the former doesn't support MTP. What if I want to run v2 tests as VSTest and v3 tests as MTP? Since this lives in global.json, would that imply I'd put a new global.json into every test project folder to control it individually? Is that recommended behavior for global.json? Will there be any other way to flip the switch besides global.json? In the case of a test framework like xUnit.net, I may want to run tests via |
I have believed for some time that we need an SDK config system, similar (at least in spirit) to what git has. I probably have some issues filed on it. I'd like to see us keep Brad also raises some good points/challenges. |
Current State
Currently, when we run
dotnet test
in CLI, we use vstest as a test runner/driver to run tests in test projects.Motivation
With
dotnet test
, users should be able to use Microsoft Testing Platform to run their tests for the sake of improving their experience. They should have the option to opt-in/out this new experience.The reason for opting-in/out this experience is
Note
We want to design in a way that is future proof and easy to keep backwards compatible.
Proposal
Make this option configurable in global.json. We chose global.json because it's located on the current directory level or its parent directories and is picked up by the dotnet sdk.
Here is a global.json sample:
Examples of Usage
1. Example 1
It contains the properties below:
2. Example 2
This design is extendable. If later on we decided to support dotnet test as an external dotnet tool.
We can simply add the type/source property and other options as well.
Default
The text was updated successfully, but these errors were encountered: