Search code examples
visual-studio-2015asp.net-coremstestasp.net-core-testhost

VS2015 Test Explorer doesn't detect traits in AspNetCore project


For some reason, Test Explorer in my VS2015 Community Edition doesn't detect traits in AspNetCore test project. I am using mstest testRunner.

All test methods go into "No Traits" category despite proper TestCategory annotations.

  1. I have tried both single annotation and several ones (which actually I am trying to capitalize on).
  2. I have trying assigning them to test class and test method.
  3. I am using the latest nuget packages for test-related dependencies:
    1. "dotnet-test-mstest": "1.1.2-preview",
    2. "MSTest.TestFramework": "1.1.11",
    3. "Microsoft.AspNetCore.TestHost": "1.1.0",

What am I doing wrong?


Solution

  • Please try with the latest version (1.1.11) of the MSTest test framework and adapter:

    Framework: https://www.nuget.org/packages/MSTest.TestFramework/

    Adapter: https://www.nuget.org/packages/MSTest.TestAdapter/

    Also, please use VS2017 (this was not supported via VS2015).

    Let me know if you still see the issue.