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

Output is truncated when using --json and --output together #2886

Closed
lepapareil opened this issue Jun 6, 2024 · 1 comment · Fixed by #2914
Closed

Output is truncated when using --json and --output together #2886

lepapareil opened this issue Jun 6, 2024 · 1 comment · Fixed by #2914
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lepapareil
Copy link
Collaborator

lepapareil commented Jun 6, 2024

What is the current bug behavior?

When I execute Hurl over multiple files with --json and --output options I only get the last file output instead of all outputs.

  • Create test1.hurl and test2.hurl :
GET https://hurl.dev
HTTP 200
  • with only --json, I get all files output:
$ hurl test1.hurl test2.hurl --json | jq .filename
"test1.hurl"
"test2.hurl"
  • with --json and --output I only get the last file:
$ hurl test1.hurl test2.hurl --json --output /tmp/output.json ; jq .filename /tmp/output.json
"test2.hurl"

What is the expected correct behavior ?

$ hurl test1.hurl test2.hurl --json --output /tmp/output.json ; jq .filename /tmp/output.json
"test1.hurl"
"test2.hurl"

Execution context

  • Hurl Version : 4.3.0
@lepapareil lepapareil added the bug Something isn't working label Jun 6, 2024
@lepapareil lepapareil changed the title Output is truncated when we use --json and --output together Output is truncated when using --json and --output together Jun 6, 2024
@jcamiel jcamiel added this to the 5.0.0 milestone Jun 6, 2024
@jcamiel
Copy link
Collaborator

jcamiel commented Jun 7, 2024

Not specific to --json, $ hurl test1.hurl test2.hurl --output /tmp/output.txt writes only with the response of test2.hurl. I suspect that the --output file is created with "w" and not "a" (the file is created everytime instead of appended).

@jcamiel jcamiel self-assigned this Jun 12, 2024
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

Successfully merging a pull request may close this issue.

2 participants