Quick Start

This takes a couple of minutes. You need the abbreviatory binary from the download page and something that prints a lot: a test suite, a build, a log file.

1. Reduce a Test Run

Pipe the output in:

go test -json ./... | abbreviatory reduce
pytest -v | abbreviatory reduce

Or name a file:

abbreviatory reduce build.log

The format is detected. You get a report like this one, from a real go test run with 1,212 tests:

[abbreviatory] go test -json output, 4,880 lines (808.3 kB), ref 8923c60bd06d
tests: 1,204 passed, 7 failed, 1 skipped
FAILED (7):
- TestFieldSpaces (example.com/gosample/parse, 0.00s) [ref 8923c60bd06d:g1205]
    parse_test.go:33: Field("width = 12"): unexpected error: strconv.Atoi: parsing " 12": invalid syntax
    parse_test.go:36: Field("width = 12") = 0, want 12
- TestFieldHex (example.com/gosample/parse, 0.00s) [ref 8923c60bd06d:g1206]
    parse_test.go:43: Field("mask=0xff"): strconv.Atoi: parsing "0xff": invalid syntax
...
not shown: 1,204 passed tests [ref 8923c60bd06d:pass]
not shown: 1 skipped test [ref 8923c60bd06d:skip]

Failures come first, each with its message. Passing tests are counted, not listed.

2. Expand Anything It Left Out

Every line that stands for more than itself ends with a reference. Hand it to expand:

abbreviatory expand 8923c60bd06d:g1205

That prints the original lines for that test, exactly as they were in the input. Other selectors:

abbreviatory expand 8923c60bd06d:fail       # every failed test's lines
abbreviatory expand 8923c60bd06d:L100-140   # a line range
abbreviatory expand 8923c60bd06d            # the whole input back

The original was kept on your disk, gzipped, when you reduced it.

3. Reduce a Log

Logs work the same way. Repeats fold into one line with a count, and stack traces stay with the line they belong to:

kubectl logs deploy/api | abbreviatory reduce
ERRORS (4 kinds, 4,313 lines):
- x264 2026-10-18T08:00:07.073Z ERROR checkout failed for order 75504 [ref d2f86a61aa96:g9]
    java.lang.IllegalStateException: payment gateway did not answer
    	at com.example.orders.PaymentClient.charge(PaymentClient.java:118)
- x486 2026-10-18T08:00:10.517Z ERROR db: connection to 10.0.4.5:5432 refused (request_id=b05ab8a9) [ref d2f86a61aa96:g10]

4. Set the Size and What to Keep

abbreviatory reduce -budget 2000 app.log
abbreviatory reduce -keep 'tenant=acme' -keep 'payment' app.log

-budget is the most bytes you’ll get, 4,096 by default. If a failure or an error doesn’t fit, it’s counted on a “not shown” line with a reference, never silently dropped. -keep adds your own rules: any line matching one is kept like an error.

5. Compare With the Last Run

Run your tests through abbreviatory run:

abbreviatory run -- go test -json ./...

It runs the command, reduces what it prints and compares it with the last run of the same command in the same project. The report starts with what changed:

run 2, exit status 1; since run 1: 1 new, 1 fixed, 6 still failing (longest for 2 runs)
new: TestFieldSpaces (example.com/gosample/parse, 0.00s) [ref 3e35712ad529:g1205]
fixed: TestLegacyFormat (example.com/gosample/parse, 0.00s) [ref 6f92e70f603c:g1213]

Run it again with nothing changed and you get one line. It exits with the test command’s own status. abbreviatory history lists the runs. To keep a history for something you pipe in, name it: abbreviatory reduce -key nightly build.log.

6. Use It in CI

CI machines start empty, so keep the store between runs. On GitHub Actions:

- uses: actions/cache/restore@v4
  with:
    path: .abbreviatory
    key: abbreviatory-${{ github.ref_name }}-${{ github.run_id }}
    restore-keys: abbreviatory-${{ github.ref_name }}-
- run: abbreviatory run -store .abbreviatory -key unit -budget 3000 -- go test -json ./... >> "$GITHUB_STEP_SUMMARY"
- if: always()
  run: abbreviatory prune -store .abbreviatory -max-size 50MB
- if: always()
  uses: actions/cache/save@v4
  with:
    path: .abbreviatory
    key: abbreviatory-${{ github.ref_name }}-${{ github.run_id }}

The cache is saved whether the tests pass or not, and the step fails when they fail.

-json prints the counts and the report as one JSON object, for scripts that want to act on the numbers.

Next

The reference has every flag, every format and the exact layout of the report.