{"id":15405060,"url":"https://github.com/avmnu-sng/rspec-tap-formatters","last_synced_at":"2025-04-16T21:44:20.786Z","repository":{"id":56892982,"uuid":"216199338","full_name":"avmnu-sng/rspec-tap-formatters","owner":"avmnu-sng","description":"TAP Producer for RSpec-3","archived":false,"fork":false,"pushed_at":"2020-05-14T14:20:55.000Z","size":57,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-26T17:22:57.036Z","etag":null,"topics":["bdd-tests","behavior-driven-development","formatter","reporter","rspec","ruby","tap","tap-producer","test-anything-protocol","testing"],"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/avmnu-sng.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-19T11:59:38.000Z","updated_at":"2022-05-05T14:26:11.000Z","dependencies_parsed_at":"2022-08-21T01:50:13.415Z","dependency_job_id":null,"html_url":"https://github.com/avmnu-sng/rspec-tap-formatters","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avmnu-sng%2Frspec-tap-formatters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avmnu-sng%2Frspec-tap-formatters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avmnu-sng%2Frspec-tap-formatters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avmnu-sng%2Frspec-tap-formatters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avmnu-sng","download_url":"https://codeload.github.com/avmnu-sng/rspec-tap-formatters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249280537,"owners_count":21243138,"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":["bdd-tests","behavior-driven-development","formatter","reporter","rspec","ruby","tap","tap-producer","test-anything-protocol","testing"],"created_at":"2024-10-01T16:14:55.103Z","updated_at":"2025-04-16T21:44:20.762Z","avatar_url":"https://github.com/avmnu-sng.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/rspec-tap-formatters.svg)](https://badge.fury.io/rb/rspec-tap-formatters)\n[![Build Status](https://travis-ci.com/avmnu-sng/rspec-tap-formatters.svg?branch=master)](https://travis-ci.com/avmnu-sng/rspec-tap-formatters)\n[![Documentation Status](https://readthedocs.org/projects/rspec-tap-formatters/badge/?version=latest)](https://rspec-tap-formatters.readthedocs.io/en/latest/?badge=latest)\n[![Inline docs](http://inch-ci.org/github/avmnu-sng/rspec-tap-formatters.svg?branch=master)](http://inch-ci.org/github/avmnu-sng/rspec-tap-formatters)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7dd41099b7e8569fc7ec/maintainability)](https://codeclimate.com/github/avmnu-sng/rspec-tap-formatters/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/7dd41099b7e8569fc7ec/test_coverage)](https://codeclimate.com/github/avmnu-sng/rspec-tap-formatters/test_coverage)\n[![Gitter](https://badges.gitter.im/rspec-tap-formatters/community.svg)](https://gitter.im/rspec-tap-formatters/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n## RSpec TAP Formatters\n\n**RSpec TAP Formatters** produces [TAP 13](https://testanything.org/tap-version-13-specification.html) \noutput with a proper nested display of example groups and includes stats for the total \nnumber of passed, failed, and pending tests per example group.\n\n## Why use TAP Formatter\n\nWith TAP format, it is easier to view failure reason immediately without waiting\nfor the failure dumps at the end. Also, TAP is a universal format, so one can:\n- Leverage other tools to parse the output.\n- Mix in different types of tests with consistent output.\n\n## Formatters Behavior\n\n**RSpec TAP Formatters** supports four variants:\n1. `RSpec::TAP::Formatters::Default`\n2. `RSpec::TAP::Formatters::Compact`\n3. `RSpec::TAP::Formatters::Flat`\n4. `RSpec::TAP::Formatters::FlatCompact`\n\nEach formatter respects the color configuration for the execution and only \nprints colored output when enabled. However, writing to a file will never use \ncolors. When writing the report to a file, each formatter will print progress status \non the standard output:\n- `.` for passing\n- `F` for failing\n- `*` for pending\n\n## Sample Report\n\nSample report for [string_spec.rb](resources/string_spec.rb) using \n`RSpec::TAP::Formatters::Default` format:\n```text\nTAP version 13\n# test: String {\n  # group: #present? {\n    # group: when whitespaces and other characters {\n      ok 1 - returns true\n      1..1\n      # tests: 1, passed: 1\n    }\n    # group: when nil {\n      not ok 1 - returns false\n        ---\n        location: \"./resources/string_spec.rb:8\"\n        error: |-\n          Failure/Error: expect(string.present?).to eq(false)\n          NoMethodError:\n            undefined method `present?' for nil:NilClass\n        backtrace: \"./resources/string_spec.rb:9:in `block (4 levels) in \u003ctop (required)\u003e'\"\n        ...\n      1..1\n      # tests: 1, failed: 1\n    }\n    # group: when whitespaces only {\n      ok 1 - returns false\n      1..1\n      # tests: 1, passed: 1\n    }\n    1..3\n    # tests: 3, passed: 2, failed: 1\n  }\n  1..3\n  # tests: 3, passed: 2, failed: 1\n}\n1..3\n# tests: 3, passed: 2, failed: 1\n# duration: 0.026471 seconds\n# seed: 27428\n```\n\nYou can check the reports for other formats [here](resources/reports).\n\n## Installation\n\nInstallation is pretty standard:\n```sh\ngem install rspec-tap-formatters\n```\n\nYou can install using `bundler` also but do not require it in `Gemfile`.\nMake sure to use it as a test dependency:\n```ruby\ngroup :test do\n  # other gems\n  gem 'rspec-tap-formatters', '~\u003e 0.1.0', require: false\nend\n```\n\nYou can also install using the GitHub package registry:\n```ruby\nsource 'https://rubygems.pkg.github.com/avmnu-sng' do\n  gem 'rspec-tap-formatters', '~\u003e 0.1.0', require: false\nend\n```\n\n## Usage\n\nYou can specify the format as the command argument:\n```sh\nrspec --format RSpec::TAP::Formatters::Default\n```\n\nTo write to file, provide the `--out` argument:\n```sh\nrspec --format RSpec::TAP::Formatters::Default --out report.tap\n```\n\nYou can also configure the `.rspec` file:\n```sh\n# other configurations\n--format RSpec::TAP::Formatters::Default\n--out report.tap\n```\n\n## Documentation\n\nRead more about TAP specifications and supported formats in the [official docs](https://rspec-tap-formatters.readthedocs.io/en/latest/).\n\n## Source Code Documentation\n\nRead the source code documentation [here](https://rubydoc.info/github/avmnu-sng/rspec-tap-formatters/master).\n \n## Compatibility\n\nRSpec TAP Formatters supports `MRI 2.3+` and `RSpec 3`.\n\n## Changelog\n\nThe changelog is available [here](CHANGELOG.md).\n\n## Copyright\n\nCopyright (c) 2019 Abhimanyu Singh. See [LICENSE.md](LICENSE.md) for\nfurther details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favmnu-sng%2Frspec-tap-formatters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favmnu-sng%2Frspec-tap-formatters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favmnu-sng%2Frspec-tap-formatters/lists"}