You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running MSTest on attached project causes warning. This we have observed for a long time previously (e.g. 3.2.2) this was UTA001. Using MSTest 3.3.1 and now the below warning occurs.
[MSTest][Discovery][C:\git\issues\MSTestUTA001\Reproduction.Settings.Test\bin\Debug\net8.0\Reproduction.Settings.Test.dll]
TestClass attribute defined on generic non-abstract class Reproduction.Settings.Test.ProjectSettingsTestBase`1
While this warning is fine, it is not possible to disable it, which we would like.
Possibility to disable the warning and hence avoid it.
Actual behavior
Warning.
I understand the coding pattern is perhaps a bit unusual but it allows us to reuse tests across many different types, without having to rewrite TestMethod stuff, so unless this can be done similarly we would like to disable the warning. Preferable for the specific types.
AB#2050329
The text was updated successfully, but these errors were encountered:
Hi @nietras! Thanks for the bug report and the cool repro!
I have done a quick investigation of the issue and I think there is a relatively big problem with the type cache on MSTest. Indeed, the cache is retrieving attributes using inheritance and although the validation method asks for non-inherited attributes, because of the cache, we retrieve inherited and so we end up reporting.
Describe the bug
Running MSTest on attached project causes warning. This we have observed for a long time previously (e.g. 3.2.2) this was
UTA001
. Using MSTest 3.3.1 and now the below warning occurs.While this warning is fine, it is not possible to disable it, which we would like.
Steps To Reproduce
dotnet test
Expected behavior
Possibility to disable the warning and hence avoid it.
Actual behavior
Warning.
I understand the coding pattern is perhaps a bit unusual but it allows us to reuse tests across many different types, without having to rewrite TestMethod stuff, so unless this can be done similarly we would like to disable the warning. Preferable for the specific types.
AB#2050329
The text was updated successfully, but these errors were encountered: