{"id":15759309,"url":"https://github.com/rnd-soft/rspec-flaky","last_synced_at":"2025-05-12T20:05:49.346Z","repository":{"id":56630067,"uuid":"307511487","full_name":"RND-SOFT/rspec-flaky","owner":"RND-SOFT","description":"Gem for catching flaky tests","archived":false,"fork":false,"pushed_at":"2023-04-03T18:44:59.000Z","size":21,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-26T16:20:51.210Z","etag":null,"topics":["flakiness","gem","rspec","rspec-rails","ruby","test-flakiness"],"latest_commit_sha":null,"homepage":null,"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/RND-SOFT.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-10-26T21:41:08.000Z","updated_at":"2024-01-13T14:32:29.000Z","dependencies_parsed_at":"2024-10-04T10:04:44.747Z","dependency_job_id":"d3f60dd9-f453-406f-a1d1-359500b5da7a","html_url":"https://github.com/RND-SOFT/rspec-flaky","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RND-SOFT%2Frspec-flaky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RND-SOFT%2Frspec-flaky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RND-SOFT%2Frspec-flaky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RND-SOFT%2Frspec-flaky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RND-SOFT","download_url":"https://codeload.github.com/RND-SOFT/rspec-flaky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246624199,"owners_count":20807493,"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":["flakiness","gem","rspec","rspec-rails","ruby","test-flakiness"],"created_at":"2024-10-04T10:04:42.259Z","updated_at":"2025-04-01T10:31:20.555Z","avatar_url":"https://github.com/RND-SOFT.png","language":"Ruby","readme":"\n[![Gem Version](https://badge.fury.io/rb/rspec-flaky.svg)](https://rubygems.org/gems/rspec-flaky)\n[![Gem](https://img.shields.io/gem/dt/rspec-flaky.svg)](https://rubygems.org/gems/rspec-flaky/versions)\n[![YARD](https://badgen.net/badge/YARD/doc/blue)](http://www.rubydoc.info/gems/rspec-flaky)\n\n# RSpecFlaky\n\nThe most common reason for test flakiness is randomized factories which fill a database before test execution. This small gem is designed to help you find out what exactly attribute values were assigned to an investigated model during a failed and passed execution.\n\n![image](https://user-images.githubusercontent.com/43433100/106516737-8e72a380-64e8-11eb-9758-34e5cb9f278b.png)\n\nArticle about gem: [https://blog.rnds.pro/006-rspecflaky](https://blog.rnds.pro/006-rspecflaky?utm_source=github\u0026utm_medium=article) (in russian)\n\n## Installation\n\nAdd this line to test group of your application's Gemfile:\n\n```bash\ngem 'rspec-flaky'\n```\n\nInstall the gem:\n\n```bash\nbundle\n```\n\nThat's all. Select the model whose attributes will be dumped:\n\n```ruby\nit 'is flaky test', tables: [User, Post] do\n    expect([true, false]).to be true\nend\n```\n## Usage\n\nRun the command to iteratively run flaky example (option `-i` specifies the number of iterations):\n\n```bash\nrspec-flaky path/to/flaky_spec.rb:12 -i 5 \n```\n\nIf at least one example is failed gem will generate tables where you are able to investigate source of flakiness by comparing failed and success attribute values. After running your tests, open `tmp/flaky_tests/result.html` in the browser of your choice. For example, in a Mac Terminal, run the following command from your application's root directory:\n\n\n```bash\nopen tmp/flaky_tests/result.html\n```\n   in a debian/ubuntu Terminal,\n\n```bash\nxdg-open tmp/flaky_tests/result.html\n```\n\n   **Note:** [This guide](https://dwheeler.com/essays/open-files-urls.html) can help if you're unsure which command your particular\n   operating system requires.\n\n\nIt's also possible to dump the whole database per each test example if there was a failed result as well as a passed result. For that just add `-d` option (currently only PostresQL is available):\n    \n```\nrspec-flaky path/to/flaky_speЗc.rb:12 -i 10 -d\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnd-soft%2Frspec-flaky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnd-soft%2Frspec-flaky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnd-soft%2Frspec-flaky/lists"}