-
Notifications
You must be signed in to change notification settings - Fork 14
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
[JENKINS-72970] Allow selecting XUnit in the web interface #118
Conversation
|
@@ -152,6 +152,7 @@ public ListBoxModel doFillParserItems() { | |||
add(options, Parser.PIT); | |||
add(options, Parser.JUNIT); | |||
add(options, Parser.NUNIT); | |||
add(options, Parser.XUNIT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in the selection list of the available parsers it would make sense to show all parsers. Can you replace that with a lop (stream) of Parser.values()
, then this will not happen again?
Thanks for your PR! Actually the other testing parsers are not really integrated and tested right now. It was a prototype for JUnit and Java coverage tools to map test cases to coverage information. So in particular:
For this to work the enum should be extended: we should distinguish between tests and coverage results. Then we do not need to check for the exact enum value. Maybe a boolean enum (TEST, COVERAGE) as property?
I think here the same boolean property in the enum could work. In practice the idea was to have a step that collets coverage and tests and shows the results below the coverage-icon. So the tests are ignored for the icon. But in theory, one could specify a step with tests only. I'm not sure if it makes sense to take care of that as well. |
Thanks for the feedback. I tried to package the plugin locally and try it on my own Jenkins instance, but it seemed like the web UI broke, the post-build options for Coverage plugin were no longer visible in the list. Not sure if I didn't package and install it correctly or if my code change broke something. Either way, I will add the extra enum property and update the Edit: In the |
7dfe0c4
to
0f8b6c5
Compare
Looks like I broke something now. I'm using VSCode and it's not a great IDE the way I have things set up right now. I think the new version of |
dec7d64
to
5a6307e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my algorithm of test case mapping is broken 🙈
I am mapping test cases to the test cases, this makes no sense. So you get 8 test cases from 4 test cases now. I think I need to fix that part in the model first. Mapped tests should be removed from the tree, otherwise they count twice.
"symbol-footsteps-outline plugin-ionicons-api"), | ||
PIT(Messages._Parser_PIT(), "**/mutations.xml", | ||
PIT(Messages._Parser_PIT(), ParserType.TEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIT(Messages._Parser_PIT(), ParserType.TEST, | |
PIT(Messages._Parser_PIT(), ParserType.COVERAGE, |
plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageRecorder.java
Fixed
Show fixed
Hide fixed
|
|
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.1 to 4.3.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v4.1.1...v4.3.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.jenkins-ci.main:jenkins-core](https://github.com/jenkinsci/jenkins) from 2.448 to 2.453. - [Release notes](https://github.com/jenkinsci/jenkins/releases) - [Commits](jenkinsci/jenkins@jenkins-2.448...jenkins-2.453) --- updated-dependencies: - dependency-name: org.jenkins-ci.main:jenkins-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.netty:netty-bom](https://github.com/netty/netty) from 4.1.107.Final to 4.1.108.Final. - [Commits](netty/netty@netty-4.1.107.Final...netty-4.1.108.Final) --- updated-dependencies: - dependency-name: io.netty:netty-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.jenkins-ci:acceptance-test-harness](https://github.com/jenkinsci/acceptance-test-harness) from 5770.v81b_784f28b_d7 to 5814.vdc5d6d484b_40. - [Release notes](https://github.com/jenkinsci/acceptance-test-harness/releases) - [Commits](https://github.com/jenkinsci/acceptance-test-harness/commits) --- updated-dependencies: - dependency-name: org.jenkins-ci:acceptance-test-harness dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.16.1 to 2.17.0. - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.jenkins-ci.tools:maven-hpi-plugin](https://github.com/jenkinsci/maven-hpi-plugin) from 3.53 to 3.54. - [Release notes](https://github.com/jenkinsci/maven-hpi-plugin/releases) - [Commits](jenkinsci/maven-hpi-plugin@maven-hpi-plugin-3.53...maven-hpi-plugin-3.54) --- updated-dependencies: - dependency-name: org.jenkins-ci.tools:maven-hpi-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps `arcmutate.git.version` from 1.2.0 to 1.2.1. Updates `com.arcmutate:pitest-git-maven-plugin` from 1.2.0 to 1.2.1 Updates `com.arcmutate:pitest-github-maven-plugin` from 1.2.0 to 1.2.1 --- updated-dependencies: - dependency-name: com.arcmutate:pitest-git-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.arcmutate:pitest-github-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.jenkins.tools.incrementals:git-changelist-maven-extension](https://github.com/jenkinsci/incrementals-tools) from 1.7 to 1.8. - [Release notes](https://github.com/jenkinsci/incrementals-tools/releases) - [Commits](jenkinsci/incrementals-tools@parent-1.7...parent-1.8) --- updated-dependencies: - dependency-name: io.jenkins.tools.incrementals:git-changelist-maven-extension dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.jenkins-ci.main:jenkins-core](https://github.com/jenkinsci/jenkins) from 2.453 to 2.454. - [Release notes](https://github.com/jenkinsci/jenkins/releases) - [Commits](jenkinsci/jenkins@jenkins-2.453...jenkins-2.454) --- updated-dependencies: - dependency-name: org.jenkins-ci.main:jenkins-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.netty:netty-bom](https://github.com/netty/netty) from 4.1.108.Final to 4.1.109.Final. - [Commits](netty/netty@netty-4.1.108.Final...netty-4.1.109.Final) --- updated-dependencies: - dependency-name: io.netty:netty-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [edu.hm.hafner:codingstyle-pom](https://github.com/uhafner/codingstyle-pom) from 3.44.0 to 4.5.0. - [Release notes](https://github.com/uhafner/codingstyle-pom/releases) - [Changelog](https://github.com/uhafner/codingstyle-pom/blob/main/CHANGELOG.md) - [Commits](uhafner/codingstyle-pom@v3.44.0...v4.5.0) --- updated-dependencies: - dependency-name: edu.hm.hafner:codingstyle-pom dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.jenkins.plugins:data-tables-api](https://github.com/jenkinsci/data-tables-api-plugin) from 2.0.1-1 to 2.0.3-1. - [Release notes](https://github.com/jenkinsci/data-tables-api-plugin/releases) - [Changelog](https://github.com/jenkinsci/data-tables-api-plugin/blob/main/CHANGELOG.md) - [Commits](jenkinsci/data-tables-api-plugin@v2.0.1-1...v2.0.3-1) --- updated-dependencies: - dependency-name: io.jenkins.plugins:data-tables-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
|
Cheers! Thanks for picking this up. I'm going to try it out with xunit output soon when I get a chance. |
@@ -25,7 +25,7 @@ | |||
<gitHubRepo>jenkinsci/coverage-plugin</gitHubRepo> | |||
|
|||
<!-- Library Dependencies Versions --> | |||
<coverage-model.version>0.41.0</coverage-model.version> | |||
<coverage-model.version>0.43.0</coverage-model.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would have been nice to separate the update of the coverage model to an other PR or at least make sure it appear on the release notes
I think it cause some regression on my side when merging JACOCO and COBERTURA reports for a mono-repo application
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally I am inlining the changes of the coverage-model. In this case the upgrade was required for this PR so I forgot to add it here as well.
This adds
Parser.XUNIT
to thedoFillParserItems()
method to make it show up (I think) as an option in the web interface with freestyle projects. I've created an issue on JIRA: https://issues.jenkins.io/browse/JENKINS-72970Doesn't seem to work currently.
I've also found that other places (see below) mentioning
Parser.JUNIT
but notParser.NUNIT
orParser.XUNIT
. Should those also be included because all of them are test results and not regular code coverage?coverage-plugin/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageRecorder.java
Lines 451 to 461 in 50cbf0d
coverage-plugin/plugin/src/main/java/io/jenkins/plugins/coverage/metrics/steps/CoverageRecorder.java
Lines 539 to 546 in 50cbf0d
Testing done
Automated test only
Submitter checklist