microsoft / testfx

MSTest framework and adapter
MIT License
716 stars 253 forks source link

Adapter is not sending TestCategory traits in testcase object to testhost. #189

Closed Faizan2304 closed 7 years ago

Faizan2304 commented 7 years ago

From @antferreira

Description

.trx file generated by dotnet test don't have test categories information

Steps to reproduce

Create a test project with test methods annotated with [TestCategory("foo")]. Run dotnet test --logger "trx"

Expected behavior

.trx file with test categories information

Actual behavior

.trx file without test categories information

Environment

Windows 10 Pro 1607 MSTest.TestAdapter 1.1.17 MSTest.TestFramework 1.1.17 dotnet version 1.0.4

AbhitejJohn commented 7 years ago

This is working in VS IDE. Strange it isn't in trx. The adapter does not differentiate these two scenarios. Need to investigate this one.

jayaranigarg commented 7 years ago

Platform searches for TestProperty in list of properties by Id. This Id has changed for MSTestV2. That is the reason neither TPV1 nor TPV2 are able to find TestCategory properties. Changes need to be made in this part of code s.t. it does not check for any hard-coded category ID.

codito commented 7 years ago

@jayaranigarg any idea why the id was changed for MSTestv2? Just curious..

AbhitejJohn commented 7 years ago

@codito: Ah that was just to be consistent with the executor uri which has the v2 in it.