GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add a section on custom reporters. by kukimik · Pull Request #1225 · utPLSQL/utPLSQL

Conversation

@kukimik

@kukimik kukimik commented Aug 15, 2022

Copy link
Copy Markdown
Contributor

Custom reporters are mentioned in a few places in the docs. Also, README.md lists "plugin architecture for reporters and matchers" as one of the key features. But there is no section in the docs that actually describes how to add a custom reporter. I believe that this short description of the process may be useful (it would be useful for me).

Sorry - I didn't have time to build the website and check if it looks ok, but I don't see why it wouldn't. (I've had a revolution in my family life in the last few months, and now I hardly have time for anything)

I decided not to describe the necessary grants when the custom reporter is created outside of the UT3 schema. I state that this is not recommended, If someone wants to follow this path, let them do it at their own risk. Also, I'm not able to check it in different DB versions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jgebal reacted with heart emoji
All reactions
  • ❤️ 1 reaction
jgebal
jgebal reviewed Aug 16, 2022
View reviewed changes
Comment thread docs/userguide/reporters.md Outdated

No newline at end of file
# Custom reporters

It is possible to add your own reporters by creating an appropriate object type. In principle, it has to be a subtype of `ut_reporter_base`. However, in most cases, it is more convenient to create the custom reporter type under a more specialized type, like `ut_documentation_reporter` or `ut_junit_reporter`, and override just some of the functionality.

@jgebal jgebal Aug 16, 2022

Copy link
Copy Markdown
Member

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.

We need to distinguish between ut_reporter_base which is a foundation for any reporter and
ut_output_reporter_base which should be used as a base for reporter that is expected to produce output consumable by client (screen/file) outside of database.

Currently, all reporters in utPLSQL framework provide outputs to customer

If however you would like to create a reporter that saves data to a DB table for example, you should use ut_reporter_base

utPLSQL will behave differently based on what type they are build on.

For reporters built on ut_output_reporter_base utPLSQL will consume output of the reporter and put it to screen before finishing the ut.run() call. For reporters not based on that type, output will not be consumed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jgebal jgebal Aug 16, 2022

Copy link
Copy Markdown
Member

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.

You could build a reporter based on ut_console_reporter_base if you would like to produce a text output from reporter in different colors

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kukimik kukimik Aug 18, 2022

Copy link
Copy Markdown
Contributor Author

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.

Good points, thanks for the review. I'll improve the paragraph as suggested. I hope to do it over the weekend, but can't promise anything. I'm also going to mention where the core reporter types can be found in the repo.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jgebal reacted with heart emoji
All reactions
  • ❤️ 1 reaction

@jgebal jgebal Aug 21, 2022

Copy link
Copy Markdown
Member

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 Michał
I rally know how difficult it can be to find time & space to spend on writing some code outside of your da-to-day work. We appreciate all, even smallest contributions. They really make a difference.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kukimik kukimik Aug 23, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

@jgebal I force-pushed an updated version. I wasn't 100% sure what you meant by "For reporters built on ut_output_reporter_base utPLSQL will consume output of the reporter and put it to screen before finishing the ut.run() call. For reporters not based on that type, output will not be consumed.", so I didn't include this remark.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jgebal

jgebal commented Aug 16, 2022

Copy link
Copy Markdown
Member

@kukimik Thank you for contributions

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgebal

jgebal commented Aug 18, 2022

Copy link
Copy Markdown
Member

Thank you for the contribution @kukimik

I have added a suggestion to make the doc even better.
Please have a look at it whenever you have time.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kukimik

kukimik commented Aug 18, 2022

Copy link
Copy Markdown
Contributor Author

@jgebal I try to contribute to the open source projects that I use. For me it's both a way to get better understanding of the tool, and to say "thank you" to the authors/maintainers.

jgebal reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kukimik
Add a section on custom reporters.
53dc4d8
@kukimik
kukimik force-pushed the docs_custom_reporters branch from 32c6fd8 to 53dc4d8 Compare August 23, 2022 19:46
@kukimik
kukimik requested a review from jgebal September 9, 2022 06:54
jgebal
jgebal approved these changes Sep 9, 2022
View reviewed changes
@jgebal jgebal added enhancement documentation labels Sep 9, 2022
@jgebal jgebal added this to the 3.1.13 milestone Sep 9, 2022
@jgebal

jgebal commented Sep 9, 2022

Copy link
Copy Markdown
Member

Resolves #701

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgebal
jgebal merged commit ef66537 into utPLSQL:develop Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jgebal jgebal jgebal approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

documentation enhancement

Projects

None yet

Milestone

v3.1.13

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kukimik @jgebal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.