jenkinsci / embeddable-build-status-plugin

Embed build status of Jenkins jobs in web pages
https://plugins.jenkins.io/embeddable-build-status/
MIT License
166 stars 261 forks source link

[JENKINS-70464] Test `AddEmbeddableBadgeConfigStep` #244

Closed abhishekmaity closed 1 year ago

abhishekmaity commented 1 year ago

In response #114,

Testing done

Screenshot 2023-10-02 200258

After changes, test coverage stands as shown below

Screenshot 2023-10-02 195611

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
abhishekmaity commented 1 year ago

@MarkEWaite added a test case to improve code coverage.

MarkEWaite commented 1 year ago

@MarkEWaite added a test case to improve code coverage.

Very good. That's a nice step.

There are some things that can improve in your development process. The plugin uses automated source code formatting so that source code formatting differences do not distract maintainers when reviewing proposed code changes. Your pull request has not been formatted with the automated source code formatter. That indicates you did not run the command mvn verify to run the tests and confirm the static analysis checks pass (like spotbugs and source code formatting).

Before submitting a pull request, it is a good practice to run mvn verify, since that is what will be done by the CI job. The CI job failed because you need to update the formatting of the source code. . When you run mvn verify, you'll see a failure message that advises you to run mvn spotless:apply

Run the command mvn spotless:apply to format the source code, then push the resulting commit to the repository.

A little more info about source formatting is in the contributing guide.

abhishekmaity commented 1 year ago

@MarkEWaite added a test case to improve code coverage.

Very good. That's a nice step.

There are some things that can improve in your development process. The plugin uses automated source code formatting so that source code formatting differences do not distract maintainers when reviewing proposed code changes. Your pull request has not been formatted with the automated source code formatter. That indicates you did not run the command mvn verify to run the tests and confirm the static analysis checks pass (like spotbugs and source code formatting).

Before submitting a pull request, it is a good practice to run mvn verify, since that is what will be done by the CI job. The CI job failed because you need to update the formatting of the source code. . When you run mvn verify, you'll see a failure message that advises you to run mvn spotless:apply

Run the command mvn spotless:apply to format the source code, then push the resulting commit to the repository.

A little more info about source formatting is in the contributing guide.

@MarkEWaite Thanks for pointing out this important aspect. mvn verify and mvn spotless:apply now applied to PR

abhishekmaity commented 1 year ago

Thanks! This is a great start. Would love to have additional pull requests that further improve the test coverage.

@MarkEWaite Yes, I will try to my best knowledge.