{"id":22048895,"url":"https://github.com/chaostoolkit-incubator/chaostoolkit-wiremock","last_synced_at":"2025-05-08T23:06:02.741Z","repository":{"id":41635168,"uuid":"191330531","full_name":"chaostoolkit-incubator/chaostoolkit-wiremock","owner":"chaostoolkit-incubator","description":"Chaos Toolkit driver for the WireMock service API","archived":false,"fork":false,"pushed_at":"2023-02-08T03:57:49.000Z","size":87,"stargazers_count":3,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T23:06:01.682Z","etag":null,"topics":["chaos-engineering","chaostoolkit","chaostoolkit-extension","wiremock"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaostoolkit-incubator.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,"zenodo":null}},"created_at":"2019-06-11T08:44:39.000Z","updated_at":"2022-05-05T07:49:02.000Z","dependencies_parsed_at":"2023-01-31T02:00:57.998Z","dependency_job_id":"254ac5e2-d6de-48d5-b731-a3aa2f0ca5fb","html_url":"https://github.com/chaostoolkit-incubator/chaostoolkit-wiremock","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-wiremock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-wiremock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-wiremock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-wiremock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaostoolkit-incubator","download_url":"https://codeload.github.com/chaostoolkit-incubator/chaostoolkit-wiremock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160775,"owners_count":21863628,"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":["chaos-engineering","chaostoolkit","chaostoolkit-extension","wiremock"],"created_at":"2024-11-30T14:13:39.750Z","updated_at":"2025-05-08T23:06:02.722Z","avatar_url":"https://github.com/chaostoolkit-incubator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"chaostoolkit-wiremock\n=====================\n\n[![Build Status](https://travis-ci.com/chaostoolkit-incubator/chaostoolkit-wiremock.svg?branch=master)](https://travis-ci.com/chaostoolkit-incubator/chaostoolkit-wiremock)\n[![image](https://img.shields.io/pypi/v/chaostoolkit-wiremock.svg)](https://pypi.python.org/pypi/chaostoolkit-wiremock)\n\n[Chaos Toolkit][chaostoolkit] driver for [WireMock][wiremock]. \n\n[chaostoolkit]: http://chaostoolkit.org\n[wiremock]: http://wiremock.org/\n\nPackage installation\n--------------------\n\nTo install the package from pypi.org:\n\n    pip install -U chaostoolkit-wiremock\n\nInstallation from source\n------------------------\n\nIn order to use it, you need python 3.5+ in your environment.\nOnce downloaded the project, cd into it and run:\n\n    pip install -r requirements.txt -r requirements-dev.txt\n    make clean \u0026\u0026 make test \u0026\u0026 make install\n\nConfiguration\n-------------\n\nThe following keys can be configured in the experiment global\nconfiguration section, under the \\\"wiremock\\\" key:\n\n-   **host**: the wiremock server host\n-   **port**: the wiremock server port\n-   **contextPath**: the contextPath for your wiremock server (optional)\n-   **timeout**: accepted timeout (defaults to 1 sec)\n-   **down**: the delayDistribution section used by the `down` action\n\nConfiguration example:\n\n    {\n        \"configuration\": {\n            \"wiremock\": {\n                \"host\": \"localhost\",\n                \"port\": 8080,\n                \"contextPath\": \"/wiremock\",\n                \"timeout\": 10,\n                \"down\": {\n                    \"type\": \"lognormal\",\n                    \"median\": 3000,\n                    \"sigma\": 0.2\n                }\n            }\n        }\n    }\n\nExported Actions\n----------------\n\nAdding a list of mappings:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"adding a mapping\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"add_mappings\",\n            \"arguments\": {\n              \"mappings\": [{\n                \"request\": {\n                   \"method\": \"GET\",\n                   \"url\": \"/hello\"\n                },\n                \"response\": {\n                   \"status\": 200,\n                   \"body\": \"Hello world!\",\n                   \"headers\": {\n                       \"Content-Type\": \"text/plain\"\n                   }\n                } \n              }]\n            }\n          }\n        }\n      ]\n    }\n\nDeleting a list of mappings:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"deleting a mapping\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"delete_mappings\",\n            \"arguments\": {\n              \"filter\": [{\n                 \"method\": \"GET\",\n                 \"url\": \"/hello\"\n              }]\n            }\n          }\n        }\n      ]\n    }\n\nAdding a global fixed delay:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Adding a global fixed delay\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"global_fixed_delay\",\n            \"arguments\": {\n              \"fixedDelay\": 10\n            }\n          }\n        }\n      ]\n    }\n\nAdding a global random delay:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Adding a global random delay\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"global_random_delay\",\n            \"arguments\": {\n              \"delayDistribution\": {\n                \"type\": \"lognormal\",\n                \"median\": 20,\n                \"sigma\": 0.1\n              }\n            }\n          }\n        }\n      ]\n    }\n\nAdding a fixed delay to a list of mappings:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Adding a fixed delay to a mapping\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"fixed_delay\",\n            \"arguments\": {\n              \"filter\": [{\n                \"method\": \"GET\",\n                \"url\": \"/hello1\"\n              }],\n              \"fixedDelayMilliseconds\": 1000\n            }\n          }\n        }\n      ]\n    }\n\nAdding a random delay to a list of mappings:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Adding a random delay to a mapping\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"random_delay\",\n            \"arguments\": {\n              \"filter\": [{\n                \"method\": \"GET\",\n                \"url\": \"/hello2\"\n              }],\n              \"delayDistribution\": {\n                \"type\": \"lognormal\",\n                \"median\": 2000,\n                \"sigma\": 0.5\n              }\n            }\n          }\n        }\n      ]\n    }\n\nAdding a ChunkedDribbleDelay to a list of mappings:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Adding a ChunkedDribbleDelay to a mapping\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"chunked_dribble_delay\",\n            \"arguments\": {\n              \"filter\": [{\n                \"method\": \"GET\",\n                \"url\": \"/hello\"\n              }],\n              \"chunkedDribbleDelay\": {\n                \"numberOfChunks\": 5,\n                \"totalDuration\": 1000\n              }\n            }\n          }\n        }\n      ]\n    }\n\nTaking a list of mappings down (heavy distribution delay). This action\nwill use the parameters specified in the \\\"down\\\" key of the\nconfiguration section:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Taking a mapping down\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"down\",\n            \"arguments\": {\n              \"filter\": [{\n                \"method\": \"GET\",\n                \"url\": \"/hello\"\n              }]\n            }\n          }\n        }\n      ]\n    }\n\nTaking a list of mappings up back again:\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Taking a mapping down\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"up\",\n            \"arguments\": {\n              \"filter\": [{\n                \"method\": \"GET\",\n                \"url\": \"/hello\"\n              }]\n            }\n          }\n        }\n      ]\n    }\n\nResetting the wiremock server (deleting all mappings):\n\n    {\n      \"method\": [\n        {\n          \"type\": \"action\",\n          \"name\": \"Taking a mapping down\",\n          \"provider\": {\n            \"type\": \"python\",\n            \"module\": \"chaoswm.actions\",\n            \"func\": \"reset\"\n          }\n        }\n      ]\n    }\n\n\n### Experiments\n\nThe driver comes with an experiments directory where you can find snippets to test all APIs \nagainst a WireMock server listening on localhost:8080.\n\n\n### Discovery\n\nYou may use the Chaos Toolkit to discover the capabilities of this\nextension:\n\n    $ chaos discover chaostoolkit-wiremock  --no-install\n\nCredits\n-------\n\nThis package was created with\n[Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)\nproject template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-wiremock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-wiremock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-wiremock/lists"}