-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add tests to SpecialValueParameterResolverExtensionTest #349
Add tests to SpecialValueParameterResolverExtensionTest #349
Conversation
…ionTest.java class in the embeddable status plugins line coverage is 92% and branch coverage increased to 50%
…ionTest.java class in the embeddable status plugins line coverage is 92% and branch coverage increased to 50%
…eter-resolver-extension-tests
…ionTest.java class in the embeddable status plugins line coverage is 92% and branch coverage increased to 50%
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.
Thanks for the pull request. The coverage increase seems to be 0%, but the tests are not harmful and they run quickly enough that they may help.
.../java/org/jenkinsci/plugins/badge/extensions/SpecialValueParameterResolverExtensionTest.java
Outdated
Show resolved
Hide resolved
.../java/org/jenkinsci/plugins/badge/extensions/SpecialValueParameterResolverExtensionTest.java
Outdated
Show resolved
Hide resolved
.../java/org/jenkinsci/plugins/badge/extensions/SpecialValueParameterResolverExtensionTest.java
Outdated
Show resolved
Hide resolved
.../java/org/jenkinsci/plugins/badge/extensions/SpecialValueParameterResolverExtensionTest.java
Outdated
Show resolved
Hide resolved
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.
Thanks!
Welcome, Hey @MarkEWaite I cant seem to find any answers to my question on how do I go about adding more automated tests that would help increase the coverage for the classes I really want to contribute and am eager to learn things even if they force me to go outside my comfort zone, I am not getting any definitive answers or even approach that would help me point in the right direction. I am getting ignored by all, I prefer a stern way of knowing if my requests are not appropriate and more clear. Do help me I would really enjoy to do hard things even if they are beyond my reach now maybe expanding my time horizon would make things fit more perfectly in the long run |
Sorry I did try to increase coverage but I feel short on it. I am learning about JUnit5 as of now to understand more clearly about testing |
I'm sorry to hear that your questions are not getting definitive answers. That may indicate that others are too busy to respond or they may not understand how to respond in a way that will help. I'm in the very late stages of preparing for a major Jenkins release 30 Oct 2024. Jenkins 2.479.1 will drop support for Java 11, require Java 17 as the minimum Jenkins version, upgrade Spring Security 5 to Spring Security 6, upgrade Java EE 8 to Jakarta EE 9, and upgrade Jetty 10 to Jetty 12. You can read the release checklist if you'd like to see some of the steps that are being taken.
If your requests are not appropriate, I'm sure that someone will tell you. I've not felt any concern with your requests, I just haven't had time to respond to them.
I've found that the best way that I can develop automated tests is to use my integrated development environment (IDE) to create empty test methods, then I set breakpoints in the target code and write test code to reach those breakpoints. I often find that the most effective way to write a new test is to read the code that someone else wrote to test something similar. When I look at the coverage report on the files tab of the ci.jenkins.io build, I see that only 4 of the Java source files show coverage of less than 80%. Those 4 files are:
Those seem like the best place to spend your effort. The JobBadgeActionTest includes a JenkinsRule that creates a FreesStyleProject and uses a JenkinsRule. That is a very common testing pattern in Jenkins plugins. |
Well thank you so much for taking the time and effort to respond to my request and clarifying, I am sorry to reach you at such a time where most of your efforts are required for a release. I will remember this before making any requests in the future.
Sure would love to learn about it.
Alright I would try this approach and Thank you for pointing out the classes which need more of the attention, coverage and tests and narrowing down the problem for me. I really do appreciate you helping me out and the community |
I have tried to increase the branch coverage in the Specialvalueparameterresolverextensiontest class form 33% to 50%
Testing done
Automated tests pass
Submitter checklist