aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

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

Open blackdwarf opened 8 years ago

blackdwarf commented 8 years ago

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

mlorbetske commented 8 years ago

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

TheRealPiotrP commented 8 years ago

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

MedAnd commented 8 years ago

@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

zwcloud commented 7 years ago

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

olivif commented 7 years ago

any news on this? @piotrpMSFT