Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member data not included in output name #50

Closed
BottlecapDave opened this issue Dec 7, 2021 · 4 comments
Closed

Member data not included in output name #50

BottlecapDave opened this issue Dec 7, 2021 · 4 comments

Comments

@BottlecapDave
Copy link

Hello.

I am currently getting a similar issue to #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 #42 that each test would include perhaps the ToString representation of ValidationTest

@hach-que
Copy link

hach-que commented Dec 26, 2021

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: #42 (comment)

hach-que added a commit to RedpointArchive/testlogger-hq that referenced this issue Dec 26, 2021
This fixes spekt/junit.testlogger#50 by including the Xunit theory parameters in test names.
hach-que added a commit to RedpointArchive/testlogger-hq that referenced this issue Dec 26, 2021
This fixes spekt/junit.testlogger#50 by including the Xunit theory parameters in test names.
hach-que added a commit to RedpointArchive/testlogger-hq that referenced this issue Dec 26, 2021
This fixes spekt/junit.testlogger#50 by including the xUnit theory parameters in test names.
hach-que added a commit to RedpointArchive/testlogger-hq that referenced this issue Dec 26, 2021
This fixes spekt/junit.testlogger#50 by including the xUnit theory data in test names.
@Hackmodford
Copy link

I also just noticed this issue. It would be nice if the theory data was in the test name.

@Siphonophora
Copy link
Collaborator

This should be resolved as of 3.0.114

@mikhail-vazhenin
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants