Search code examples
c#traitsvisual-studio-2017test-explorer

Visual Studio 2017 Test Explorer Trait Discovery: Shows more than TestCategory()


In VS2017 all attributes seems to show up in the "Traits" view of Test Explorer. See below of the code and the Test Explorer Window. There used to only be so many attributes that would show up in the first place. Does anyone know if there is a way to keep VS from discovering attributes that shouldn't be there? There is no way that Description() and WorkItem() showing up in the test window helps. Each test would have a different description and then your test explorer would be bloated. Maybe this is a bug.......

Code:

    [TestCategory("Design - Login - Negative")]
    [TestCategory("Design")]
    [TestCategory("Negative")]
    [Description("Bob")]
    [WorkItem(7280), TestMethod]
    public async Task GetToken_Failure()
    {...}

Test Explorer Results:

enter image description here


Solution

  • MS probably agreed that it was a bug as it no longer happens on VS 2017 community version 15.3.5