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 30 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
68 changes: 68 additions & 0 deletions docs/RFCs/011-Sdk-Testing-Platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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

The reason for opting-in/out this experience is

1. Autodetecting if test projects are using vstest or the testing platform is complex, and we would end up with many false positives, making it hard to deliver a working and consistent experience.
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 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

```json
{
"test" : {
"runner": {
"name": "MicrosoftTestingPlatform"
}
}
}
```

It contains the properties below:

- test: Contains configuration related to the test settings.
- runner: Specifies the test runner details.
- name: The name of the test runner to be used, in this case, "MicrosoftTestingPlatform".

#### 2. Example 2

```json
{
"test" : {
"runner": {
"name": "VSTest"
}
}
}
```

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

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