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

Custom messages in runner output #3884

Open
1 task done
jthln opened this issue Jan 26, 2025 · 3 comments
Open
1 task done

Custom messages in runner output #3884

jthln opened this issue Jan 26, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jthln
Copy link

jthln commented Jan 26, 2025

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

It would be useful, if we could add custom text messages to the Bruno runner output.

Preferably by passing (HTML?) strings to some new function like bru.runner.log().

Maybe be also extending runner utility functions like setNextRequest(), skipRequest(), etc. by passing a message param.

Mockups or Images of the feature

Image

@jthln jthln added the enhancement New feature or request label Jan 26, 2025
@anusree-bruno
Copy link
Collaborator

Hi @jthln,

Thanks for the feedback! This is a great suggestion. Could you share more about why you'd need HTML for this? What kind of scenarios do you see yourself using it in, and what exactly would you like to log?

By the way, we do support setNextRequest() and skipRequest() already. You can check out the details here: https://www.usebruno.com/changelog.

Looking forward to your thoughts!

@anusree-bruno anusree-bruno self-assigned this Jan 27, 2025
@jthln
Copy link
Author

jthln commented Jan 27, 2025

Hi @anusree-bruno,

Thanks for responding!

Regarding HTML

HTML mainly for formatting, to be able to colorize the message, maybe red for warnings, add HTML entities, etc.

If that's too complicated (GUI HTML, CLI ANSI?), raw text would imo be enough, too.

Exemplary Use Case

An exemplary use case is a scenario, where a setNextRequest(null) in a runner request stops the GUI runner.

This happens silently.

No note or warning is emitted to the runner output, that the run indeed has been stopped/cancelled.

At first glance, the run looks successfully this way, because you'll see the end of the runner output, all green.
Even if you scroll back to the top of the runner output, everything looks fine at first, because Failed: 0.

The setNextRequest(null) can not know why the run was stopped, so a Failed: 0 may, or may not, be correct.

Only when you notice, that the Total Requests count does not match the number of requests in the folder, or if you know the name of the request that should have been executed last, but doesn't match the one in the runner output, you will realize, that the run was stopped/cancelled.

If we could output custom messages to the runner output, we could directly inform the user that the run has been stopped/cancelled and why it has.

Another use case would be to show details about connection failures, retries, etc.

There are probably many other scenarios, where custom output would simply be useful to show important informations.

Regarding setNextRequest() and skipRequest()

I am aware of and use these functions, but if I did not miss something, you cannot pass a message argument to them (yet?).

  • setNextRequest() accepts a name argument (name of the request to continue with)
  • skipRequest() accepts no arguments

@anusree-bruno
Copy link
Collaborator

Hi @jthln,

Thanks for the clarification!

Regarding setNextRequest() and skipRequest():
You’re absolutely right—they currently don’t support message arguments.

Thanks again for the great feedback! We’ll review this and see how we can incorporate it.

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

No branches or pull requests

2 participants