{"id":14008321,"url":"https://github.com/aviaviavi/curl-runnings","last_synced_at":"2026-02-21T15:03:00.733Z","repository":{"id":30007425,"uuid":"123322609","full_name":"aviaviavi/curl-runnings","owner":"aviaviavi","description":"A declarative test framework for quickly and easily writing integration tests against JSON APIs.","archived":false,"fork":false,"pushed_at":"2023-06-25T21:43:04.000Z","size":218,"stargazers_count":160,"open_issues_count":15,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-12-07T22:12:58.654Z","etag":null,"topics":["testing","testing-framework"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/aviaviavi.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}},"created_at":"2018-02-28T18:04:50.000Z","updated_at":"2025-09-04T18:08:01.000Z","dependencies_parsed_at":"2024-01-16T22:21:11.861Z","dependency_job_id":"d2ab0596-e11a-4047-a233-bf219729d0f3","html_url":"https://github.com/aviaviavi/curl-runnings","commit_stats":{"total_commits":169,"total_committers":10,"mean_commits":16.9,"dds":0.1597633136094675,"last_synced_commit":"a4c2ced546ba8428a69b0c9a59dea1d3adcd9420"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/aviaviavi/curl-runnings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviaviavi%2Fcurl-runnings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviaviavi%2Fcurl-runnings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviaviavi%2Fcurl-runnings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviaviavi%2Fcurl-runnings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aviaviavi","download_url":"https://codeload.github.com/aviaviavi/curl-runnings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aviaviavi%2Fcurl-runnings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["testing","testing-framework"],"created_at":"2024-08-10T11:01:35.032Z","updated_at":"2026-02-21T15:03:00.717Z","avatar_url":"https://github.com/aviaviavi.png","language":"Haskell","funding_links":[],"categories":["Haskell","testing"],"sub_categories":[],"readme":"# curl-runnings\n\n[![Hackage](https://img.shields.io/hackage/v/curl-runnings.svg)](https://hackage.haskell.org/package/curl-runnings)\n\n_Feel the rhythm! Feel the rhyme! Get on up, it's testing time! curl-runnings!_\n\nA common form of black-box API testing boils down to simply making requests to\nan endpoint and verifying properties of the response. curl-runnings aims to make\nwriting tests like this fast and easy.\n\ncurl-runnings is a framework for writing declarative tests for your APIs in a\nfashion equivalent to performing `curl`s and verifying the responses. Write your\ntests quickly and correctly with a straight-forward specification in\n[Dhall](https://dhall-lang.org/), yaml, or json that can encode simple but\npowerful matchers against responses.\n\nAlternatively, you can use the curl-runnings library to write your tests in\nHaskell (though a Haskell setup is absolutely not required to use this tool).\n\n\n### Installing\n\nBinaries are available on the Releases section of the GitHub page.\n\nYou can also compile from source with stack.\n\n### Writing a test specification\n\nCurl runnings tests are just data! A test spec is an object containing an array\nof `cases`, where each item represents a single curl and set of assertions about\nthe response. Write your tests specs in a Dhall, yaml or json file. Note: the legacy\nformat of a top level array of test cases is still supported, but may not be in\nfuture releases.\n\n```dhall\nlet JSON = https://prelude.dhall-lang.org/JSON/package.dhall\n\nlet CurlRunnings = ./dhall/curl-runnings.dhall\n\nin   CurlRunnings.hydrateCase\n        CurlRunnings.Case::{\n        , expectData = Some\n            ( CurlRunnings.ExpectData.Exactly\n                ( JSON.object\n                    [ { mapKey = \"okay\", mapValue = JSON.bool True },\n                      { mapKey = \"message\", mapValue = JSON.string \"a message\" }]\n                )\n            )\n        , expectStatus = 200\n        , name = \"test 1\"\n        , requestMethod = CurlRunnings.HttpMethod.GET\n        , url = \"http://your-endpoing.com/status\"\n        }\n```\n\n\n```yaml\n---\n# example-test.yaml\n#\n# specify all your test cases as an array keys on `cases`\ncases:\n  - name: A curl runnings test case\n    url: http://your-endpoint.com/status\n    requestMethod: GET\n    # Specify the json payload we expect here\n    expectData:\n      # The 1 key in this object specifies the matcher we want\n      # to use to test the returned payload. In this case, we\n      # require the payload is exactly what we specify.\n      exactly:\n        okay: true\n        msg: 'a message'\n    # Assertions about the returned status code. Pass in\n    # an acceptable code or list of codes\n    expectStatus: 200\n\n```\n\nSee /examples for more example curl runnings specifications, which walk\nthrough some of the other features that can be encoded in your tests such as:\n- reference data from previous responses of previous test cases\n- reference environment variables\n- various easy-to-use json matchers\n- support for importing data from other yaml files in your spec\n\n### Running\n\nOnce you've written a spec, simply run it with:\n\n```curl-runnings -f path/to/your/spec.yaml ```\n\n(hint: try using the --verbose flag for more output)\n\nIf all your tests pass, curl-runnings will cleanly exit with a 0 code. A code of\n1 will be returned if any tests failed.\n\nYou can also select specific test cases by filtering via regex by using the\n`--grep` flag. Just make sure your case isn't referencing data from previous\nexamples that won't get run!\n\nFor more info:\n\n```curl-runnings --help ```\n\n\n### Running With Docker\nA dockerfile is included in the root of the project. The Dockerfile will expect the linux based curl-runnings executable in the same directory as the Dockerfile and a `tests.yml` file. You can download the latest executable from the release page : https://github.com/aviaviavi/curl-runnings/releases .\n\n``` docker build . -t curl-runnings-tests```\n\n```  docker run curl-runnings-tests```\n\nIf you use docker-compose, you can add this to docker-compose.yml:\n\n```\ntests:\n    build:\n      context: .\n      dockerfile: ./Dockerfile\n```\n\n### Contributing\n\nContributions in any form are welcome and encouraged. Don't be shy! :D\n\n\u003cimg referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=81e4a851-7a38-4727-af19-05a9106609c0\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviaviavi%2Fcurl-runnings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faviaviavi%2Fcurl-runnings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviaviavi%2Fcurl-runnings/lists"}