{"id":13936252,"url":"https://github.com/genomoncology/rigor","last_synced_at":"2025-07-19T21:32:14.101Z","repository":{"id":29627912,"uuid":"118140311","full_name":"genomoncology/rigor","owner":"genomoncology","description":"HTTP-based DSL for for validating RESTful APIs","archived":false,"fork":false,"pushed_at":"2024-08-13T15:38:32.000Z","size":9607,"stargazers_count":70,"open_issues_count":4,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-16T21:15:43.316Z","etag":null,"topics":["aiohttp","api-testing-framework","asyncio","python","python3","requests"],"latest_commit_sha":null,"homepage":"","language":"Python","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/genomoncology.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-01-19T15:11:57.000Z","updated_at":"2025-03-27T12:44:42.000Z","dependencies_parsed_at":"2024-04-28T00:00:54.427Z","dependency_job_id":null,"html_url":"https://github.com/genomoncology/rigor","commit_stats":{"total_commits":176,"total_committers":6,"mean_commits":"29.333333333333332","dds":0.3295454545454546,"last_synced_commit":"351f19a0364a3a5066b812e60b06b12933467c66"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/genomoncology/rigor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genomoncology%2Frigor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genomoncology%2Frigor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genomoncology%2Frigor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genomoncology%2Frigor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genomoncology","download_url":"https://codeload.github.com/genomoncology/rigor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genomoncology%2Frigor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"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":["aiohttp","api-testing-framework","asyncio","python","python3","requests"],"created_at":"2024-08-07T23:02:31.271Z","updated_at":"2025-07-19T21:32:09.089Z","avatar_url":"https://github.com/genomoncology.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"`Rigor` is a Domain Specific Language (DSL) and Command Line Interface (CLI)\nfor making HTTP requests, extracting data, and validating responses. The main\nintent of Rigor is to be an HTTP-based API (e.g. REST) Testing Framework for\nautomated functional or integration testing.\n\n\u003ca href='https://codecov.io/github/genomoncology/rigor/'\u003e\u003cimg src='https://codecov.io/github/genomoncology/rigor/branch/master/graph/badge.svg' align=\"right\" /\u003e\u003c/a\u003e\n\u003ca href='https://pypi.python.org/pypi/rigor'\u003e\u003cimg src='https://img.shields.io/pypi/v/rigor.svg' align=\"right\" /\u003e\u003c/a\u003e\n\n\u003cbr/\u003e\n\n\n# Requirements\n\n* Python 3.11\n\n\n# Installation\n\nInstall using `pip`...\n\n    pip install rigor\n\n\n# Feature List\n\n\n* Functional testing without the need to write glue code. (e.g. Cucumber)\n* Runs in either synchronous ([requests]) or asynchronous ([aiohttp]) mode.\n* YAML-based format for Test Case files for easy test creation and maintenance.\n* Response transformation using [jmespath.py] to reduce test fragility.\n* Pretty HTML test execution reports using [cucumber-sandwich].\n* [Swagger] path coverage report to ensure API surface area coverage.\n* Syntax highlighted console or JSON-based logging using [structlog].\n* Profiles for switching between different environments and settings.\n* Tags and CLI options for selectively executing subsets of the test suite.\n* Scenario Outlines (i.e. Tables) for cases with numerous scenarios.\n* Beautiful Soup parsing for extraction from HTML data.\n* Proper error code ($?) on suite success (0) or failure (!0)\n* Case-scenario unique identifier (__uuid__) for managing session and race conditions.\n\n\n# Command Line Interface (CLI) Options\n\n    $ rigor --help\n    Usage: rigor [OPTIONS] [PATHS]...\n\n    Options:\n      --profile TEXT             Profile name (e.g. test)\n      --host TEXT                Host name (e.g. http://localhost:8000)\n      -i, --includes TEXT        Include tag of cases. (e.g. smoke)\n      -e, --excludes TEXT        Exclude tag of cases to run. (e.g. broken)\n      -p, --prefixes TEXT        Filter cases by file prefix. (e.g. smoke_)\n      -e, --extensions TEXT      Filter cases by file extension. (e.g. rigor)\n      -c, --concurrency INTEGER  # of concurrent HTTP requests. (default: 5)\n      -o, --output TEXT          Report output folder.\n      -q, --quiet                Run in quiet mode. (warning/critical level only)\n      -v, --verbose              Run in verbose mode. (debug level logging)\n      -j, --json                 JSON-style logging.\n      -h, --html                 Generate HTML report.\n      -g, --coverage             Generate Coverage report.\n      -r, --retries INTEGER      # of retries for GET calls only. (default: 0)\n      -s, --sleep INTEGER        Retry sleep (seconds multiplied by retry).\n                                (default: 60)\n      -f, --retry_failed         Retries all failed scenarios at the end.\n      --version                  Logs current version and exits.\n      --help                     Show this message and exit.\n\n# Simple Example\n\n    (rigor) /p/tmp\u003e cat test.rigor\n    name: Simple case.\n\n    steps:\n      - description: Simple step.\n        request:\n          host: https://httpbin.org\n          path: get\n\n    (rigor) /p/tmp\u003e rigor test.rigor --html\n    2018-02-08 13:18.06 [info     ] no config file not found       [rigor] paths=('test.rigor',)\n    2018-02-08 13:18.06 [info     ] collecting tests               [rigor] cwd=/private/tmp paths=['test.rigor']\n    2018-02-08 13:18.06 [info     ] tests collected                [rigor] queued=1 skipped=0\n    2018-02-08 13:18.06 [info     ] execute suite complete         [rigor] failed=0 passed=1 timer=0.119s\n    2018-02-08 13:18.07 [info     ] launching browser              [rigor] report_path=/var/folders/b_/2hlrn_7930x81r009mfzl50m0000gn/T/tmps_8d7nn_/html-2018-02-08-08-18-06/cucumber-html-reports/cucumber-html-reports/overview-features.html\n\n![list]\n\n![detail]\n\n\n# Object Model\n\n* suite: set of cases that gets built dynamically based on cli arguments.\n* case: set of scenarios and steps in a .rigor file.\n* scenario: namespace for 1 run of case steps.\n* step: request with response extract, validate, etc.\n* iterate: repeats an individual step by iterating through iterable.\n* request: http call (get, post, etc.) to path with parameters, data, or uploads\n* extract: extract nested data from a response into a variable available to following steps.\n* validate: check an actual value against an expected value using a comparator.\n* transform: using [jmespath] to shape a JSON response into a specific format.\n\n![objects]\n\n\n# Comparators\n\nComparators are used by the validation phase of each step to check whether\nan actual value is returning as expected. See the [comparisons.rigor] example\nfor more details.\n\n* equals\n* not equals\n* same\n* not same\n* greater than\n* less than\n* greater than or equals\n* less than or equals\n* type\n* in\n* not in\n* regex\n* subset\n* not subset\n* length\n* superset\n* not superset\n* keyset\n* not keyset\n* contains\n* not contains\n\n\n# Related Projects\n\n* [Tavern] is an extremely similar project that was released a little too late for us to use.\n* [Pyresttest] was the first library we used before deciding to roll our own testing framework.\n* [Click] is the library used to build out the command-line options.\n* [Related] is the library used for parsing the YAML test suite into an Python object model.\n\n\n# More Examples\n\nMore examples can be found by reviewing the [tests/httpbin/] folder of this project.\n\n\n# License\n\nThe MIT License (MIT)\nCopyright (c) 2017 [Ian Maurer], [Genomoncology LLC]\n\n\n[Click]: http://click.pocoo.org/\n[PyRestTest]: https://github.com/svanoort/pyresttest/\n[Related]: https://github.com/genomoncology/related\n[Swagger]: https://swagger.io/specification/\n[Tavern]: https://taverntesting.github.io/\n[aiohttp]: http://aiohttp.readthedocs.io/en/stable/\n[cucumber-sandwich]: https://github.com/damianszczepanik/cucumber-sandwich\n[jmespath.py]: https://github.com/jmespath/jmespath.py\n[requests]: http://docs.python-requests.org/en/master/\n[structlog]: http://www.structlog.org/en/stable/\n[tests/httpbin/]: ./tests/httpbin\n[comparisons.rigor]: ./tests/httpbin/comparisons.rigor\n[list]: ./.images/list.png\n[detail]: ./.images/detail.png\n[objects]: ./.images/objects.png\n[Genomoncology LLC]: http://genomoncology.com\n[Ian Maurer]: https://github.com/imaurer\n[jmespath]: jmespath.org","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenomoncology%2Frigor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenomoncology%2Frigor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenomoncology%2Frigor/lists"}