{"id":16325552,"url":"https://github.com/erwinheitzman/wdio-wiremock-service","last_synced_at":"2025-08-22T05:35:06.297Z","repository":{"id":36464490,"uuid":"225658897","full_name":"erwinheitzman/wdio-wiremock-service","owner":"erwinheitzman","description":"A WebdriverIO service to start \u0026 stop WireMock Standalone","archived":false,"fork":false,"pushed_at":"2024-02-21T02:38:44.000Z","size":565,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T13:48:42.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/erwinheitzman.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":"2019-12-03T15:53:33.000Z","updated_at":"2023-09-05T12:32:49.000Z","dependencies_parsed_at":"2024-10-28T09:08:42.328Z","dependency_job_id":"29f14896-7f23-49af-a038-dfe7acd04fa0","html_url":"https://github.com/erwinheitzman/wdio-wiremock-service","commit_stats":{"total_commits":86,"total_committers":4,"mean_commits":21.5,"dds":"0.22093023255813948","last_synced_commit":"588e986b779f14dab5bbf3f96742ae1477fa568f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/erwinheitzman/wdio-wiremock-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinheitzman%2Fwdio-wiremock-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinheitzman%2Fwdio-wiremock-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinheitzman%2Fwdio-wiremock-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinheitzman%2Fwdio-wiremock-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erwinheitzman","download_url":"https://codeload.github.com/erwinheitzman/wdio-wiremock-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinheitzman%2Fwdio-wiremock-service/sbom","scorecard":{"id":382014,"data":{"date":"2025-08-11","repo":{"name":"github.com/erwinheitzman/wdio-wiremock-service","commit":"588e986b779f14dab5bbf3f96742ae1477fa568f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T15:40:36.126Z","repository_id":36464490,"created_at":"2025-08-18T15:40:36.126Z","updated_at":"2025-08-18T15:40:36.126Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271591283,"owners_count":24786391,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-10T23:05:19.833Z","updated_at":"2025-08-22T05:35:06.264Z","avatar_url":"https://github.com/erwinheitzman.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Services"],"readme":"# WebdriverIO WireMock Service\n\n[![npm version](https://badge.fury.io/js/wdio-wiremock-service.svg)](https://www.npmjs.com/package/wdio-wiremock-service)\n[![downloads](https://img.shields.io/npm/dm/wdio-wiremock-service.svg)](https://www.npmjs.com/package/wdio-wiremock-service)\n\n[![Join the chat at https://gitter.im/erwinheitzman/wdio-wiremock-service](https://badges.gitter.im/erwinheitzman/wdio-wiremock-service.svg)](https://gitter.im/erwinheitzman/wdio-wiremock-service?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThis service helps you to run [WireMock](http://wiremock.org/) seamlessly when running tests with [WebdriverIO](https://webdriver.io). It uses the well known [Maven](https://mvnrepository.com/repos/central) repository to download the WireMock jar for you which is then automatically installed, started and stopped. Stay up to date by joining the community over at [Gitter](https://gitter.im/erwinheitzman/wdio-wiremock-service) for help and support.\n\n## Installation\n\n```bash\nnpm i -D wdio-wiremock-service\n```\n\nInstructions on how to install `WebdriverIO` can be found [here.](https://webdriver.io/docs/gettingstarted.html)\n\n## Usage\n\nIn the root directory (default `./mock`) you find two subdirectories, `__files` and `mappings` which are used for your fixtures and mocks.\n\nFor more information, checkout [WireMock's official documentation](https://wiremock.org/docs/standalone/).\n\n## Configuration\n\nIn order to use the service with the wdio testrunner you need to add it to your service array:\n\n```js\n// wdio.conf.js\nexport.config = {\n  // ...\n  services: ['wiremock'],\n  // ...\n};\n```\n\nWhen using webdriverio standalone you need to add the service and trigger the `onPrepare` and `onComplete` hooks manually. An example can be found [here](####webdriverio-standalone) (the example makes use of [Jest](https://jestjs.io/en/)):\n\n## Options\n\nThe following options can be added to the service.\n\n### port\n\nPort where WireMock should run on.\n\nType: `Number`\n\nDefault: `8080`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { port: 8181 }]],\n\t// ...\n};\n```\n\n### rootDir\n\nPath where WireMock will look for files.\n\nType: `String`\n\nDefault: `./mock`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { rootDir: './mock' }]],\n\t// ...\n};\n```\n\n### version\n\nVersion of WireMock to be downloaded and used.\n\nType: `String`\n\nDefault: `3.3.1`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { version: '2.25.1' }]],\n\t// ...\n};\n```\n\n### skipWiremockInstall\n\nTell the service to skip downloading WireMock.\n\nType: `Boolean`\n\nDefault: false\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { skipWiremockInstall: true }]],\n\t// ...\n};\n```\n\n### binPath\n\nCustom path to a local Wiremock binary (often used in combination with skipWiremockInstall).\n\nType: `String`\n\nDefault: './wiremock-standalone-3.0.0.jar' (relative from service)\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { binPath: './my-custom/example-path/wiremock-standalone-3.0.0.jar' }]],\n\t// ...\n};\n```\n\n### silent\n\nSilent mode for logging WireMock's output (including additional logging from the service itself).\n\nType: `Boolean`\n\nDefault: `false`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { silent: true }]],\n\t// ...\n};\n```\n\n### mavenBaseUrl\n\nBase download url for Maven.\n\nType: `String`\n\nDefault: `https://repo1.maven.org/maven2`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [['wiremock', { mavenBaseUrl: 'https://repo1.maven.org/maven2' }]],\n\t// ...\n};\n```\n\n### args\n\nList where you can pass all the supported arguments for configuring WireMock\n\nNote: you cannot pass the options (`port`, `rootDir`, `stdio`, `mavenBaseUrl`) here as they will be ignored.\n\nType: `Array`\n\nExample:\n\n```js\n// wdio.conf.js\nexport const config = {\n\t// ...\n\tservices: [\n\t\t[\n\t\t\t'wiremock',\n\t\t\t{\n\t\t\t\targs: ['--verbose', '--match-headers'],\n\t\t\t},\n\t\t],\n\t],\n\t// ...\n};\n```\n\n### Writing tests\n\nWriting your first test is really straight forward:\n\n#### Using the WDIO testrunner\n\n```js\nimport fetch from 'node-fetch'; // you can use any HTTP client you like\nimport { equal } from 'node:assert'; // you can use any assertion library you like\n\ndescribe('example', () =\u003e {\n\tit(`should assert the mock data`, async () =\u003e {\n\t\tconst body = await fetch('http://localhost:8080/api/mytest');\n\t\tequal(body.text(), 'Hello world!');\n\t});\n});\n```\n\n#### Using WebdriverIO Standalone\n\n```js\nimport fetch from 'node-fetch'; // you can use any HTTP client you like\nimport { equal } from 'node:assert'; // you can use any assertion library you like\nimport { remote } from 'webdriverio';\nimport { launcher } from 'wdio-wiremock-service';\n\nconst WDIO_OPTIONS = {\n\tcapabilities: {\n\t\tbrowserName: 'chrome',\n\t},\n};\n\ndescribe('example', () =\u003e {\n\tlet wiremockLauncher;\n\tlet client;\n\n\tbeforeAll(async () =\u003e {\n\t\twiremockLauncher = new launcher(); // create instance of the service\n\t\tawait wiremockLauncher.onPrepare(WDIO_OPTIONS); // run the onPrepare hook\n\t\tclient = await remote(WDIO_OPTIONS);\n\t});\n\n\tafterAll(async () =\u003e {\n\t\tawait client.deleteSession();\n\t\tawait wiremockLauncher.onComplete(); // run the onComplete hook\n\t});\n\n\ttest('should showoff a mocked api response', async () =\u003e {\n\t\tconst body = await fetch('http://localhost:8080/api/mytest');\n\t\tequal(body.text(), 'Hello world!');\n\t});\n});\n```\n\nFor more information on WebdriverIO see the [homepage](https://webdriver.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwinheitzman%2Fwdio-wiremock-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferwinheitzman%2Fwdio-wiremock-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwinheitzman%2Fwdio-wiremock-service/lists"}