Skip to content

A one-line assertion failure costs 20 lines; there is no concise output mode #99

Description

@korya

Problem

A single failed assertion costs 20 lines of output, and there is no way to ask for less. -s does not reduce the dump — it only replaces the payload with << Payload is omitted >>.

Reproduction

$ http-assert            --assert-ok .../500 2>&1 | wc -l
24
$ http-assert -s         --assert-ok .../500 2>&1 | wc -l
20
$ http-assert --log-level error --assert-ok .../500 2>&1 | wc -l
20

The information the user asked for is one line:

- ok: expected OK, got 500 ("500 Internal Server Error")

The other 19 are the request dump, the response dump, and blank lines.

Why it matters

The dump is genuinely valuable when debugging, which is why it should stay the default. But a health check in a loop, or a job that runs twenty assertions across a deploy, produces hundreds of lines where twenty would do. There is currently no setting between "everything" and "nothing" — -s on a passing run prints zero lines, and on a failing run prints twenty.

Suggested fix

A flag that prints the verdict and the failing assertions without the dumps. --no-dump, or a --quiet distinct from --silent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions