Skip to content

MTP documentation feedback #45643

Open
Open
@Youssef1313

Description

@Youssef1313

Type of issue

Other (describe below)

Description

👋🏻 Hi @Youssef1313 - thank you very much for you prompt reply, really appreciated!

I've read a few docs about this and it's all very confusing.

REF 1: https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-intro?tabs=dotnetcli#use-dotnet-test

So this doc starts out by saying:

  • dotnet run
  • dotnet exec
  • dotnet test

If i'm trying to explain this to team members or newbies, I'm sure I would get asked: "ok.. so we have 3 options - which one, and why?". I know that's exactly what I'm thinking.

As to why I thought dotnet test is going away is because of the order of operations, listed above. I incorrectly assumed that dotnet test is here right now is because of this (emphasis, mine):

Microsoft.Testing.Platform offers a compatibility layer with vstest.console.exe and dotnet test ensuring you can run your tests as before while enabling new execution scenario.

That's how I read that paragraph. It felt like (to me) that it was/is a temp stop-gap solution until we all move over to some "new execution scenario". Execution scenario (to me) is 'dotnet run'

Also, trying to make sure i'm using MTP instead of VSTest is a struggle. I'm on .NET 9. So I've got 2x properties in my csproj files:

<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>

and then i'm not 💯 sure what dotnet test is using behind the scenes. I still feel like dotnet test is setup to use vstest by default with a temp hack added into to switch over to MTP. But the real way should be dotnet run.

That's how i'm feeling, from reading docs and stuff.

How could the docs be updated? Glad you asked! I feel like they are ok right now but are just a dump of info: "Here's all the things. K-gl-have-fun-etc"

versus

Ok - here's the recommended way .. the Happy Path™️ . (aka. dotnet test)
and if you're still reading ...
here is all the advanced and hardcore ways to do stuff (aka. dotnet run, dotnet exec) etc. with reasons why i would be using this over that.

If dotnet test is just a wrapper for dotnet run with some other fancy pants things like test project discovery, etc... great! But .. the average jane/joe prolly doesn't need to know that in the Happy Path™️ .

Anyways, I hope this helps.

Oh. and other confusing things:

  • settings files? can we say 'parallel all the things'?
  • code coverage? (i saw coverlet is undersupported so we're stuck using ms coverage, I believe). Also, settings for this (exclude test projects, etc).
  • merging of coverage files

I think I stumbled on the Coverage Samples. This is seriously, seriously awesome btw! 👏🏻

Originally posted in microsoft/testfx#5408 (reply in thread) by @PureKrome

Page URL

https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-intro?tabs=dotnetcli#use-dotnet-test

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/testing/microsoft-testing-platform-intro.md

Document Version Independent Id

e3466361-50b2-7399-3f1d-91ace5686996

Platform Id

5714f5f9-3384-187b-e8d8-2d810f1c0d7b

Article author

@Evangelink

Metadata

  • ID: b8933d12-6ba6-8b9a-94b8-36fb3bf883c9
  • PlatformId: 5714f5f9-3384-187b-e8d8-2d810f1c0d7b
  • Service: dotnet-fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions