Show HN: Wannabe – A versatile Go tool for generating mock HTTP APIs https://ift.tt/87eo4YK

Show HN: Wannabe – A versatile Go tool for generating mock HTTP APIs Hey HN! Half a year ago, I decided to learn the basics of Go and create something useful along the way. Thus, I created Wannabe, a tool that's useful for generating mock HTTP APIs used in integration and all the other kinds of testing. How it works? Wannabe functions as a standalone server. Upon receiving a request, it generates a cURL command from it based on the request matching configuration you set and generates a hash from the prepared cURL command. When in "proxy" or "mixed" mode, Wannabe proxies the request to the external provider and stores the request/response pair as a record in the configured storage provider using the generated hash as a key. When in "mixed" or "server" mode, Wannabe looks up the matching record in the configured storage provider using the generated hash as a record key and responds with the stored response if it finds a matching record. Of course, similar tools already exist, but this is the one I started, and I'm already implementing it into testing flows at the company I work for. ;) I'm kindly inviting you to check out the repository and documentation on GitHub. All comments and potential contributions in the future are highly welcome. If there’s enough interest, I’m more than ready to develop it further. Take care... and keep creating! https://ift.tt/kOlSLmc August 12, 2024 at 12:38AM

Comments