[boschshc] Boost unit test coverage#16500
Merged
lsiepel merged 1 commit intoopenhab:mainfrom Mar 31, 2024
Merged
Conversation
Member
Author
|
Note: this PR is just about the commit with the unit tests, it needs to be rebased after #16400 is merged. |
This was referenced Mar 8, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Main code changes: * made some methods package-protected in order to be testable * fix typo in exception message (in class `BridgeHandler`) Test code changes: * add lots of additional tests * refactor redundant tests to parameterized tests * add utility class providing arguments for common parameterized tests * fix a problem caused by wrong order of `super.beforeEach()` calls * remove unnecessary `lenient()` configurations Signed-off-by: David Pace <dev@davidpace.de>
b321e72 to
702f4bd
Compare
Member
Author
|
Rebased on main - can be reviewed now 😎 |
Contributor
Do you use some kind of test coverage analysis? @holgerfriedrich uses jacoco for knx, also used in bmw binding, that seems a solid tool. |
lsiepel
approved these changes
Mar 31, 2024
Contributor
lsiepel
left a comment
There was a problem hiding this comment.
LGTM. Thanks for adding tests !
Member
Author
|
Hi @lsiepel, I use EclEmma which uses JaCoCo under the hood. I have also used the JaCoCo Maven Plug-In in several projects in order to make the coverage visible in SonarQube, for example. It works very well 👍 The only thing I remember is that the Maven configuration can be complicated if results should be aggregated. |
lo92fr
pushed a commit
to lo92fr/openhab-addons
that referenced
this pull request
Apr 30, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
adr001db
pushed a commit
to adr001db/openhab-addons
that referenced
this pull request
May 12, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de> Signed-off-by: Alexander Drent <Alex@Drent-ict.nl>
pgfeller
pushed a commit
to pgfeller/openhab-addons
that referenced
this pull request
Sep 29, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
joni1993
pushed a commit
to joni1993/openhab-addons
that referenced
this pull request
Oct 15, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
matchews
pushed a commit
to matchews/openhab-addons
that referenced
this pull request
Oct 18, 2024
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
cipianpascu
pushed a commit
to cipianpascu/openhab-addons
that referenced
this pull request
Jan 2, 2025
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boosts the unit test coverage for the
boschshcbinding insrc/main/javato 94%.
Main code changes:
BridgeHandler)Test code changes:
super.beforeEach()callslenient()configurations