{"id":15792553,"url":"https://github.com/marioruiz/api-testing-example","last_synced_at":"2026-05-08T15:35:11.129Z","repository":{"id":98522592,"uuid":"170314956","full_name":"MarioRuiz/api-testing-example","owner":"MarioRuiz","description":"Example using RSpec and nice_http to test REST APIs. (Uber API and Reqres API)","archived":false,"fork":false,"pushed_at":"2019-03-14T11:37:01.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T23:09:43.745Z","etag":null,"topics":["openapi","openapi3","rspec","ruby","swagger","test","testing"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarioRuiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-02-12T12:33:54.000Z","updated_at":"2019-03-14T11:37:03.000Z","dependencies_parsed_at":"2023-04-16T12:35:03.713Z","dependency_job_id":null,"html_url":"https://github.com/MarioRuiz/api-testing-example","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"5470566f116f2b0a744f739b6e9acd14a6180968"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioRuiz%2Fapi-testing-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioRuiz%2Fapi-testing-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioRuiz%2Fapi-testing-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioRuiz%2Fapi-testing-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarioRuiz","download_url":"https://codeload.github.com/MarioRuiz/api-testing-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523896,"owners_count":20791444,"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":["openapi","openapi3","rspec","ruby","swagger","test","testing"],"created_at":"2024-10-04T23:01:54.712Z","updated_at":"2026-05-08T15:35:06.107Z","avatar_url":"https://github.com/MarioRuiz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API testing example\n\nThe purpose of this document is to be an easy guide for devs and testers to start testing REST APIs just in minutes.\n\nFor the examples we will be testing the [**Uber**](https://api.uber.com) API using a YAML Swagger / Open API file and [**Reqres**](https://reqres.in/) API using a normal Request Hash file.\n\nTo generate the Request Hashes from a **Swagger** / **Open API file**, run the file ./utils/import_swagger.rb or use the **open_api_import** command line executable.\n\nIf you want to automatically generate RSpec tests for every end point of your Swagger file, use the create_tests gem: https://github.com/MarioRuiz/create_tests\n\n# Installation\n\n1. Install Ruby \u003e=2.4. Recommended last 2.5 stable release. To see which version you already have installed: `ruby -v`\n    * [Ruby Installation](https://www.ruby-lang.org/en/documentation/installation/)\n\n2. Install the libraries we use by running from root folder:\n    ```bash\n    bundle install\n    ```    \n    \n# Documentation\n\n## General \n  * [Ruby in 20 minutes](https://www.ruby-lang.org/en/documentation/quickstart/)\n  * [Ruby from other languages](https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/)\n  * [Ruby Cheat Sheet](https://learnxinyminutes.com/docs/ruby/)\n\n## Libraries\n  * [RSpec](http://rspec.info/), [RSpec CheatSheet](https://devhints.io/rspec)\n  * [nice_http](https://github.com/MarioRuiz/nice_http)\n  * [nice_hash](https://github.com/MarioRuiz/nice_hash)\n  * [open_api_import](https://github.com/MarioRuiz/open_api_import)\n  * [create_tests](https://github.com/MarioRuiz/create_tests)\n\n# Running tests\n\nTo run all the tests:\n```bash\nrspec\n```\n\nTo run a particular test file:\n```bash\nrspec ./spec/my_test_spec.rb\n```\n\nTo run a particular test (example) inside a test file, add the line number where the test is:\n```bash\nrspec ./spec/my_test_spec.rb:42\n```\n\nThe default values to set all tests are on `settings` folder. You can pass parameters to overwrite the settings in command line or ENV variables.\n\n```bash\nHOST=10.20.30.50 rspec ./spec/my_test_spec.rb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioruiz%2Fapi-testing-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarioruiz%2Fapi-testing-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioruiz%2Fapi-testing-example/lists"}