|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|HTTP server mocking and expectations library for Node.js|
|Vcrpy||2,478||860||156||16 days ago||70||July 31, 2023||131||mit||Python|
|Automatically mock your HTTP interactions to simplify and speed up testing|
|Jvm Sandbox Repeater||2,281||11 hours ago||93||apache-2.0||Java|
|A Java server-side recording and playback solution based on JVM-Sandbox|
|Httpretty||2,038||2,640||116||5 months ago||59||August 16, 2021||113||mit||Python|
|Intercept HTTP requests at the Python socket level. Fakes the whole socket module|
|Mocky||1,947||a month ago||28||apache-2.0||TypeScript|
|Generate custom HTTP responses, the simpler way to test your Web Services|
|Gock||1,914||120||547||a month ago||21||August 03, 2021||39||mit||Go|
|HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽|
|A tool to quickly mock out end points, setup delays and more...|
|Pact Js||1,456||95||94||23 days ago||180||July 18, 2023||84||other||TypeScript|
|JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.|
|Stripe Mock||1,224||2 days ago||240||September 07, 2023||3||mit||Go|
|stripe-mock is a mock HTTP server that responds like the real Stripe API. It can be used instead of Stripe's testmode to make test suites integrating with Stripe faster and less brittle.|
|Mock http requests made using fetch|
Mock HTTP calls without coding. Designed specially for testing and testers.
$npm install stubmatic -g
$stubmatic init [repo-name]
$stubmatic [-d <repo-name>]
To install stubmatic, you need to install nodejs and npm first. It is recommanded to be on latest version of both. npm is bundeled with nodejs. Now follow above commands to install stubmatic and to set up a repo.
Stubmatic works on request response mappings specified in a yaml file. Response contents can be read from body or file attribute of a maping.
- request: url: /stubs/(admin|staff|customer|security)/([0-9]+)/2 response: body: > multiple line response another line
When a request reaches to stubmatic server, it matches the request against all mappings. Whichever mapping matches first(top to bottom), will be used to serve the response. A complete response can be built with multiple files. It can also have some placeholder to show dynamic data, like date, or some random number or some part from request itself. Stubmatic first process and build complete response then respond back to any HTTP(s) request.
Using regular expression, single mapping can be used to match multiple requests and serve response from different files.
- request: method: POST url: /soap-simulator/services/ServiceName post: actionName[\s\S]*mobile.([0-9]+) response: headers: content-type: text/xml strategy: "first-found" files: ["stubs/<% post.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
- request: method: GET url: /rest-simulator/services/ServiceName/actionName/([0-9]+) response: headers: content-type: text/xml strategy: "first-found" files: ["stubs/<% url.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
Thank you to all our backers! 🙏 [Become a backer]
[Become a sponsor] Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Please also share your detail so we can thankyou on SocialMedia.