Skip to content

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Dec 20, 2023

Summary

Document MSTest runner and dotnet test integration and the various options tied to the MSBuild task.

Fixes #Issue_Number (if available)


Internal previews

📄 File 🔗 Preview link
docs/core/testing/unit-testing-mstest-runner-integrations.md Use MSTest runner with dotnet test

Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to also update the toc file to have the correct grouping for this new file.

@IEvangelist would it be possible to introduce folders so we can avoid the need for toc update? I also have some complex toc for the analyzers in another PR.

@IEvangelist
Copy link
Member

You will need to also update the toc file to have the correct grouping for this new file.

@IEvangelist would it be possible to introduce folders so we can avoid the need for toc update? I also have some complex toc for the analyzers in another PR.

Folders don't have any impact on the TOC. While you can structure your files however you deem necessary, they're not related to the TOC. The TOC is managed via the toc.yml.

@adegeo
Copy link
Contributor

adegeo commented Dec 20, 2023

@Evangelink @IEvangelist folders do impact SEO and I believe we're already at the limit before we get dinged.

@Evangelink
Copy link
Member

Folders don't have any impact on the TOC. While you can structure your files however you deem necessary, they're not related to the TOC. The TOC is managed via the toc.yml.

That's interesting. I have added a lot of docs for CAxxxx rules and I have never touched the toc.yml and yet the grouping is working as expected.

folders do impact SEO and I believe we're already at the limit before we get dinged.

Is there a way to have something similar to https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822 for us in testing without having the folders? https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822? I mean I would like to have something like https://learn.microsoft.com/dotnet/core/testing/mstest/analyzers/MSTEST0001 and https://learn.microsoft.com/dotnet/core/testing/mstest/runner/intro instead of https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-runner-intro

@adegeo
Copy link
Contributor

adegeo commented Dec 20, 2023

Folders don't have any impact on the TOC. While you can structure your files however you deem necessary, they're not related to the TOC. The TOC is managed via the toc.yml.

That's interesting. I have added a lot of docs for CAxxxx rules and I have never touched the toc.yml and yet the grouping is working as expected.

Someone probably did it for you and you just didn't notice ;) we do that a lot with the TOC.

folders do impact SEO and I believe we're already at the limit before we get dinged.

Is there a way to have something similar to https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822 for us in testing without having the folders? https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822? I mean I would like to have something like https://learn.microsoft.com/dotnet/core/testing/mstest/analyzers/MSTEST0001 and https://learn.microsoft.com/dotnet/core/testing/mstest/runner/intro instead of https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-runner-intro

things like CA1822 are error/warning codes and are really reference articles with a very specific search term (CA1822). That term is probably not used in other articles very much and we don't have to worry about other articles interfering with its SEO capabilities. And we sort of expect users to F1 in visual studio and get a direct link to them. Conceptual articles like this one that teach someone how to enable something, we expect them to find by searching for things like "How do I enable MSTest?" so SEO is important here. Google deprioritizes articles with lots of folder segments because they look like spam sites: http://..../new/items/for/sale/list.html

@Evangelink
Copy link
Member

things like CA1822 are error/warning codes and are really reference articles with a very specific search term (CA1822). That term is probably not used in other articles very much and we don't have to worry about other articles interfering with its SEO capabilities. And we sort of expect users to F1 in visual studio and get a direct link to them. Conceptual articles like this one that teach someone how to enable something, we expect them to find by searching for things like "How do I enable MSTest?" so SEO is important here. Google deprioritizes articles with lots of folder segments because they look like spam sites: http://..../new/items/for/sale/list.html

I am actually asking for #38845 where I am adding analyzers for MSTest. I do expect the same logic where users will F1 on VS and will look up for the analyzer code. This is also similar to the SYSLIBxxxx issues https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslib0014

@adegeo
Copy link
Contributor

adegeo commented Dec 20, 2023

Yeah, that's fine and makes sense for more analyzer content.

@nohwnd nohwnd requested a review from a team as a code owner December 21, 2023 12:48
Co-authored-by: David Pine <david.pine@microsoft.com>
@nohwnd
Copy link
Member Author

nohwnd commented Jan 3, 2024

@adegeo I addressed all the feedbacks now. Can you please accept and merge? :)

@Evangelink
Copy link
Member

Ping @adegeo @IEvangelist

Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more nits, otherwise let's :shipit:

Co-authored-by: David Pine <david.pine@microsoft.com>
@IEvangelist IEvangelist requested a review from adegeo January 9, 2024 18:54
@Evangelink
Copy link
Member

A few more nits, otherwise let's :shipit:

Awesome, thanks! I have applied the changes.

@IEvangelist IEvangelist enabled auto-merge (squash) January 9, 2024 18:55
Copy link
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@IEvangelist IEvangelist merged commit 9404b71 into dotnet:main Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants