{"id":13542013,"url":"https://github.com/cdent/gabbi","last_synced_at":"2025-05-15T17:07:55.227Z","repository":{"id":24518341,"uuid":"27924304","full_name":"cdent/gabbi","owner":"cdent","description":"Declarative HTTP Testing for Python and anything else","archived":false,"fork":false,"pushed_at":"2025-04-07T19:22:50.000Z","size":1215,"stargazers_count":151,"open_issues_count":21,"forks_count":35,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-07T23:04:28.314Z","etag":null,"topics":["api","http","python","test-automation","test-driven-development","testing"],"latest_commit_sha":null,"homepage":"http://gabbi.readthedocs.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdent.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","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":"2014-12-12T14:46:59.000Z","updated_at":"2025-04-07T19:22:54.000Z","dependencies_parsed_at":"2024-01-17T00:38:05.463Z","dependency_job_id":"d8390f4e-3523-4675-abc5-20f0d9622f1a","html_url":"https://github.com/cdent/gabbi","commit_stats":{"total_commits":654,"total_committers":31,"mean_commits":"21.096774193548388","dds":0.5198776758409787,"last_synced_commit":"b3e29cfbaa3b6e31c4ad44b3a020484f51383ebe"},"previous_names":[],"tags_count":137,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdent%2Fgabbi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdent%2Fgabbi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdent%2Fgabbi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdent%2Fgabbi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdent","download_url":"https://codeload.github.com/cdent/gabbi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253710888,"owners_count":21951433,"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":["api","http","python","test-automation","test-driven-development","testing"],"created_at":"2024-08-01T10:01:00.123Z","updated_at":"2025-05-15T17:07:50.217Z","avatar_url":"https://github.com/cdent.png","language":"Python","funding_links":[],"categories":["Python","Web Testing"],"sub_categories":[],"readme":".. image:: https://github.com/cdent/gabbi/workflows/tests/badge.svg\n    :target: https://github.com/cdent/gabbi/actions\n.. image:: https://readthedocs.org/projects/gabbi/badge/?version=latest\n    :target: https://gabbi.readthedocs.io/en/latest/\n    :alt: Documentation Status\n\nGabbi\n=====\n\n`Release Notes`_\n\nGabbi is a tool for running HTTP tests where requests and responses\nare represented in a declarative YAML-based form. The simplest test\nlooks like this::\n\n    tests:\n    - name: A test\n      GET: /api/resources/id\n\nSee the docs_ for more details on the many features and formats for\nsetting request headers and bodies and evaluating responses.\n\nGabbi is tested with Python 3.9, 3.10, 3.11, 3.12, 3.13 and pypy3.10.\n\nTests can be run using `unittest`_ style test runners, `pytest`_\nor from the command line with a `gabbi-run`_ script.\n\nThere is a `gabbi-demo`_ repository which provides a tutorial via\nits commit history. The demo builds a simple API using gabbi to\nfacilitate test driven development.\n\n.. _Release Notes: https://gabbi.readthedocs.io/en/latest/release.html\n.. _docs: https://gabbi.readthedocs.io/\n.. _gabbi-demo: https://github.com/cdent/gabbi-demo\n.. _unittest: https://gabbi.readthedocs.io/en/latest/example.html#loader\n.. _pytest: http://pytest.org/\n.. _loader docs: https://gabbi.readthedocs.io/en/latest/example.html#pytest\n.. _gabbi-run: https://gabbi.readthedocs.io/en/latest/runner.html\n\nPurpose\n-------\n\nGabbi works to bridge the gap between human readable YAML files that\nrepresent HTTP requests and expected responses and the obscured realm of\nPython-based, object-oriented unit tests in the style of the unittest\nmodule and its derivatives.\n\nEach YAML file represents an ordered list of HTTP requests along with\nthe expected responses. This allows a single file to represent a\nprocess in the API being tested. For example:\n\n* Create a resource.\n* Retrieve a resource.\n* Delete a resource.\n* Retrieve a resource again to confirm it is gone.\n\nAt the same time it is still possible to ask gabbi to run just one\nrequest. If it is in a sequence of tests, those tests prior to it in\nthe YAML file will be run (in order). In any single process any test\nwill only be run once. Concurrency is handled such that one file\nruns in one process.\n\nThese features mean that it is possible to create tests that are\nuseful for both humans (as tools for improving and developing APIs)\nand automated CI systems.\n\nTesting and Developing Gabbi\n----------------------------\n\nTo get started, after cloning the `repository`_, you should install the\ndevelopment dependencies::\n\n    $ pip install -r requirements-dev.txt\n\nIf you prefer to keep things isolated you can create a virtual\nenvironment::\n\n    $ virtualenv gabbi-venv\n    $ . gabbi-venv/bin/activate\n    $ pip install -r requirements-dev.txt\n\nGabbi is set up to be developed and tested using `tox`_ (installed via\n``requirements-dev.txt``). To run the built-in tests (the YAML files\nare in the directories ``gabbi/tests/gabbits_*`` and loaded by the file\n``gabbi/test_*.py``), you call ``tox``::\n\n    tox -epep8,py311\n\nIf you have the dependencies installed (or a warmed up\nvirtualenv) you can run the tests by hand and exit on the first\nfailure::\n\n    python -m subunit.run discover -f gabbi | subunit2pyunit\n\nTesting can be limited to individual modules by specifying them\nafter the tox invocation::\n\n    tox -epep8,py311 -- test_driver test_handlers\n\nIf you wish to avoid running tests that connect to internet hosts,\nset ``GABBI_SKIP_NETWORK`` to ``True``.\n\n.. _tox: https://tox.readthedocs.io/\n.. _repository: https://github.com/cdent/gabbi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdent%2Fgabbi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdent%2Fgabbi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdent%2Fgabbi/lists"}