{"id":24460897,"url":"https://github.com/houen/minitest-rerun-failed","last_synced_at":"2025-04-13T05:34:57.484Z","repository":{"id":47103719,"uuid":"405040709","full_name":"houen/minitest-rerun-failed","owner":"houen","description":"Easy rerun of failed tests with minitest.","archived":false,"fork":false,"pushed_at":"2024-04-25T16:35:14.000Z","size":51,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-25T17:38:40.732Z","etag":null,"topics":["minitest","rails","ruby","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/houen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-09-10T10:21:49.000Z","updated_at":"2024-05-29T11:12:50.513Z","dependencies_parsed_at":"2024-03-06T12:30:47.495Z","dependency_job_id":"fcece62a-23a0-43f1-9c83-8500e7d6986f","html_url":"https://github.com/houen/minitest-rerun-failed","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.4545454545454546,"last_synced_commit":"bb056f710b904f96988bfdff7a1dead5f72aa1d2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houen%2Fminitest-rerun-failed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houen%2Fminitest-rerun-failed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houen%2Fminitest-rerun-failed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houen%2Fminitest-rerun-failed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houen","download_url":"https://codeload.github.com/houen/minitest-rerun-failed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670513,"owners_count":21142896,"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":["minitest","rails","ruby","testing-tools"],"created_at":"2025-01-21T04:15:54.422Z","updated_at":"2025-04-13T05:34:57.464Z","avatar_url":"https://github.com/houen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minitest-rerun-failed\n[![Gem Version](https://badge.fury.io/rb/minitest-rerun-failed.svg)](https://badge.fury.io/rb/minitest-rerun-failed)\n![master branch CI](https://github.com/houen/minitest-rerun-failed/actions/workflows/main.yml/badge.svg?branch=master)\n[![Gem Version](https://badge.fury.io/rb/minitest-rerun-failed.svg)](https://badge.fury.io/rb/minitest-rerun-failed)\n\nEasy rerun of failed tests with minitest. Prints a list of failed tests and seed at the end of the test run to console and file. Re-run the failed tests with `bin/rerun_failed_tests`.\n\n![Example screenshot](assets/screenshot.png)\n\n## Features\n- Outputs all failed tests in short summary at end of test run.\n  - To console and / or to file\n  - Optionally includes line numbers\n- Lists seed for re-running with same seed.\n- Executable for re-running only failed tests\n\n## Installation\n\n```\nbundle add \"minitest-rerun-failed\" --group test\n\n# installs executable bin/rerun_failed_tests\nbundle binstubs minitest-rerun-failed\n```\n\n## Usage\n\nUse it like any Minitest::Reporters like such:\n\n```ruby\nMinitest::Reporters.use! [\n  Minitest::Reporters::ProgressReporter.new, # This is just my preferred reporter. Use the one(s) you like.\n  Minitest::Reporters::FailedTestsReporter.new\n]\n```\n\nNow failed tests and seed will be printed at the end of the test report.\n\nIf you have installed the binstub, you can rerun the failed tests with \n```\nbin/rerun_failed_tests\n```\n\nIf you have not installed the binstub, you can rerun the failed tests with something like:\n```\n# Ruby:\nruby $(cat .minitest_failed_tests.txt)\n\n# Rails:\nbundle exec rails test $(cat .minitest_failed_tests.txt)\n```\n\n### Options\n- include_line_numbers: Include line numbers in outputs. Defaults to true\n- verbose: Output to stdout. Defaults to true\n- file_output: Output to file. Defaults to true\n- output_path: Path to place output files in. Defaults to '.'\n  - Note: If you use the output_path option, you need to have `ENV[\"MINITEST_FAILED_TESTS_REPORT_DIR\"]` set to use the executable\n\n## Other\n### Why line numbers instead of test names? What if the lines change as I am fixing things?\nLine numbers were much easier to implement.\nIf you find a good way to output test names instead, please open a PR with tests to add it as an option.\n\nAs for if line numbers change, the most likely outcome is that the whole file will simply be run instead of a single test.\nYou can also use the option `include_line_numbers: false` to always output whole files for greater safety.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/houen/minitest_rerun_failed.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\nhttps://stackoverflow.com/questions/19910533/minitest-rerun-only-failed-tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhouen%2Fminitest-rerun-failed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhouen%2Fminitest-rerun-failed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhouen%2Fminitest-rerun-failed/lists"}