Skip to content
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

Create draft proposal for running dotnet test using Microsoft.Testing.Platform #4324

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft
Changes from 5 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 Dec 12, 2024
f269d19
add more suggestions
mariam-abdulla Dec 12, 2024
413b972
add empty lines
mariam-abdulla Dec 12, 2024
5ff7656
update doc
mariam-abdulla Dec 12, 2024
a2c9e35
fix errors
mariam-abdulla Dec 12, 2024
ce31e51
apply comments
mariam-abdulla Dec 12, 2024
6d61fb0
update doc
mariam-abdulla Dec 12, 2024
dd544a6
Update docs/RFCs/011-Sdk-Testing-Platform.md
mariam-abdulla Dec 12, 2024
20539bd
apply comments
mariam-abdulla Dec 12, 2024
67189b4
apply comments
mariam-abdulla Dec 12, 2024
9bd88bc
update doc
mariam-abdulla Dec 12, 2024
712be43
update doc
mariam-abdulla Dec 12, 2024
fd32cb1
Replace 'samples' with 'suggestions'
mariam-abdulla Dec 12, 2024
ee6b117
Update titles' suggestions
mariam-abdulla Dec 12, 2024
ee6e892
update doc
mariam-abdulla Dec 12, 2024
d24bb0e
Add empty line at the end
mariam-abdulla Dec 12, 2024
ca95ed5
Update doc
mariam-abdulla Dec 12, 2024
0f483be
Update doc
mariam-abdulla Dec 12, 2024
e9a9a1a
Update doc
mariam-abdulla Dec 12, 2024
7c414d3
Update
mariam-abdulla Dec 12, 2024
adf0550
Update doc
mariam-abdulla Dec 12, 2024
ce37955
Solve indentation errors
mariam-abdulla Dec 12, 2024
8f5308d
Update title
mariam-abdulla Dec 12, 2024
97bf741
Update doc
mariam-abdulla Dec 13, 2024
04e470b
Fix placement of comments
mariam-abdulla Dec 13, 2024
3b389f2
Update doc
mariam-abdulla Dec 13, 2024
9aae287
Fix errors
mariam-abdulla Dec 13, 2024
c9a141d
Fix error
mariam-abdulla Dec 13, 2024
6a86c66
Fix errors
mariam-abdulla Dec 13, 2024
f13f0b3
fix errors
mariam-abdulla Dec 13, 2024
43c3b4b
Update docs/RFCs/011-Sdk-Testing-Platform.md
mariam-abdulla Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions docs/RFCs/011-Sdk-Testing-Platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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.
mariam-abdulla marked this conversation as resolved.
Show resolved Hide resolved

## 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.

Check failure on line 41 in docs/RFCs/011-Sdk-Testing-Platform.md

View workflow job for this annotation

GitHub Actions / lint

Ordered list item prefix [Expected: 1; Actual: 2; Style: 1/1/1]

```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.

Check failure on line 58 in docs/RFCs/011-Sdk-Testing-Platform.md

View workflow job for this annotation

GitHub Actions / lint

Ordered list item prefix [Expected: 1; Actual: 3; Style: 1/1/1]

```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.

### Defaults

- If no test runner was provided in global.json, the default is set to vstest.

## Unresolved questions

None.
Loading