Support multiple output file with single bruno cli say both json and junit same time
I have checked the following:
- [X] I use the newest version of bruno.
- [X] 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
Have created an issue on passing multiple reporters in the command line https://github.com/usebruno/bruno/discussions/1068#discussioncomment-8718094
I think it would be useful too. However, contrary to https://github.com/usebruno/bruno/discussions/1068#discussioncomment-8718094, I suggest different Parameters:
-
bru run --junit junit.xml --json result.json --html result.html --text result.txtsupport multiple reporters -
bru run --output result.json --format jsonlegacy single output file (might already be used in scripts...) -
bru run --stdout=jsonchoose 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?
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.txtsupport multiple reportersbru run --output result.json --format jsonlegacy single output file (might already be used in scripts...)bru run --stdout=jsonchoose 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 textPS: 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.
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.
Closing this issue as its a duplicate of #2918