1

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?

  • Using HTTPS.
  • I don't have control over the server-side.
  • I want to err just certain ajax calls the remaining should work the same (pulling the network plug is not an option).
4

1 回答 1

1

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.

于 2013-10-04T20:21:24.897 回答