locked_user sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:
An app has to talk to a web-service (the usual REST and JSON) that doesn’t provide for a sandbox. The actual HTTP exchange does not need to be tested, merely that a set of “canned” known-good responses are in fact parsed correctly. (For a URL-string that looks like this, the response should be (one-of-these).) Without creating two programs that now have to be debugged, how might you go about doing that in the context of a .t test?
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How would you mock calls to a (third-party) web-service?
by Corion (Patriarch) on May 28, 2013 at 18:20 UTC | |
|
Re: How would you mock calls to a (third-party) web-service?
by locked_user sundialsvc4 (Abbot) on May 28, 2013 at 20:25 UTC |