How can I test that a web app successfully falls back from one faulty back-end API to a secondary legacy API service?
Could Firebug or Chrome, or Fiddler do it?
How can I setup my client to return error responses for ajax calls to a certain URL pattern?
Yes, Fiddler can do this easily. In Fiddler, click the AutoResponder tab. Create a new rule that specifies the behavior you want. For instance:
If request matches: webdbg.com/test/Service1
Then respond with: *drop
If Fiddler ever gets a request for the specified URL, it will immediately close the connection. Or you could set the response action to return a HTTP/5xx error, or use *reset
to TCP/IP RESET the connection.
See http://www.telerik.com/automated-testing-tools/blog/13-02-15/testing-html5-appcache-with-fiddler.aspx for more details.