usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
22.18k stars 1.04k forks source link

Support multiple output file with single bruno cli say both json and junit same time #2045

Open rshidling opened 3 months ago

rshidling commented 3 months ago

I have checked the following:

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

sushmithasv commented 3 months ago

Have created an issue on passing multiple reporters in the command line https://github.com/usebruno/bruno/discussions/1068#discussioncomment-8718094

marfranke commented 2 months ago

I think it would be useful too. However, contrary to https://github.com/usebruno/bruno/discussions/1068#discussioncomment-8718094, I suggest different Parameters:

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 commented 2 months ago

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.