Hacker News new | ask | show | jobs
by untog 4791 days ago
It's a nice idea, but relying on a remote service for testing makes me worry. I tend to mock HTTP responses locally, so that the tests can run when there isn't even an internet connection available.
3 comments

I use ruby [vcr](https://github.com/vcr/vcr) to mock responses. But ordinarily it 'records' an actual HTTP interaction, to play it back latter mock. If you want to mock something you don't currently have conveniently 'live' to record, you can try to write up the serialized recorded request by hand -- but it'd be a lot easier to use this service to mock up a request, then record it with VCR so subsequent test runs don't go out to the network.

I plan to do some of that, as needed. Convenient.

Yes, you are absolutely right. But sometimes is a good idea to test somes WS requests across all the network, in addition of your locally mocked tests.
What do you use for your local testing?
Telnet when I'm lazy or its quick, curl when I actually want to write a full harness.