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

[tests] Analyzer / code fix provider for UITest [Test] without [Category] #23287

Merged
merged 10 commits into from
Jul 4, 2024

Conversation

Redth
Copy link
Member

@Redth Redth commented Jun 26, 2024

Description of Change

We want to ensure that all of our NUnit UITests have a [Category] attribute assigned to them either at the method level or class level. This is a simple analyzer and code fix provider to ensure this happens in the relevant projects.

The goal is not to ship this anywhere, but to consume from the repo ourselves.

The project reference has a few notable properties to reference it directly:

<ProjectReference Include="..\..\..\TestUtils\src\UITest.Analyzers\UITest.Analyzers.csproj"
  PrivateAssets="all"
  ReferenceOutputAssembly="false"
  OutputItemType="Analyzer" />

We can add more analyzers later as needed, and we can reuse this pattern in another project in the future for other types of analyzers that we may want to eventually ship with .NET MAUI itself.

@Redth Redth requested a review from a team as a code owner June 26, 2024 21:00
@PureWeen PureWeen added the area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions label Jun 27, 2024
@jfversluis jfversluis added the area-testing Unit tests, device tests label Jun 27, 2024
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Nice!

Not sure if you also need to add it to the main Microsft.Maui.sln. This may also need to be added to the vscode sln - basically any sln or slnf that has the UI tests.

@jfversluis
Copy link
Member

Note to self: the categories added in this PR need to be added to #22609

mattleibow
mattleibow previously approved these changes Jul 3, 2024
@jfversluis jfversluis self-assigned this Jul 4, 2024
@jfversluis jfversluis enabled auto-merge (squash) July 4, 2024 08:49
@jfversluis jfversluis merged commit 9674151 into main Jul 4, 2024
47 checks passed
@jfversluis jfversluis deleted the dev/redth/uitest-analyzers branch July 4, 2024 10:46
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Aug 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-infrastructure CI, Maestro / Coherency, upstream dependencies/versions area-testing Unit tests, device tests fixed-in-8.0.70 fixed-in-net9.0-nightly This may be available in a nightly release!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants