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

Analyzer: DynamicData should be valid #2237

Closed
Evangelink opened this issue Feb 1, 2024 · 6 comments · Fixed by #3374
Closed

Analyzer: DynamicData should be valid #2237

Evangelink opened this issue Feb 1, 2024 · 6 comments · Fixed by #3374

Comments

@Evangelink
Copy link
Member

Evangelink commented Feb 1, 2024

Summary

Title: DynamicData should be valid
Category: Usage
Description:
Default severity: Warning

Please refer to MSTEST0003: Test methods should have valid layout.

Non exhaustive list of constraints:

  • public (except if discover internals)
  • static
  • member should match kind declared on the attribute (property or method)
  • member should exist
  • member return type should be valid (IEnumerable<object[]> or IEnumerable<(Value)Tuple<...>>)
  • if member is property it should be gettable
  • if member is method, it should not have parameters

AB#1950780

@nohwnd
Copy link
Member

nohwnd commented Feb 1, 2024

Would be perfect if this could compare the count and type of parameters when IEnumerable is used.

@Evangelink
Copy link
Member Author

Thanks! I definitely missed these cases here but I described them in the global analyzers ticket.

@testplatform-bot
Copy link
Contributor

✅ Successfully linked to Azure Boards work item(s):

@engyebrahim engyebrahim self-assigned this Feb 5, 2024
@Evangelink
Copy link
Member Author

@engyebrahim As discussed, postponing to milestone 3.4

@Evangelink Evangelink modified the milestones: 3.3.0, 3.4.0 Feb 21, 2024
@xcaptain
Copy link

I also have a issue with DynamicData in vscode test explorer. same cause here?

image

@Evangelink

@nohwnd
Copy link
Member

nohwnd commented Feb 27, 2024

Moved the above issue to a separate one. This is a work item to create the analyzer, not an issue report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants