Tooling: Tests are grouped under the "No Traits" section in the Test Explorer even though the class has a [Trait] attribute

Created on 23 Jul 2016  路  5Comments  路  Source: aspnet/Tooling

Cross-post from dotnet/core#134

Cross posting from xunit/xunit#889

I have set up my controller tests for a .net core web api xproj.

I have a TraitAttribute on the class, but it's not showing up in the Test Explorer in VS.

My dependencies have "dotnet-test-xunit": "1.0.0-_" and "xunit": "2.2.0-_" and the test runner is set up as "testRunner": "xunit".

Have I hit a bug or am I doing something wrong? I'm hoping I'm doing something wrong 馃槃

/cc @TheBeardedLlama

Most helpful comment

any news on this? @piotrpMSFT

All 5 comments

@blackdwarf iirc this is something that's not accommodated by the protocol used by dotnet-test at the moment. @piotrpMSFT is that right?

@livarcocc though a design for traits has been discussed, I don't believe it has been implemented. Is that correct?

@piotrpMSFT Also experiencing this issue... seems MSTest V2 Framework for .Net Core supports the ability to place the TestCategory attribute at the level of a class or assembly. Wonder why other unit test frameworks cannot do the same?

Moreover test discovery is failing for xUnit in VS2015 when target is x64 as per this issue: https://github.com/xunit/xunit/issues/850#issuecomment-231638445

When will this be implemented? Or can I implement that myself? @piotrpMSFT
Is dotnet-test-xunit open sourced somewhere?

any news on this? @piotrpMSFT

Was this page helpful?
0 / 5 - 0 ratings