-
Notifications
You must be signed in to change notification settings - Fork 15
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
Indicate framework in produced xml file #34
Comments
Hi @thj-dk Sounds like their plugin is looking at the I think a config flag would probably be the right way to go. Let me think about the cleanest option, but that wouldn't be difficult. You may have noticed we have a page explaining how to customize the xml output using existing config options to make these reports more readable in the GitLab UI. https://github.com/spekt/junit.testlogger/blob/master/docs/gitlab-recommendation.md If you want to help us put together something similar for Jenkins, that would be great. |
I have made some verification, and it turns out that the grouping is a combination of TestSuite name and package, and TestCase name from what I can see. So some way of prefixing both would be desired. I also found a different bug. The time attribute of the testcase element has a incorrect decimal separator that isn't understood by Jenkins If we can get this fixed I would be happy to contribute with a Jenkins-guide. |
To clarify, when you say both, do you mean TestSuite name and package? Maybe a short example file would be good. For the comma vs decimal, that's clearly a Culture issue. Do you know if the culture these are running under is "da-DK"? I can try to repo and get this fixed. |
In order to make everything show up correctly in Jenkins (we're using an older version here - 2.46), I have to prefix TestSuite name and package attributes with framework name (e.g. NETCoreApp31 and NETFramework471). The server culture is either da-DK or nb-NO, so in that regard, the comma decimal separator is correct. However I do not think that Jenkins understands that - only period. I do believe that these logger files should always be generated using period (just like the testsuite@time attribute is). |
That makes sense. I will let you know when there is a preview version for you to try |
I made some further experiments, and it turns out that specifying the testsuite name is actually enough for Jenkins to interpret the test files correctly. Then the tests shows up in Jenkins as e.g. So I guess that an options for specifying the testsuite@name is all that is required after all. And with support for placeholders, so we can do something like |
@thj-dk I added a command line flag |
@Siphonophora That is great, thank you so much. We can definitely make great use of this. However, did you consider just making an option for specifying the test-suite name directly? It doesn't have to contain the full assembly name. I think there could be many uses for setting this property to something entirely different, when one needs to be running tests in multiple contexts/environments etc. The default value could be the assembly name like it is today, but then make it configurable and let it support placeholders. So we can do I can give it a shot if you want me to. |
@thj-dk The other option I thought about was to give an option where the file name would be used for the Test Suite name. I thought I wouldn't mind an option like this: |
@thj-dk I didn't mean the file name and test suite name needed to be the same. I was thinking we might be simpler if we had an option for them to be the same. For the rest of your example, it looks like we need some more formatting options to make the report readable in Jenkins. Let me make up a little test suite we can use as an example, so we can look at the same xml output. For my notes. You are using https://plugins.jenkins.io/junit/ right? |
… improvements. See spekt#34 for further detail
I have a xUnit test project with multiple TargetFrameworks (netcoreapp3.1 and net471), and I'm generating multiple test results files using
LogFilePath={assembly}-{framework}.xml
.However, when importing these files using Jenkins JUnit plugin, the framework information is lost and we're unable to differentiate between test execution frameworks.
Do you know of any workaround? Maybe an option that makes it possible to specify/modify the testsuite name in the produced xml?
The text was updated successfully, but these errors were encountered: