{"id":15405256,"url":"https://github.com/fnando/bolt","last_synced_at":"2025-12-16T00:12:06.768Z","repository":{"id":203041057,"uuid":"708634617","full_name":"fnando/bolt","owner":"fnando","description":"A nicer test runner for golang","archived":false,"fork":false,"pushed_at":"2023-11-07T22:53:54.000Z","size":7444,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:51:12.991Z","etag":null,"topics":["go","golang","golang-testing"],"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/fnando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-10-23T04:14:47.000Z","updated_at":"2024-08-24T17:36:51.000Z","dependencies_parsed_at":"2023-11-03T08:29:13.731Z","dependency_job_id":"0b575c0f-fe25-4604-8b2a-f8011502b150","html_url":"https://github.com/fnando/bolt","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"5241e4d187b851a2bff2e7a76bf638c383356baa"},"previous_names":["fnando/gotestfmt"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fbolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fbolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fbolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fbolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/bolt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249294944,"owners_count":21246014,"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":["go","golang","golang-testing"],"created_at":"2024-10-01T16:15:43.962Z","updated_at":"2025-12-16T00:12:06.709Z","avatar_url":"https://github.com/fnando.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource width=\"200\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/fnando/bolt/raw/main/bolt-dark.png\"\u003e\u003c/source\u003e\n    \u003cimg width=\"200\" src=\"https://github.com/fnando/bolt/raw/main/bolt-light.png\" alt=\"Bolt: a nicer test runner for golang\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A nicer test runner for golang.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/fnando/bolt/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/fnando/bolt?label=version\" alt=\"Latest release\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/fnando/bolt/actions/workflows/tests.yml\"\u003e\u003cimg src=\"https://github.com/fnando/bolt/actions/workflows/tests.yml/badge.svg\" alt=\"Tests\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nWe've all been there... a bunch of tests failing and you have no idea where to\nstart, because everything looks the same. And that one test failing in the sea\nof passing tests? So frustrating. Not anymore!\n\nWith `bolt` you'll see a progress output while tests are being executed. Once\ntests are done, you'll see an output with only the tests that failed. Simple and\neasy!\n\nHere's the before and after:\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/fnando/bolt/raw/main/bolt-screenshot-dark.png\"\u003e\u003c/source\u003e\n  \u003cimg src=\"https://github.com/fnando/bolt/raw/main/bolt-screenshot-light.png\" alt=\"A screenshot showing the comparison between the native output versus bolt's\"\u003e\n\u003c/picture\u003e\n\nFeatures:\n\n- Colored output\n- Dotenv files support\n- Coverage output\n- Slowest tests output\n- Benchmark output\n\n## Install\n\nDownload the binary for your system from the\n[latest release](https://github.com/fnando/bolt/releases/latest) and place it\nanywhere on your path (you'll need to make it executable with `chmod +x`).\n\n## Usage\n\nbolt wraps `go test`. You can run it with:\n\n```shell\n$ bolt run ./...\n```\n\nOptions:\n\n```shell\n$ bolt -h\n\nbolt is a golang test runner that has a nicer output.\n\n  Usage: bolt [command] [options]\n\n  Commands:\n\n    bolt version                  Show bolt version\n    bolt run                      Run tests\n    bolt update                   Update to the latest released version\n    bolt [command] --help         Display help on [command]\n\n\n  Further information:\n    https://github.com/fnando/bolt\n```\n\nTo get the latest download url for your binary, you can use `bolt download-url`.\n\n### Reporters\n\nbolt comes with two different reporters:\n\n### JSON\n\nThe JSON reporter outputs a nicer JSON format that can be used to do things that\nrequire structured data.\n\n```shell\n$ bolt run ./... --reporter json\n```\n\n### Progress\n\nThe progress reporter outputs a sequence of characters that represent the test's\nstatus (fail, pass, skip). Once all tests have been executed, a summary with the\nfailing and skipped tests, plus a coverage list is printed.\n\n```shell\n$ bolt run ./... --reporter progress\n```\n\n#### Overriding colors\n\nYou can override the colors by setting the following env vars:\n\n```bash\nexport BOLT_TEXT_COLOR=\"30\"\nexport BOLT_FAIL_COLOR=\"31\"\nexport BOLT_PASS_COLOR=\"32\"\nexport BOLT_SKIP_COLOR=\"33\"\nexport BOLT_DETAIL_COLOR=\"34\"\n```\n\nTo disable color output completely, just set `NO_COLOR=1`.\n\n#### Overriding symbols\n\nTo override the characters, you can set some env vars. The following example\nshows how to use emojis instead:\n\n```shell\nexport BOLT_FAIL_SYMBOL=❌\nexport BOLT_PASS_SYMBOL=⚡️\nexport BOLT_SKIP_SYMBOL=😴\n```\n\n### Post Run Command\n\nYou can run any commands after the runner is done by using `--post-run-command`.\nThe command will receive the following environment variables.\n\n- `BOLT_SUMMARY:` a text summarizing the tests\n- `BOLT_TITLE:` a text that can be used as the title (e.g. Passed!)\n- `BOLT_TEST_COUNT:` a number representing the total number of tests\n- `BOLT_FAIL_COUNT:` a number representing the total number of failed tests\n- `BOLT_PASS_COUNT:` a number representing the total number of passing tests\n- `BOLT_SKIP_COUNT:` a number representing the total number of skipped tests\n- `BOLT_BENCHMARK_COUNT:` a number representing the total number of benchmarks\n- `BOLT_ELAPSED:` a string representing the duration (e.g. 1m20s)\n- `BOLT_ELAPSED_NANOSECONDS:` an integer string representing the duration in\n  nanoseconds\n\n## Code of Conduct\n\nEveryone interacting in the bolt project’s codebases, issue trackers, chat rooms\nand mailing lists is expected to follow the\n[code of conduct](https://github.com/fnando/bolt/blob/main/CODE_OF_CONDUCT.md).\n\n## Developing\n\nTo generate new test replay files, you can use\n`go test -cover -json -tags=reference ./test/reference/package \u003e test/replays/[case].txt`.\n\nTo generate new benchmark replay files, you can use\n`go test -json -fullpath -tags=reference -bench . ./test/reference/bench \u0026\u003e test/replays/benchmark.txt`.\n\nOnce files are exported, make sure you replace all paths to use `/home/test` as\nthe home directory, and `/home/test/bolt` as the working directory.\n\nYou can run tests with `./bin/test`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/fnando/bolt. This project is intended to be a safe, welcoming\nspace for collaboration, and contributors are expected to adhere to the\n[Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThis project is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fbolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Fbolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fbolt/lists"}