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

Support easy log assertions for RealJenkinsRule logs as well #891

Open
gbhat618 opened this issue Jan 7, 2025 · 0 comments
Open

Support easy log assertions for RealJenkinsRule logs as well #891

gbhat618 opened this issue Jan 7, 2025 · 0 comments

Comments

@gbhat618
Copy link

gbhat618 commented Jan 7, 2025

What feature do you want to see added?

Currently there is no easy apis to record logs and assert them in RealJenkinsRule, as how it exists in JenkinsRule.

There some PRs where log based assertions are done by setting up log recorders,
jenkinsci/jenkins#9331, jenkinsci/google-compute-engine-plugin#503

Two problems are,

  • It is hard for new developers to discover to how to write such tests
  • code duplicate for same work

But with, JenkinsRule, we can use LoggerRule and RuleChain (example), which is very easy.

This issue propose to implement utility class/methods to work with RealJenkinsRule, to easily create log recorder, support level, number of log lines, log message retrieval method, assertion methods.

Note: check jenkinsci/google-compute-engine-plugin#503 (comment)

Upstream changes

No response

Are you interested in contributing this feature?

yep, will try 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant