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 multiple output file with single bruno cli say both json and junit same time #2045

Closed
2 tasks done
rshidling opened this issue Apr 9, 2024 · 5 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@rshidling
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

Bru CLI 1.3.0
Support multiple output file with single bruno cli say both json and junit same time

bru run "GET configuration" -r --env ati002 --output res.json --output res1.json

error when we use above example

Something went wrong
The "path" argument must be of type string. Received an instance of Array

.bru file to reproduce the bug

No response

Screenshots/Live demo link

image

@rshidling rshidling added the bug Something isn't working label Apr 9, 2024
@sushmithasv
Copy link

Have created an issue on passing multiple reporters in the command line #1068 (comment)

@marfranke
Copy link

I think it would be useful too. However, contrary to #1068 (comment), I suggest different Parameters:

  • bru run --junit junit.xml --json result.json --html result.html --text result.txt support multiple reporters
  • bru run --output result.json --format json legacy single output file (might already be used in scripts...)
  • bru run --stdout=json choose your stdout format, possible values: json, junit, html, text (default), none
  • Combining them should be possible: bru run --output result.json --format json --junit junit.xml --stdout text

PS: I think the label bug doesn't belong here, since the readme/--help doesn't even say multiple reporters are supported at the same time. Isn't it a feature request?

@rshidling
Copy link
Author

I think it would be useful too. However, contrary to #1068 (comment), I suggest different Parameters:

  • bru run --junit junit.xml --json result.json --html result.html --text result.txt support multiple reporters
  • bru run --output result.json --format json legacy single output file (might already be used in scripts...)
  • bru run --stdout=json choose your stdout format, possible values: json, junit, html, text (default), none
  • Combining them should be possible: bru run --output result.json --format json --junit junit.xml --stdout text

PS: I think the label bug doesn't belong here, since the readme/--help doesn't even say multiple reporters are supported at the same time. Isn't it a feature request?

Yes, even I feel its feature request. Not sure how can Iabel this as feature.

@iamdavidfrancis
Copy link
Contributor

I threw together a PR that maintains back compat with the existing --format and --output but allows you to pass multiple --format options for using multiple reporters.

You can set the reporter specific output using --output.reporter.

@helloanoop
Copy link
Contributor

Closing this issue as its a duplicate of #2918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants