{"id":26675789,"url":"https://github.com/maltsev-dev/wire_mocking","last_synced_at":"2025-03-26T03:26:22.050Z","repository":{"id":213069422,"uuid":"732041028","full_name":"maltsev-dev/wire_mocking","owner":"maltsev-dev","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T13:48:52.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T07:18:55.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maltsev-dev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-15T13:48:31.000Z","updated_at":"2023-12-18T07:18:44.000Z","dependencies_parsed_at":"2023-12-18T09:48:12.899Z","dependency_job_id":"2cfc6864-a2e3-43ad-b057-96ff3c2fde3b","html_url":"https://github.com/maltsev-dev/wire_mocking","commit_stats":null,"previous_names":["chemyl/wire_mocking","maltsev-dev/wire_mocking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltsev-dev%2Fwire_mocking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltsev-dev%2Fwire_mocking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltsev-dev%2Fwire_mocking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maltsev-dev%2Fwire_mocking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maltsev-dev","download_url":"https://codeload.github.com/maltsev-dev/wire_mocking/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245581925,"owners_count":20639063,"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":[],"created_at":"2025-03-26T03:26:21.524Z","updated_at":"2025-03-26T03:26:22.044Z","avatar_url":"https://github.com/maltsev-dev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mock API\n\nFor testing purpose when using production integration is impossible.\nComplex services with obtaining test data\n\nSUT App send request to Mock-Service and get static **preconfigured** response.\n\n- Fake it until you make it;\n- Simulate APIs that don't exist yet\n- SetUp happy Path response;\n- SetUp negative Path response;\n- Create stable isolated test environment;\n- Test flaky 3rd parties;\n- Test unstable or complex-data services;\n\nMockito / PowerMock =\u003e create complex Java object within unit test;\nWireMock =\u003e setting up stable test environment;\n\n### 2 ways to create stub:\n\n- 1- register stub from WireMock instance by **register()** method; | setting up more than one stub\n- 2- use static DSL chain methods within **stubFor()** method; | only one stub possible\n\n### InMemoryMock\n\nInMemoryMock - work in test environment in current Java thread;\n\n* Set Up one or more Mock Service\n  @RegisterExtension\n  static WireMockExtension wireMockExtension = new WireMockExtension .Builder().options(options().port(8080)).build();\n\n* create @BeforeEach method with configuration of the stub\n\n### StandaloneMock\n\nStandAloneMock - work within Java thread, from Docker run.\n\n* Crete JsonStub file with preconditions\n* Up and Run WireMock image in Docker by **docker.mock.yaml**\n* set volumes -\u003e JsonStub file\n* set ports\n\n\n* For more details visit - https://wiremock.org/docs/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaltsev-dev%2Fwire_mocking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaltsev-dev%2Fwire_mocking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaltsev-dev%2Fwire_mocking/lists"}