jenkinsci / next-executions-plugin

Adds a widget in the sidebar with the next build date for all the scheduled projects. It also creates a column definition
https://plugins.jenkins.io/next-executions/
MIT License
9 stars 23 forks source link

Missing test coverage #56

Open jonesbusy opened 8 months ago

jonesbusy commented 8 months ago

What feature do you want to see added?

This plugin miss some essential testing to validate non-regression

Unit tests HTMLUnit for UI configuration Jenkins Configuration Test

More information on https://www.jenkins.io/doc/developer/testing/

Upstream changes

No response

Rachit1313 commented 8 months ago

Could you please provide a bit info like you need tests for which files?

jonesbusy commented 8 months ago

This plugin doesn't have any test (You can check that there is no 'test' folder in 'src'). So any test is better than nothing.

Feel free to submit a PR

debayangg commented 6 months ago

I added one unit test in NextBuildsTest. Should I create a PR or add some more tests? Also could you advise on which functions should be tested.

jonesbusy commented 6 months ago

I added one unit test in NextBuildsTest. Should I create a PR or add some more tests? Also could you advise on which functions should be tested.

Any test is better than nothing. You can run mvn -Penable-jacoco clean verify and check the report on target/site/jacoco/index.html to check the coverage and check code not covered.

Feel free to open a PR and I will review it