junit.testlogger icon indicating copy to clipboard operation
junit.testlogger copied to clipboard

Need test name to include parameter for Theory test case

Open chaintng opened this issue 2 years ago • 4 comments

image

C# support Theory test case https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test#add-more-tests

That has parameter in the test function

This should include in the test name Otherwise, it will show the same test case for all parameter

I tried to look into the code, but i'm not sure do we have this value in TestResultInfo class yes

If yes, please help advise, i can help contribute

Thank you so much.

chaintng avatar May 11 '22 13:05 chaintng

@chaintng Hi. This is actually going to be in our next release. You can use the feature in the preview package on our MyGet feed. https://www.myget.org/feed/spekt/package/nuget/JunitXml.TestLogger

Siphonophora avatar May 16 '22 14:05 Siphonophora

@Siphonophora how can i see the source code? Could you please advise which parameter should i gave to get this output ?

chaintng avatar May 17 '22 10:05 chaintng

Most of the source is in another repo. You are probably interested in this file: https://github.com/spekt/testlogger/blob/master/src/TestLogger/Extensions/XunitTestAdapter.cs

The theory data should be there by default now, with the version in MyGet. If that isn't working, please provide an example I can look at.

Siphonophora avatar May 17 '22 12:05 Siphonophora

@chaintng Actually, we just released that package to nuget, so you don't need to get it from MyGet.

Siphonophora avatar May 18 '22 13:05 Siphonophora