-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[boschshc] Boost unit test coverage #16500
Conversation
Note: this PR is just about the commit with the unit tests, it needs to be rebased after #16400 is merged. |
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
Rebased on main - can be reviewed now 😎 |
Do you use some kind of test coverage analysis? @holgerfriedrich uses jacoco for knx, also used in bmw binding, that seems a solid tool. |
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.
LGTM. Thanks for adding tests !
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. |
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
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>
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>
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
Boosts the unit test coverage for the `boschshc` binding in `src/main/java` to 94%. Signed-off-by: David Pace <dev@davidpace.de>
Boosts the unit test coverage for the
boschshc
binding insrc/main/java
to 94%.
Main code changes:
BridgeHandler
)Test code changes:
super.beforeEach()
callslenient()
configurations