{"id":19607604,"url":"https://github.com/nishants/wirestub","last_synced_at":"2025-02-26T16:45:51.568Z","repository":{"id":149772345,"uuid":"65116169","full_name":"nishants/wirestub","owner":"nishants","description":"A wrapper over wiremock , to make it work like a stub.","archived":false,"fork":false,"pushed_at":"2016-10-21T03:49:46.000Z","size":28610,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T09:29:26.372Z","etag":null,"topics":["automation","jeyson","stubbing","test-automation","testing","wiremock"],"latest_commit_sha":null,"homepage":"","language":"Java","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/nishants.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-08-07T04:49:03.000Z","updated_at":"2018-11-20T10:14:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"705660d6-b7ab-47ac-9b97-d28a0d980e2a","html_url":"https://github.com/nishants/wirestub","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishants%2Fwirestub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishants%2Fwirestub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishants%2Fwirestub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishants%2Fwirestub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishants","download_url":"https://codeload.github.com/nishants/wirestub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240895711,"owners_count":19875023,"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":["automation","jeyson","stubbing","test-automation","testing","wiremock"],"created_at":"2024-11-11T10:11:34.511Z","updated_at":"2025-02-26T16:45:51.541Z","avatar_url":"https://github.com/nishants.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wirestub : wiremock in stub style\n- Designed to operate in standalone and stubbing mode only.\n- Adds powerful scripting and templating system for wiremock.\n- Allows behavioral stubbing without writing java code.\n- Adds following feature to wiremock : \n    - templating engine for json and xml.\n    - before script to execute instruction before serving response.\n    - accessing request body, headers, cookies, query params in templates.\n    - xpath support for xml request body.\n    - configuration by environment.\n    - setting session values in before scripts. \n    - accessing session values in templates.\n- This wrapper doesn't change any existing behavior of wiremock, so a wiremock standalone jar can be safely replaced by miraze standalone jar.\n- Because it behaves just like wiremock, so it can be used along with other wrappers (like service_mock) and extensions.\n- It can be controlled with the wiremock's http api.\n- It support all the runtime parameters of wiremock, along with adding some of its own.\n\n# Philosophy : Stubbing over Mocking \n- This extension tries to push developers away from mocking external services instead of stubbing them.\n- A stub has a pre-determined behavior and tests are written based on stub's behavior.\n- Mocking on the other hand creates expected behavior just before executing a test.\n- Hence stubbing facilitates easier reproduction of issues and keeps test data in human readable form (json/xml files).\n- Also the test data itself can be validated or migrated into databases if needed.\n- Miraze is designed to reflect back user response based on incoming request.\n- Though it also allows session variables, but sessions must be avoided to keep stubs stateless.\n\n\n# Jeyson Template Engine\n- request, config, session, directives, custom directives\n- link to template syntax.\n\n# Template Features\n - conditional\n - expressions\n - @ignore-if : \"expression\"\n - @if, @else, @then        : \"expression\"\n - @include   : \"expression\"\n - @log       : \"expression\"\n - @repeat\n\n# Shared templates\n- segregate shared template (ease of maintaining test data)\n- include template conditionally \n- passing params to template scope.\n\n# Sessions\n- get session\n- set session\n- use session by response body\n- reset session by api calls\n\n# @before\n- execute script before request\n- set or get session variables, request body, header, path, query in script scope.\n- exectes lines of javascript expressions in place.\n\n# @headers \n    - use jeyson in headers\n    - conditional headers\n    \n# @body\n    - use jeyson expressions in body\n     \n# @template\nRoute By Request \n- by url path variable\n- by request query param\n- by request header\n- by request body\n- by using expressions\n- by session variable\n\n# Run as standalone\n\n# Run as extension\n\n# stub_service (fork of service_mock) ruby gem \ninvoke : \n- start server : with runtime parameters\n- stub http calls + all service mock features\n- reset session\n- get session\n- set session\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishants%2Fwirestub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishants%2Fwirestub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishants%2Fwirestub/lists"}