junit.testlogger
junit.testlogger copied to clipboard
Member data not included in output name
Hello.
I am currently getting a similar issue to https://github.com/spekt/junit.testlogger/issues/42. I thought originally it was the same issue, but after updating to the latest version (3.0.110
) I'm still getting the issue. After reading the issue properly, I realised that my cause was slightly different.
Providing the following test in xunit
(member data instead of static inputs)
public static IEnumerable<object[]> ValidationTests
{
get
{
List<object[]> tests = new List<object[]>();
tests.Add(new object[] { new ValidationTest() });
tests.Add(new object[] { new ValidationTest() });
return tests;
}
}
[Theory]
[MemberData(nameof(ValidationTests))]
public async Task When_ValidOrInvalidDataIsProvided_Then_ValidationErrorsOccurAccordingly(ValidationTest test)
{
}
I'm getting the following output
<testcase classname="My.Test.Class.Name" name="name.When_ValidOrInvalidDataIsProvided_Then_ValidationErrorsOccurAccordingly" time="0.0147381" />
<testcase classname="My.Test.Class.Name" name="name.When_ValidOrInvalidDataIsProvided_Then_ValidationErrorsOccurAccordingly" time="0.0118888" />
<testcase classname="My.Test.Class.Name" name="name.When_ValidOrInvalidDataIsProvided_Then_ValidationErrorsOccurAccordingly" time="0.0003662" />
I would expect similar to https://github.com/spekt/junit.testlogger/issues/42 that each test would include perhaps the ToString representation of ValidationTest
I'm also impacted by this; it looks like it doesn't detect the xunit theory parameters when emitting the name
in the test results. Reverting to older versions does not fix it.
This then causes issues with GitLab counting test results, as mentioned in here: https://github.com/spekt/junit.testlogger/issues/42#issuecomment-845568248
I also just noticed this issue. It would be nice if the theory data was in the test name.
This should be resolved as of 3.0.114
@Siphonophora according your comment this ticket was fixed in 3.0.114
but version 3.0.124
does not provide parameters to the report for the xUnit tests again. I checked both packages and it works properly for 3.0.114 version only.
Is it known problem?