-
Notifications
You must be signed in to change notification settings - Fork 280
Create draft proposal for running dotnet test using Microsoft.Testing.Platform #4324
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
Closed
Closed
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6d08e71
Create draft proposal for running dotnet test using Microsoft.Testing…
mariam-abdulla f269d19
add more suggestions
mariam-abdulla 413b972
add empty lines
mariam-abdulla 5ff7656
update doc
mariam-abdulla a2c9e35
fix errors
mariam-abdulla ce31e51
apply comments
mariam-abdulla 6d61fb0
update doc
mariam-abdulla dd544a6
Update docs/RFCs/011-Sdk-Testing-Platform.md
mariam-abdulla 20539bd
apply comments
mariam-abdulla 67189b4
apply comments
mariam-abdulla 9bd88bc
update doc
mariam-abdulla 712be43
update doc
mariam-abdulla fd32cb1
Replace 'samples' with 'suggestions'
mariam-abdulla ee6b117
Update titles' suggestions
mariam-abdulla ee6e892
update doc
mariam-abdulla d24bb0e
Add empty line at the end
mariam-abdulla ca95ed5
Update doc
mariam-abdulla 0f483be
Update doc
mariam-abdulla e9a9a1a
Update doc
mariam-abdulla 7c414d3
Update
mariam-abdulla adf0550
Update doc
mariam-abdulla ce37955
Solve indentation errors
mariam-abdulla 8f5308d
Update title
mariam-abdulla 97bf741
Update doc
mariam-abdulla 04e470b
Fix placement of comments
mariam-abdulla 3b389f2
Update doc
mariam-abdulla 9aae287
Fix errors
mariam-abdulla c9a141d
Fix error
mariam-abdulla 6a86c66
Fix errors
mariam-abdulla f13f0b3
fix errors
mariam-abdulla 43c3b4b
Update docs/RFCs/011-Sdk-Testing-Platform.md
mariam-abdulla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# RFC 011 - Run dotnet test with Microsoft.Testing.Platform | ||
|
||
- [x] Approved in principle | ||
- [x] Under discussion | ||
- [ ] Implementation | ||
- [ ] Shipped | ||
|
||
## 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](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-platform-intro?tabs=dotnetcli#microsofttestingplatform-pillars) 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 | ||
1. if we were to auto-infer if test projects were using vstest or the testing platform is we will end up with many vulnerabilities, thus making it hard to handle this correctly. | ||
mariam-abdulla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Mixed mode (i.e. having projects using vstest and testing platform in the same solution) will never work as the two platforms have different command line options and different features, thus the mapping will not work as expected. | ||
|
||
## Note | ||
|
||
We want to design in a way we won't break users and it should be backwards compatible. | ||
mariam-abdulla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Proposed solution | ||
|
||
Make this option configurable in global.json. | ||
mariam-abdulla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Here are some global.json samples: | ||
|
||
1. | ||
|
||
```json | ||
{ | ||
"testSdk" : | ||
mariam-abdulla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
"useTestingPlatform": true | ||
} | ||
} | ||
``` | ||
|
||
What if we want to support another test runner? | ||
|
||
We simply can't, with this approach we either use the testing platform, or fallback to vstest if this property was set to false. | ||
|
||
2. | ||
|
||
```json | ||
{ | ||
"testSdk" : | ||
{ | ||
"testRunner": "vstest/testingplatform" | ||
} | ||
} | ||
``` | ||
|
||
What if we decide to extract the testing platform as an external tool? | ||
|
||
We still could support more options. | ||
|
||
But if, for some reason, the latest version was broken, we will break as well. | ||
|
||
3. | ||
|
||
```json | ||
{ | ||
"testSdk" : | ||
{ | ||
"testRunner": "vstest/testingplatform/...", | ||
mariam-abdulla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"version": "1.5.0" | ||
} | ||
} | ||
``` | ||
|
||
Users are allowed to force install a specific version of the tool. | ||
|
||
If not specified then we will fallback to the latest version. | ||
|
||
### Default | ||
|
||
- If no test runner was provided in global.json, the default is set to vstest. | ||
|
||
## Unresolved questions | ||
|
||
None. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.