What kind of out-of-zone failures do I forget to test?
I came across a terrific presentation years ago (which of course I can't find) that listed a lot of failures for remote services that aren't usually verified by humans.
In addition to timeout, 4xx, 5xx, etc., it lists things like:
- the connection is closed after 10 bytes of data
- returns the content of www.google.com
- returns the contents of / dev / random
- returns the contents of the / etc / passwd file
- returns correctly formatted unicode Chinese text
- returns ansi color control characters
- returns the wrong content type marked correctly (you requested Content-Type: application / json, I am posting back Content-Type: application / jpeg)
- returns one byte of data every 29 seconds.
What are some of the types of out-of-band failures that you encounter that developers usually (but should) test?
(extra bonus points if you can find the original presentation)
+3
source to share
2 answers
The ones you pointed out are great; I'd love to see the original presentation if you dig it up! A couple more favorites:
- "Valid" answer with pair bits flipped
- a "valid" response with additional data you did not expect (
{"result": 123, "extraStuff": {...}}
) to simulate updates to the remote side. - Syntactically valid answer that never ends (
{"results":["lol", "lol", "lol", ...
or just a bunch of spaces)
+2
source to share