{"id":19722127,"url":"https://github.com/eshengsky/chrome-extension-mocker","last_synced_at":"2025-02-27T18:28:42.265Z","repository":{"id":38991312,"uuid":"207536199","full_name":"eshengsky/chrome-extension-mocker","owner":"eshengsky","description":"The most convenient tool to mock requests for axios, with built-in Chrome extension support.","archived":false,"fork":false,"pushed_at":"2022-12-14T17:25:31.000Z","size":33792,"stargazers_count":43,"open_issues_count":14,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T06:48:08.206Z","etag":null,"topics":["axios","axios-adapter","axios-module","mock","mock-library","mocking","mocking-library"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/eshengsky.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}},"created_at":"2019-09-10T11:03:08.000Z","updated_at":"2024-09-24T08:10:54.000Z","dependencies_parsed_at":"2023-01-29T00:16:27.027Z","dependency_job_id":null,"html_url":"https://github.com/eshengsky/chrome-extension-mocker","commit_stats":null,"previous_names":["eshengsky/axios-mocker"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshengsky%2Fchrome-extension-mocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshengsky%2Fchrome-extension-mocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshengsky%2Fchrome-extension-mocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshengsky%2Fchrome-extension-mocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eshengsky","download_url":"https://codeload.github.com/eshengsky/chrome-extension-mocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241044235,"owners_count":19899481,"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":["axios","axios-adapter","axios-module","mock","mock-library","mocking","mocking-library"],"created_at":"2024-11-11T23:16:30.535Z","updated_at":"2025-02-27T18:28:42.242Z","avatar_url":"https://github.com/eshengsky.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/eshengsky/chrome-extension-mocker\"\u003e\u003cimg src=\"https://github.com/eshengsky/chrome-extension-mocker/blob/master/public/icons/icon_128.png\" height=\"120\" align=\"right\"\u003e\u003c/a\u003e\n\n# chrome-extension-mocker\n\nA mock tool based on Chrome extension, no need to change any code, support dynamic mock data.\n\nIf you want to use v1 version, switch to [axios-mocker](https://github.com/eshengsky/chrome-extension-mocker/tree/axios-mocker) branch.\n\n## Why need mock requests\n* Instead of waiting for the dependent web service to develop and deploy, you just need to define the interface fields and the front back end can be developed in parallel.\n* Some web service may contaminate the data in the production environment, while the real request will not be sent by simulating the request and specifying the response you want. \n* Many times, the web service may return various types of responses, and developers and testers need to verify if it is working correctly under different returns, for example, when web service status code is 500, the page can be displayed as expected. Creating the data through normal operations can sometimes be particularly cumbersome or difficult, while using mock requests is convenient, and boundary testing can be done efficiently if you want to return what you want. \n* It is the base of TDD (test-driven development) and automated testing.\n\n## Preview\n![](https://github.com/eshengsky/chrome-extension-mocker/blob/master/public/preview1.png)\n![](https://github.com/eshengsky/chrome-extension-mocker/blob/master/public/preview2.png)\n\n## Download\n\nDownload from [Chrome Web Store](https://chrome.google.com/webstore/detail/kfmkpfnmkjgcalngkpkjpjngjkfkjecl).\n\nOr, download and install as following:\n\n1. Download the latest package in [Release](https://github.com/eshengsky/chrome-extension-mocker/releases/latest) page.\n2. Open Chrome, enter `chrome://extensions/` in the address bar to enter the Chrome extension page, and check the `Developer mode`.\n3. Drag the downloaded zip file to the page, and click on the `Add Extension` button.\n\n## Usage\n\nIn Chrome browser, press `Ctrl+Shift+I` or `⌘+⌥+I` to open dev tools, go to `Mocker` panel.\n\nClick the New button, and enter the mock data you want.\nIn Match Request panel, set which requests need to match, and in Mock Response panel, set the simulate response you want to return.\n\nNote that if one request is matched, the original request will be redirected into a data uri, you can see details in Console panel.\n\n## Development\n\n```bash\n$ yarn serve\n```\n\n## Package\n\n```bash\n$ yarn build\n```\n\n## Example\n\n```bash\n$ cd example\n$ node server.js\n```\n\nVisit http://localhost:8369/example/index.html.\n\n## Licence\n\nMIT License\n\nCopyright (c) 2021 Sky.Sun 孙正华\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshengsky%2Fchrome-extension-mocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feshengsky%2Fchrome-extension-mocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshengsky%2Fchrome-extension-mocker/lists"}