c# – Visual Studio 2022 not showing unit tests by group


I am new to unit testing and have set a bunch up. I wanted to be able to group them so I can run tests based on group if necessary. I have set up a few of my test methods like this based on a Microsoft article:

 [TestMethod, TestCategory("ReCaptcha")]
 public async Task TestValidateGoogleReCaptcha_NullResponse(){
   // some code here
}

I have done this on 3 test methods and selected the group by “traits” in the group by drop down. The others I have no TestCategory. It says all of my test have no traits

enter image description here

I cannot figure out what I am missing. Does anyone have the same issue and a possible fix?
Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *