4 ms·
Is this something that could be used in a CI pipeline as well?
by chrismatheson 7y ago
Is this something that could be used in a CI pipeline as well?
- pimterry 7y agoAs a UI desktop app, not really, although it depends what you're trying to do. However, the internals are all open-source too, so you can use them standalone and automate HTTP & HTTPS with that. Take a look at https://github.com/httptoolkit/mockttp https://github.com/httptoolkit/mockttp
- chrismatheson 7y agoI think (maybe postman) had a nice gui, and then the same mocks could be loaded up as part of a test. I was thinking more along the lines of how the application actually inspects network traffic, is that something that could be setup & torn down within a unprivileged docker container for example?
- pimterry 7y agoYes, that's exactly what you'd want Mockttp for. It's a Node.js library, so you'd need a Node container and a little script to configure it. Mockttp can spin up an HTTP/HTTPS proxy configured to pass through traffic in a couple of lines, and from there you can add any other mocking rules you want (the Mock tab here is really just a UI over this) and you can subscribe to requests/responses/whatever and report that data elsewhere in any form you'd like (that's where all the data shown in the View tab here comes from). The details get more complicated of course, but it's definitely possible.
- cdeutsch 7y agoYou could try a cloud based solution like https://curlhub.io/ https://curlhub.io/