{"id":23927116,"url":"https://github.com/rolemodel/marsh_grass","last_synced_at":"2025-04-12T06:08:38.774Z","repository":{"id":73491238,"uuid":"98439518","full_name":"RoleModel/marsh_grass","owner":"RoleModel","description":"Ruby Gem for assisting in tracking down random RSpec test failures","archived":false,"fork":false,"pushed_at":"2024-03-27T15:09:51.000Z","size":34,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-12T06:08:30.040Z","etag":null,"topics":[],"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/RoleModel.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-07-26T15:40:04.000Z","updated_at":"2024-09-26T22:06:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c526ae0-da9a-4d14-95a1-64957ad0fe82","html_url":"https://github.com/RoleModel/marsh_grass","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoleModel%2Fmarsh_grass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoleModel%2Fmarsh_grass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoleModel%2Fmarsh_grass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoleModel%2Fmarsh_grass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoleModel","download_url":"https://codeload.github.com/RoleModel/marsh_grass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525141,"owners_count":21118619,"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":[],"created_at":"2025-01-05T22:14:20.325Z","updated_at":"2025-04-12T06:08:38.746Z","avatar_url":"https://github.com/RoleModel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarshGrass\n\nFinally! A way to examine the behavior of intermittent failures in RSpec.\n\nThis gem allows you to subject an intermittently failing test to a variety of circumstances in an attempt to discern what combination of events leads to failure.\n\n## Background\n\nIntermittent failures are challenging because the failure conditions are more difficult to pinpoint than with tests that fail 100% of the time.\n\nIntermittent failures are also more likely to make it into production. They often pass during CI testing and code review and then crop up days or weeks later.\n\nIn programming, there is no such thing as a \"random\" failure. Every intermittent failure actually fails consistently, every single time... under the right set of circumstances. Perhaps your test only fails on Friday afternoons. Or, 10% of the time under race conditions. We once had a test that failed on every power of 2 run: on the 2nd, 4th, 8th, 16th run, etc. The more we ran it, the more elusive it became.\n\nOften, the first step in fixing such a failure is to make it fail consistently. That way, as you change your code, you can use the test to confirm when you've fixed the root cause. After all, that is the purpose of the test!\n\n## Features\nThis gem subjects a given test to the following circumstances:\n- repetitions\n- range of speeds in execution\n- execution at all times of day\n- execution in all time zones\n- execution at all the milliseconds surrounding a particular time of day\n\nIn our experience, repetitions is the option we use the most often. It gives the broadest feedback and is very effective at uncovering race conditions.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'marsh_grass'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install marsh_grass\n\n## Usage\nFeature use:\n- N repetitions (default: 1000, or specify integer)\n- Times of day (default: all hours, minutes, seconds or specify :hours, :minutes, :seconds)\n- Time zones (executes against all hour and half-hour time zones)\n- Elapsed time during test execution (default: (1..10) execution slow-down multipliers or specify range)\n- Surrounding time, i.e., clock change over during the test (must specify hour: \u003cinteger\u003e, minute: \u003cinteger\u003e, second: \u003cinteger\u003e)\n\nSurrounding time runs test at every millisecond from 1 sec before to 1 sec after specified time. This is particularly useful for discerning rate of failure near and at midnight.\n\n### Examples\nSimple example:\n```ruby\nit 'uses default repetitions', :repetitions do\n ...\nend\n\nit 'uses specific repetitions', repetitions: 20 do\n  ...\nend\n```\n[Full Examples](./spec/marsh_grass_spec.rb) of tests using each feature.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/RoleModel/marsh_grass.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolemodel%2Fmarsh_grass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frolemodel%2Fmarsh_grass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frolemodel%2Fmarsh_grass/lists"}