There are lots of variations depending upon your use case.<p>For unit testing and CI you may want mock objects that are implemented in the same language as your code. Google search for "mock object <language>". That's where you'll find Mockito (Java) or Mocha Spy (NodeJS) or Testify (golang). This list never ends.<p>Specifically for unit testing of a UI, you may want your browser driver to handle this, ex: Cypress has built-in support for mock AJAX endpoints.
<a href="https://docs.cypress.io/guides/guides/stubs-spies-and-clocks.html" rel="nofollow">https://docs.cypress.io/guides/guides/stubs-spies-and-clocks...</a><p>If you want an endpoint you can call, Postman has a feature for this, there are several others like this in the comments (JSON Server, mmock, mountebank, etc.).
<a href="https://learning.postman.com/docs/postman/mock-servers/setting-up-mock/" rel="nofollow">https://learning.postman.com/docs/postman/mock-servers/setti...</a><p>If you need to capture traffic, check out goreplay or mitmproxy:
<a href="https://github.com/buger/goreplay" rel="nofollow">https://github.com/buger/goreplay</a>
<a href="https://docs.mitmproxy.org/stable/" rel="nofollow">https://docs.mitmproxy.org/stable/</a><p>There is a whole class of "VCR" projects for recording traffic, these tend to be language specific (VCR is in Ruby), but there are ports to other languages:
<a href="https://github.com/vcr/vcr" rel="nofollow">https://github.com/vcr/vcr</a>
<a href="https://github.com/bblimke/webmock" rel="nofollow">https://github.com/bblimke/webmock</a><p>The vendor products tend to be labelled Service Virtualization. I used to work for one of those companies, ITKO, we were acquired by CA Technologies (now Broadcom) in 2011. There are vendor products from Micro Focus, Tricentis, Broadcom, Parasoft, etc.<p>It's important to think about your use case: local development, unit testing, CI, integration testing, performance testing, recording vs. programming, protocol support, payload support, etc. Many of the tools focus on just a subset of these areas.