{"id":13724213,"url":"https://github.com/mfridman/tparse","last_synced_at":"2025-05-14T08:09:30.985Z","repository":{"id":33498286,"uuid":"153669921","full_name":"mfridman/tparse","owner":"mfridman","description":"CLI tool for summarizing go test output. Pipe friendly. CI/CD friendly.","archived":false,"fork":false,"pushed_at":"2025-05-07T00:45:58.000Z","size":2183,"stargazers_count":1119,"open_issues_count":24,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-12T20:00:01.360Z","etag":null,"topics":["golang","test","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfridman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-18T18:32:47.000Z","updated_at":"2025-05-07T00:46:02.000Z","dependencies_parsed_at":"2024-01-06T01:02:56.137Z","dependency_job_id":"21e148f2-7e3d-4406-8878-eb456da3c77e","html_url":"https://github.com/mfridman/tparse","commit_stats":{"total_commits":166,"total_committers":12,"mean_commits":"13.833333333333334","dds":"0.12048192771084343","last_synced_commit":"5e70d04fe67671860b309020ee5b23729c334b10"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfridman%2Ftparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfridman%2Ftparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfridman%2Ftparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfridman%2Ftparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfridman","download_url":"https://codeload.github.com/mfridman/tparse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101558,"owners_count":22014908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","test","testing","testing-tools"],"created_at":"2024-08-03T01:01:52.168Z","updated_at":"2025-05-14T08:09:25.978Z","avatar_url":"https://github.com/mfridman.png","language":"Go","readme":"# tparse  [![Actions](https://github.com/mfridman/tparse/workflows/CI/badge.svg)](https://github.com/mfridman/tparse)\n\nA command line tool for analyzing and summarizing `go test` output.\n\n\u003e [!TIP]\n\u003e\n\u003e Don't forget to run `go test` with the `-json` flag.\n\nPass            |  Fail\n:-------------------------:|:-------------------------:\n\u003cimg src=\"https://user-images.githubusercontent.com/6278244/170038081-1ddc5486-7c97-49a3-ac2d-08b502e39bdf.png\" /\u003e  |  \u003cimg src=\"https://user-images.githubusercontent.com/6278244/170038118-3cecdb30-411c-4534-84b3-0a55db85cb1e.png\" /\u003e\n\nBy default, `tparse` will always return test failures and panics, if any, followed by a package-level summary table.\n\nTo get additional info on passed tests run `tparse` with `-pass` flag. Tests are grouped by package and sorted by elapsed time in descending order (longest to shortest).\n\n### [But why?!](#but-why) for more info.\n\n## Installation\n\n    go install github.com/mfridman/tparse@latest\n\nOr download the latest pre-built binary [here](https://github.com/mfridman/tparse/releases/latest).\n\n## Usage\n\nOnce `tparse` is installed there are 2 ways to use it:\n\n1. Run `go test` as normal, but add `-json` flag and pipe output to `tparse`.\n\n```\nset -o pipefail \u0026\u0026 go test fmt -json | tparse -all\n```\n\n2. Save the output of `go test` with `-json` flag into a file and call `tparse` with `-file` option.\n\n```\ngo test fmt -json \u003e fmt.out\ntparse -all -file=fmt.out\n```\n\nTip: run `tparse -h` to get usage and options.\n\n## But why?!\n\n`go test` is awesome, but verbose. Sometimes you just want readily available failures, grouped by package, printed with a dash of color.\n\n`tparse` attempts to do just that; return failed tests and panics, if any, followed by a single package-level summary. No more searching for the literal string: \"--- FAIL\".\n\nBut, let's take it a bit further. With `-all` (`-pass` and `-skip` combined) you can get additional info, such as skipped tests and elapsed time of each passed test.\n\n`tparse` comes with a `-follow` flag to print raw output. Yep, go test pipes JSON, it's parsed and the output is printed back out as if you ran go test without `-json` flag. Eliminating the need for `tee /dev/tty` between pipes.\n\nThe default print order is:\n- `go test` output (if adding `-follow` flag)\n- passed/skipped table (if adding `-all`, `-skip` or `-pass` flag)\n- failed tests and panics\n- summary\n\nFor narrow displays the `-smallscreen` flag may be useful, dividing a long test name and making it vertical heavy:\n\n```\nTestSubtests/an_awesome_but_long/subtest_for_the/win\n\nTestSubtests\n /an_awesome_but_long\n /subtest_for_the\n /win\n ```\n\n`tparse` aims to be a simple alternative to one-liner bash functions.\n","funding_links":[],"categories":["Testing","Go","Template Engines"],"sub_categories":["Testing Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfridman%2Ftparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfridman%2Ftparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfridman%2Ftparse/lists"}