Skip to content
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 test for PublicBuildStatusAction to increase coverage #367

Merged
merged 4 commits into from
Dec 24, 2024

Conversation

yashpal2104
Copy link
Contributor

Testing done

Increased test coverage for PublicBuildStatusActionTest class

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did

@yashpal2104 yashpal2104 requested a review from a team as a code owner December 23, 2024 19:37
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 23, 2024
yashpal2104 and others added 2 commits December 24, 2024 01:17
A not null assertion is weaker than an assertion that checks for specific
content.  Let's check for specific content in the returned string rather
than just checking that the string is not null.
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much!

I strengthened the assertions by asserting for specific content in the returned strings rather than only checking that they are not null. I also removed the unused action variable in the test methods since it was unused.

@MarkEWaite MarkEWaite enabled auto-merge (squash) December 24, 2024 14:31
@MarkEWaite MarkEWaite merged commit d7aa9a8 into jenkinsci:master Dec 24, 2024
18 checks passed
@yashpal2104
Copy link
Contributor Author

Good to know a new feature was added in the release to help us in more thorough testing!

@yashpal2104 yashpal2104 deleted the publicBuildActionTests branch December 24, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants