Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: mock v0.6.0 (github.com/dhuan)
1 point by dhuan_ on March 21, 2023 | hide | past | favorite
mock enables you to quickly set up HTTP APIs. As effortlessly as possible. Additionally, it has test-assertion capabilities that facilitates E2E tests - assert that endpoint x has been requested with body fields y and z. The major difference from other similar tools is that mock is language agnostic - setting up complex endpoint responses with conditional content is all done declaratively through config files. Also running test assertions also is done through HTTP calls, not requiring actual code. Can be done through code as well, but that's an alternative.

Setting up your CI pipelines to install it is just a matter of downloading the tarball from github. And it doesn't matter which programming language your codebase to be tested is using - mock's functionalities are designed to be independent of the stack it's being used with.

Here's a few highlights of the recent versions:

- Endpoint handlers can be written as shell scripts. What your script outputs (stdout) ends up as the response; - Endpoints can be static file servers;

Check the user guide to know more about the mentioned functionalities.

https://github.com/dhuan/mock/blob/master/user_guide.md




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: